Skip to content

refactor(tools)!: move /v1/tools route to /v1/admin/tools - #5787

Merged
leseb merged 5 commits into
ogx-ai:mainfrom
leseb:leseb/move-tools-to-admin
May 12, 2026
Merged

refactor(tools)!: move /v1/tools route to /v1/admin/tools#5787
leseb merged 5 commits into
ogx-ai:mainfrom
leseb:leseb/move-tools-to-admin

Conversation

@leseb

@leseb leseb commented May 11, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Moves the GET /v1/tools endpoint to GET /v1/admin/tools, following the same pattern as #5659 (connectors → admin). Tools are admin-controlled resources configured at the distribution level, not user-scoped — users don't register or unregister tool groups. The rationale is identical to the connectors move.

Pattern followed from #5659:

  • Admin protocol gains list_tools method
  • AdminImpl delegates to the ToolGroupsRoutingTable via self.deps
  • Tools fastapi_routes.py deleted; route served by the admin router
  • Admin router restructured with sub-routers to support both /v1alpha (existing admin endpoints) and /v1 (tools) prefixes

BREAKING CHANGE: GET /v1/tools is removed. Use GET /v1/admin/tools instead.

Test Plan

  1. Pre-commit checks pass (all except api-conformance which is expected for breaking changes — the refactor!: commit message signals intentional breakage)
  2. Unit tests pass: uv run pytest tests/unit/core/ --tb=short -q -k "tool or route or admin" — 77 passed
  3. mypy passes with no errors
  4. OpenAPI specs regenerated and validated

Tools are admin-controlled resources configured at the distribution level,
not user-scoped. Move the tools listing endpoint under /v1/admin for
consistency with the connectors move in ogx-ai#5659. The Admin protocol now
includes list_tools, and AdminImpl delegates to the ToolGroups routing
table implementation.

BREAKING CHANGE: GET /v1/tools is now served at GET /v1/admin/tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
@cdoern

cdoern commented May 11, 2026

Copy link
Copy Markdown
Collaborator

if we are moving connectors we need to move this as well, lgtm

@leseb
leseb enabled auto-merge May 11, 2026 16:04
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds

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

refactor(tools)!: move /v1/tools route to /v1/admin/tools
⚠️ llama-stack-client-node studio · code

Your SDK build had at least one "warning" diagnostic.
generate ⚠️build ⏭️lint ⏭️test ✅

⚠️ llama-stack-client-openapi studio · code

Your SDK build had at least one "warning" diagnostic.
generate ⚠️

⚠️ llama-stack-client-python studio · code

Your SDK build had at least one "warning" diagnostic.
generate ⚠️build ⏭️lint ⏭️test ✅

⚠️ llama-stack-client-go studio · conflict

Your SDK build had at least one warning diagnostic.


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-05-12 07:50:10 UTC

cdoern and others added 3 commits May 11, 2026 21:19
Signed-off-by: Charlie Doern <cdoern@redhat.com>

# Conflicts:
#	client-sdks/stainless/openapi.yml
#	docs/static/deprecated-ogx-spec.yaml
#	docs/static/experimental-ogx-spec.yaml
#	docs/static/ogx-spec.yaml
#	docs/static/stainless-ogx-spec.yaml
#	src/ogx/core/admin.py
#	src/ogx_api/admin/api.py
#	src/ogx_api/admin/fastapi_routes.py
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb
leseb added this pull request to the merge queue May 12, 2026
Merged via the queue into ogx-ai:main with commit 617fd74 May 12, 2026
49 checks passed
@leseb
leseb deleted the leseb/move-tools-to-admin branch May 12, 2026 07:46
leseb added a commit to leseb/ogx that referenced this pull request May 12, 2026
# What does this PR do?

Updates three documentation pages that still referenced the old
`/v1/tools` endpoint path after ogx-ai#5787 moved it to `/v1/admin/tools`.

Files updated:
- `docs/src/pages/index.js` — landing page API grid
- `docs/docs/api-overview.mdx` — API reference overview
- `docs/docs/building_applications/tools.mdx` — tools guide prose

## Test Plan

1. Run the docs dev server: `cd docs && npm install && npx docusaurus
gen-api-docs all && npx docusaurus start`
2. Verify the landing page API grid shows `/v1/admin/tools`
3. Verify `/docs/api-overview` shows `/v1/admin/tools` in the stable
section
4. Verify `/docs/building_applications/tools` prose references
`/v1/admin/tools`

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants