feat: migrate Inspect API to FastAPI router (#4403)

# What does this PR do?

Migrate the Inspect API to the FastAPI router pattern.

Changes:
- Add inspect API to FastAPI router registry
- Add PUBLIC_ROUTE_KEY support for routes that don't require auth
- Update WebMethod creation to respect route's openapi_extra for
authentication requirements

Fixes: https://github.com/llamastack/llama-stack/issues/4346

<!-- Provide a short summary of what this PR does and why. Link to
relevant issues if applicable. -->

<!-- If resolving an issue, uncomment and update the line below -->
<!-- Closes #[issue-number] -->

## Test Plan

CI and various curls on /v1/inspect/routes, /v1/health, /v1/version

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han 2025-12-17 17:33:42 +01:00 committed by GitHub
parent cd5095a247
commit a7d509aaf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 281 additions and 182 deletions

View file

@ -2980,6 +2980,7 @@ components:
properties:
status:
$ref: '#/components/schemas/HealthStatus'
description: The health status of the service
type: object
required:
- status
@ -2990,14 +2991,17 @@ components:
route:
type: string
title: Route
description: The API route path
method:
type: string
title: Method
description: The HTTP method for the route
provider_types:
items:
type: string
type: array
title: Provider Types
description: List of provider types implementing this route
type: object
required:
- route
@ -3012,6 +3016,7 @@ components:
$ref: '#/components/schemas/RouteInfo'
type: array
title: Data
description: List of available API routes
type: object
required:
- data
@ -6610,6 +6615,7 @@ components:
version:
type: string
title: Version
description: The version string of the service
type: object
required:
- version