Skip to content

Commit 7774bec

Browse files
feat: migrate Inspect API to FastAPI router
1 parent f8c84cd commit 7774bec

File tree

8 files changed

+28
-26
lines changed

8 files changed

+28
-26
lines changed

.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-bdf3c2981b842ce626fe8a12940f4f3bb980354deba41266d28452e6b747b80c.yml
3-
openapi_spec_hash: 5f7b9d12b24b56e38897bbe360471407
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-8e37e023855aa0a93d09eb2b5365aae5203273d01db0532ba0dc58d2a1f94692.yml
3+
openapi_spec_hash: a2f9d306a6594d5ff915ce30da498892
44
config_hash: 39578cfdeb4a10121f2cb3fa3e4d5e20

src/llama_stack_client/resources/inspect.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ def health(
5656
extra_body: Body | None = None,
5757
timeout: float | httpx.Timeout | None | NotGiven = not_given,
5858
) -> HealthInfo:
59-
"""
60-
Get health status.
61-
62-
Get the current health status of the service.
63-
"""
59+
"""Get the current health status of the service."""
6460
return self._get(
6561
"/v1/health",
6662
options=make_request_options(
@@ -79,11 +75,7 @@ def version(
7975
extra_body: Body | None = None,
8076
timeout: float | httpx.Timeout | None | NotGiven = not_given,
8177
) -> VersionInfo:
82-
"""
83-
Get version.
84-
85-
Get the version of the service.
86-
"""
78+
"""Get the version of the service."""
8779
return self._get(
8880
"/v1/version",
8981
options=make_request_options(
@@ -123,11 +115,7 @@ async def health(
123115
extra_body: Body | None = None,
124116
timeout: float | httpx.Timeout | None | NotGiven = not_given,
125117
) -> HealthInfo:
126-
"""
127-
Get health status.
128-
129-
Get the current health status of the service.
130-
"""
118+
"""Get the current health status of the service."""
131119
return await self._get(
132120
"/v1/health",
133121
options=make_request_options(
@@ -146,11 +134,7 @@ async def version(
146134
extra_body: Body | None = None,
147135
timeout: float | httpx.Timeout | None | NotGiven = not_given,
148136
) -> VersionInfo:
149-
"""
150-
Get version.
151-
152-
Get the version of the service.
153-
"""
137+
"""Get the version of the service."""
154138
return await self._get(
155139
"/v1/version",
156140
options=make_request_options(

src/llama_stack_client/resources/routes.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ def list(
6363
timeout: float | httpx.Timeout | None | NotGiven = not_given,
6464
) -> RouteListResponse:
6565
"""
66-
List routes.
67-
6866
List all available API routes with their methods and implementing providers.
6967
7068
Args:
69+
api_filter: Optional filter to control which routes are returned. Can be an API level ('v1',
70+
'v1alpha', 'v1beta') to show non-deprecated routes at that level, or
71+
'deprecated' to show deprecated routes across all levels. If not specified,
72+
returns all non-deprecated routes.
73+
7174
extra_headers: Send extra headers
7275
7376
extra_query: Add additional query parameters to the request
@@ -122,11 +125,14 @@ async def list(
122125
timeout: float | httpx.Timeout | None | NotGiven = not_given,
123126
) -> RouteListResponse:
124127
"""
125-
List routes.
126-
127128
List all available API routes with their methods and implementing providers.
128129
129130
Args:
131+
api_filter: Optional filter to control which routes are returned. Can be an API level ('v1',
132+
'v1alpha', 'v1beta') to show non-deprecated routes at that level, or
133+
'deprecated' to show deprecated routes across all levels. If not specified,
134+
returns all non-deprecated routes.
135+
130136
extra_headers: Send extra headers
131137
132138
extra_query: Add additional query parameters to the request

src/llama_stack_client/types/health_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ class HealthInfo(BaseModel):
1717
"""Health status information for the service."""
1818

1919
status: Literal["OK", "Error", "Not Implemented"]
20+
"""The health status of the service"""

src/llama_stack_client/types/list_routes_response.py

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

1818
data: RouteListResponse
19+
"""List of available API routes"""

src/llama_stack_client/types/route_info.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ class RouteInfo(BaseModel):
1919
"""
2020

2121
method: str
22+
"""The HTTP method for the route"""
2223

2324
provider_types: List[str]
25+
"""List of provider types implementing this route"""
2426

2527
route: str
28+
"""The API route path"""

src/llama_stack_client/types/route_list_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@
1616

1717
class RouteListParams(TypedDict, total=False):
1818
api_filter: Optional[Literal["v1", "v1alpha", "v1beta", "deprecated"]]
19+
"""Optional filter to control which routes are returned.
20+
21+
Can be an API level ('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at
22+
that level, or 'deprecated' to show deprecated routes across all levels. If not
23+
specified, returns all non-deprecated routes.
24+
"""

src/llama_stack_client/types/version_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ class VersionInfo(BaseModel):
1515
"""Version information for the service."""
1616

1717
version: str
18+
"""The version string of the service"""

0 commit comments

Comments
 (0)