Skip to content

Conversation

@cdoern
Copy link
Collaborator

@cdoern cdoern commented Dec 5, 2025

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

resolves #4303

Test Plan

WIP

@cdoern
Copy link
Collaborator Author

cdoern commented Dec 15, 2025

ideally we should be able to write tests in this PR once #4360 merges

@cdoern cdoern force-pushed the admin branch 5 times, most recently from 272d963 to 51babfb Compare December 16, 2025 20:13
@llamastack llamastack deleted a comment from github-actions bot Dec 16, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

✱ Stainless preview builds

This PR will update the llama-stack-client SDKs with the following commit message.

feat: introduce /admin API for stack administration and operations

Edit this comment to update it. It will appear in the SDK's changelogs.

⚠️ llama-stack-client-node studio · code · diff

There was a regression in your SDK.
generate ⚠️build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/llama-stack-client-node/1b0ce42e5d1ca87b07a32c41f6abcd7a0526eec5/dist.tar.gz
New diagnostics (1 warning)
⚠️ Method/PaginatedWithoutMatchingScheme: `(resource) alpha.admin > (method) list_routes` is paginated, but does not match any [pagination scheme](https://www.stainless.com/docs/guides/configure#pagination), so it will not be interpreted as paginated.
⚠️ llama-stack-client-kotlin studio · code · diff

There was a regression in your SDK.
generate ⚠️lint ✅test ❗

New diagnostics (1 warning)
⚠️ Method/PaginatedWithoutMatchingScheme: `(resource) alpha.admin > (method) list_routes` is paginated, but does not match any [pagination scheme](https://www.stainless.com/docs/guides/configure#pagination), so it will not be interpreted as paginated.
⚠️ llama-stack-client-go studio · code · diff

There was a regression in your SDK.
generate ❗lint ❗test ❗

go get github.com/stainless-sdks/llama-stack-client-go@00014ef0e0f2042d641b54412d4d354cc8a8091c
New diagnostics (1 warning)
⚠️ Method/PaginatedWithoutMatchingScheme: `(resource) alpha.admin > (method) list_routes` is paginated, but does not match any [pagination scheme](https://www.stainless.com/docs/guides/configure#pagination), so it will not be interpreted as paginated.
⚠️ llama-stack-client-python studio · code · diff

There was a regression in your SDK.
generate ⚠️build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/llama-stack-client-python/fe4725fe920b5ab8a189c91357338fe81c9432a9/llama_stack_client-0.4.0a13-py3-none-any.whl
New diagnostics (1 warning)
⚠️ Method/PaginatedWithoutMatchingScheme: `(resource) alpha.admin > (method) list_routes` is paginated, but does not match any [pagination scheme](https://www.stainless.com/docs/guides/configure#pagination), so it will not be interpreted as paginated.

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
Last updated: 2025-12-17 00:39:25 UTC

  - 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 new API using Stainless SDK in integration tests

Signed-off-by: Charlie Doern <[email protected]>
@cdoern
Copy link
Collaborator Author

cdoern commented Dec 16, 2025

we will always need to record the missing json for net new APIs like this one. use record-if-missing

Signed-off-by: Charlie Doern <[email protected]>
@cdoern
Copy link
Collaborator Author

cdoern commented Dec 17, 2025

closing, opening on upstream branch so I can make workflow changes. sorry for the churn.

@cdoern cdoern closed this Dec 17, 2025
@cdoern
Copy link
Collaborator Author

cdoern commented Dec 17, 2025

#4401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create /admin API stub

1 participant