Skip to content

Commit f8c84cd

Browse files
feat: migrate Providers API to FastAPI router pattern
1 parent 597c7c6 commit f8c84cd

4 files changed

Lines changed: 14 additions & 16 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-00b875a79e05a6b0af1115082977fcb29da1efbc553e3a2aa7b34d0c2bce0dee.yml
3-
openapi_spec_hash: 4e7110460ea24b382d51dc1911431df3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-bdf3c2981b842ce626fe8a12940f4f3bb980354deba41266d28452e6b747b80c.yml
3+
openapi_spec_hash: 5f7b9d12b24b56e38897bbe360471407
44
config_hash: 39578cfdeb4a10121f2cb3fa3e4d5e20

src/llama_stack_client/resources/providers.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def retrieve(
6161
timeout: float | httpx.Timeout | None | NotGiven = not_given,
6262
) -> ProviderInfo:
6363
"""
64-
Get provider.
65-
6664
Get detailed information about a specific provider.
6765
6866
Args:
67+
provider_id: The ID of the provider to inspect.
68+
6969
extra_headers: Send extra headers
7070
7171
extra_query: Add additional query parameters to the request
@@ -94,11 +94,7 @@ def list(
9494
extra_body: Body | None = None,
9595
timeout: float | httpx.Timeout | None | NotGiven = not_given,
9696
) -> ProviderListResponse:
97-
"""
98-
List providers.
99-
100-
List all available providers.
101-
"""
97+
"""List all available providers."""
10298
return self._get(
10399
"/v1/providers",
104100
options=make_request_options(
@@ -144,11 +140,11 @@ async def retrieve(
144140
timeout: float | httpx.Timeout | None | NotGiven = not_given,
145141
) -> ProviderInfo:
146142
"""
147-
Get provider.
148-
149143
Get detailed information about a specific provider.
150144
151145
Args:
146+
provider_id: The ID of the provider to inspect.
147+
152148
extra_headers: Send extra headers
153149
154150
extra_query: Add additional query parameters to the request
@@ -177,11 +173,7 @@ async def list(
177173
extra_body: Body | None = None,
178174
timeout: float | httpx.Timeout | None | NotGiven = not_given,
179175
) -> ProviderListResponse:
180-
"""
181-
List providers.
182-
183-
List all available providers.
184-
"""
176+
"""List all available providers."""
185177
return await self._get(
186178
"/v1/providers",
187179
options=make_request_options(

src/llama_stack_client/types/list_providers_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ class ListProvidersResponse(BaseModel):
1616
"""Response containing a list of all available providers."""
1717

1818
data: ProviderListResponse
19+
"""List of provider information objects"""

src/llama_stack_client/types/provider_info.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ class ProviderInfo(BaseModel):
1919
"""
2020

2121
api: str
22+
"""The API name this provider implements"""
2223

2324
config: Dict[str, object]
25+
"""Configuration parameters for the provider"""
2426

2527
health: Dict[str, object]
28+
"""Current health status of the provider"""
2629

2730
provider_id: str
31+
"""Unique identifier for the provider"""
2832

2933
provider_type: str
34+
"""The type of provider implementation"""

0 commit comments

Comments
 (0)