Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ authorization:
- `info` - Access the `/` endpoint, `/info` endpoint, `/readiness` endpoint, and `/liveness` endpoint
- `get_config` - Access the `/config` endpoint
- `get_models` - Access the `/models` endpoint
- `list_providers` - Access the `/providers` endpoint
- `get_provider` - Access the `/providers/{provider_id}` endpoint
- `get_metrics` - Access the `/metrics` endpoint
- `list_conversations` - Access the `/conversations` endpoint
- `list_other_conversations` - Access conversations not owned by the user
Expand Down
214 changes: 214 additions & 0 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,119 @@
}
}
},
"/v1/providers": {
"get": {
"tags": [
"providers"
],
"summary": "Providers Endpoint Handler",
"description": "Handle requests to the /providers endpoint.\n\nProcess GET requests to the /providers endpoint, returning a list of available\nproviders from the Llama Stack service.\n\nRaises:\n HTTPException: If unable to connect to the Llama Stack server or if\n providers retrieval fails for any reason.\n\nReturns:\n ProvidersListResponse: An object containing the list of available providers.",
"operationId": "providers_endpoint_handler_v1_providers_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProvidersListResponse"
}
}
},

"providers": {
"agents": [
{
"provider_id": "meta-reference",
"provider_type": "inline::meta-reference"
}
],
"datasetio": [
{
"provider_id": "huggingface",
"provider_type": "remote::huggingface"
},
{
"provider_id": "localfs",
"provider_type": "inline::localfs"
}
],
"inference": [
{
"provider_id": "sentence-transformers",
"provider_type": "inline::sentence-transformers"
},
{
"provider_id": "openai",
"provider_type": "remote::openai"
}
]
}
},
"500": {
"description": "Connection to Llama Stack is broken"
}
}
}
},
"/v1/providers/{provider_id}": {
"get": {
"summary": "Retrieve a single provider by ID",
"description": "Fetches detailed information about a specific provider, including its API, configuration, health status, provider ID, and type. Returns a 404 error if the provider with the specified ID does not exist, or a 500 error if there is a problem connecting to the Llama Stack service.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"required": true,
"description": "Unique identifier of the provider to retrieve",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Provider found successfully",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ProviderResponse" },
"example": {
"api": "inference",
"config": {"api_key": "********"},
"health": {
"status": "Not Implemented",
"message": "Provider does not implement health check"
},
"provider_id": "openai",
"provider_type": "remote::openai"
}
}
}
},
"404": {
"description": "Provider with the specified ID was not found",
"content": {
"application/json": {
"example": {
"response": "Provider with given id not found"
}
}
}
},
"500": {
"description": "Unable to retrieve provider due to server error or connection issues",
"content": {
"application/json": {
"example": {
"response": "Unable to retrieve list of providers",
"cause": "Connection to Llama Stack is broken"
}
}
}
}
},
"tags": ["providers"]
}
},
"/v1/query": {
"post": {
"tags": [
Expand Down Expand Up @@ -1246,6 +1359,8 @@
"get_models",
"get_tools",
"get_shields",
"list_providers",
"get_provider",
"get_metrics",
"get_config",
"info",
Expand Down Expand Up @@ -2762,6 +2877,105 @@
"title": "ProviderHealthStatus",
"description": "Model representing the health status of a provider.\n\nAttributes:\n provider_id: The ID of the provider.\n status: The health status ('ok', 'unhealthy', 'not_implemented').\n message: Optional message about the health status."
},
"ProviderResponse": {
"type": "object",
"title": "ProviderResponse",
"description": "Model representing a provider and its configuration, health, and identification details.",
"properties": {
"api": {
"type": "string",
"description": "The API name this provider implements"
},
"config": {
"type": "object",
"description": "Configuration parameters for the provider",
"additionalProperties": true
},
"health": {
"type": "object",
"description": "Current health status of the provider",
"additionalProperties": true
},
"provider_id": {
"type": "string",
"description": "Unique identifier for the provider"
},
"provider_type": {
"type": "string",
"description": "The type of provider implementation"
}
},
"required": [
"api",
"config",
"health",
"provider_id",
"provider_type"
],
"example": {
"api": "inference",
"config": {"api_key": "********"},
"health": {
"status": "Not Implemented",
"message": "Provider does not implement health check"
},
"provider_id": "openai",
"provider_type": "remote::openai"
}
},
"ProvidersListResponse": {
"type": "object",
"properties": {
"providers": {
"type": "object",
"description": "Mapping of API type to list of its available providers",
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_id": {
"type": "string",
"description": "Unique local identifier of provider"
},
"provider_type": {
"type": "string",
"description": "Llama stack identifier of provider (following schema <type>::<name>)"
}
},
"required": ["provider_id", "provider_type"]
}
},
"examples": [
{
"inference": [
{
"provider_id": "sentence-transformers",
"provider_type": "inline::sentence-transformers"
},
{
"provider_id": "openai",
"provider_type": "remote::openai"
}
],
"datasetio": [
{
"provider_id": "huggingface",
"provider_type": "remote::huggingface"
},
{
"provider_id": "localfs",
"provider_type": "inline::localfs"
}
]
}
]
}
},
"required": ["providers"],
"title": "ProvidersListResponse",
"description": "Model representing a response to providers request."
},
"QueryRequest": {
"properties": {
"query": {
Expand Down
Loading
Loading