fix: filter out remote::sample providers when listing

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
Ihar Hrachyshka 2025-02-11 18:58:42 -05:00
parent ab7f802698
commit ee98eb279b
2 changed files with 5 additions and 1 deletions

View file

@ -47,7 +47,7 @@ class StackListProviders(Subcommand):
rows = []
for spec in providers_for_api.values():
if spec.provider_type == "sample":
if spec.is_sample:
continue
rows.append(
[

View file

@ -86,6 +86,10 @@ class ProviderSpec(BaseModel):
# used internally by the resolver; this is a hack for now
deps__: List[str] = Field(default_factory=list)
@property
def is_sample(self) -> bool:
return self.provider_type in ("sample", "remote::sample")
class RoutingTable(Protocol):
def get_provider_impl(self, routing_key: str) -> Any: ...