This commit is contained in:
Xi Yan 2025-03-13 17:11:49 -07:00
parent 98b1b15e0f
commit d479bc5fdc
2 changed files with 15 additions and 11 deletions

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from typing import List, Protocol, runtime_checkable
from typing import List, Optional, Protocol, runtime_checkable
from pydantic import BaseModel
@ -19,10 +19,6 @@ class ProviderInfo(BaseModel):
provider_type: str
class GetProviderResponse(BaseModel):
data: Provider | None
class ListProvidersResponse(BaseModel):
data: List[ProviderInfo]
@ -37,4 +33,4 @@ class Providers(Protocol):
async def list_providers(self) -> ListProvidersResponse: ...
@webmethod(route="/providers/{provider_id}", method="GET")
async def inspect_provider(self, provider_id: str) -> GetProviderResponse: ...
async def inspect_provider(self, provider_id: str) -> Optional[ProviderInfo]: ...