mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-24 03:13:56 +00:00
feat: introduce /admin API for stack administration and operations (#4401)
# What does this PR do?
- Add new /admin API (v1alpha) for administrative operations including
provider management, health checks, version info, and route listing
- Implement using FastAPI routers following batches pattern with proper
request/response models
- Endpoints: /admin/providers, /admin/providers/{id},
/admin/inspect/routes, /admin/health, /admin/version
- Create admin module structure: models.py, api.py, fastapi_routes.py,
init.py
- Add AdminImpl in llama_stack/core combining provider and inspect
functionality
- Deprecate standalone /providers and /inspect APIs (remain functional
for backward compatibility)
- Consolidate duplicate types: ProviderInfo, HealthInfo, RouteInfo, etc.
now defined once in admin.models
## Test Plan
new admin integration suite, uses generated stainless SDK, and records
new tests on this PR.
Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
d684ec91cc
commit
258c52c84c
24 changed files with 3306 additions and 2078 deletions
|
|
@ -163,6 +163,12 @@ resources:
|
|||
sampling_params: SamplingParams
|
||||
scoring_result: ScoringResult
|
||||
system_message: SystemMessage
|
||||
health_info: HealthInfo
|
||||
provider_info: ProviderInfo
|
||||
list_providers_response: ListProvidersResponse
|
||||
route_info: RouteInfo
|
||||
list_routes_response: ListRoutesResponse
|
||||
version_info: VersionInfo
|
||||
toolgroups:
|
||||
models:
|
||||
tool_group: ToolGroup
|
||||
|
|
@ -261,11 +267,6 @@ resources:
|
|||
type: http
|
||||
endpoint: delete /v1/conversations/{conversation_id}/items/{item_id}
|
||||
inspect:
|
||||
models:
|
||||
healthInfo: HealthInfo
|
||||
providerInfo: ProviderInfo
|
||||
routeInfo: RouteInfo
|
||||
versionInfo: VersionInfo
|
||||
methods:
|
||||
health: get /v1/health
|
||||
version: get /v1/version
|
||||
|
|
@ -357,16 +358,12 @@ resources:
|
|||
paginated: false
|
||||
endpoint: get /v1/models
|
||||
providers:
|
||||
models:
|
||||
list_providers_response: ListProvidersResponse
|
||||
methods:
|
||||
list:
|
||||
paginated: false
|
||||
endpoint: get /v1/providers
|
||||
retrieve: get /v1/providers/{provider_id}
|
||||
routes:
|
||||
models:
|
||||
list_routes_response: ListRoutesResponse
|
||||
methods:
|
||||
list:
|
||||
paginated: false
|
||||
|
|
@ -474,6 +471,13 @@ resources:
|
|||
cancel: delete /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}
|
||||
status: get /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}
|
||||
retrieve: get /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result
|
||||
admin:
|
||||
methods:
|
||||
list_providers: get /v1alpha/admin/providers
|
||||
inspect_provider: get /v1alpha/admin/providers/{provider_id}
|
||||
list_routes: get /v1alpha/admin/inspect/routes
|
||||
health: get /v1alpha/admin/health
|
||||
version: get /v1alpha/admin/version
|
||||
beta:
|
||||
subresources:
|
||||
datasets:
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue