mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 01:48:05 +00:00
feati(api): add connectors API
Closes #4235 and #4061 (partially) Signed-off-by: Jaideep Rao <jrao@redhat.com>
This commit is contained in:
parent
89807dc117
commit
8a5a56f166
11 changed files with 1977 additions and 0 deletions
|
|
@ -3893,6 +3893,212 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1alpha/connectors/{connector_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Connector.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector
|
||||||
|
description: Get a connector by its ID.
|
||||||
|
operationId: get_connector_v1alpha_connectors__connector_id__get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools/{tool_name}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A MCPListToolsTool.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector Tool
|
||||||
|
description: Get a tool definition by its name from a connector.
|
||||||
|
operationId: get_connector_tool_v1alpha_connectors__connector_id__tools__tool_name__get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
- name: tool_name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: tool_name'
|
||||||
|
/v1alpha/connectors/registries/{registry_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Registry.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Registry
|
||||||
|
description: Get a registry by its ID.
|
||||||
|
operationId: get_registry_v1alpha_connectors_registries__registry_id__get
|
||||||
|
parameters:
|
||||||
|
- name: registry_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: registry_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListToolsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListToolsResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connector Tools
|
||||||
|
description: List tools available from a connector.
|
||||||
|
operationId: list_connector_tools_v1alpha_connectors__connector_id__tools_get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListConnectorsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListConnectorsResponse'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connectors
|
||||||
|
description: List all configured connectors.
|
||||||
|
operationId: list_connectors_v1alpha_connectors_get
|
||||||
|
parameters:
|
||||||
|
- name: include_tools
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
title: Include Tools
|
||||||
|
- name: registry_id
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Registry Id
|
||||||
|
/v1alpha/connectors/registries:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListRegistriesResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListRegistriesResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Registries
|
||||||
|
description: List all registries.
|
||||||
|
operationId: list_registries_v1alpha_connectors_registries_get
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Error:
|
||||||
|
|
@ -11618,6 +11824,90 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
tools:
|
||||||
|
anyOf:
|
||||||
|
- items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
- type: 'null'
|
||||||
|
description: List of tools available from the connector
|
||||||
|
registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: ID of the registry this connector belongs to
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -11708,6 +11998,42 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListRegistriesResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListRegistriesResponse
|
||||||
|
description: Response containing a list of registries.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -12100,6 +12426,63 @@ components:
|
||||||
required:
|
required:
|
||||||
- reasoning_tokens
|
- reasoning_tokens
|
||||||
title: OutputTokensDetails
|
title: OutputTokensDetails
|
||||||
|
Registry:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: registry
|
||||||
|
title: Type
|
||||||
|
default: registry
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the registry
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Registry
|
||||||
|
description: A registry resource representing a registry of connectors.
|
||||||
|
RegistryType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: RegistryType
|
||||||
|
description: Type of registry.
|
||||||
SearchRankingOptions:
|
SearchRankingOptions:
|
||||||
properties:
|
properties:
|
||||||
ranker:
|
ranker:
|
||||||
|
|
@ -12573,6 +12956,45 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
RegistryInput:
|
||||||
|
description: Input for creating a registry.
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
nullable: true
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: RegistryInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector.
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for the connector
|
||||||
|
nullable: true
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -12708,6 +13130,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
217
docs/static/deprecated-llama-stack-spec.yaml
vendored
217
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
|
@ -8612,6 +8612,90 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
tools:
|
||||||
|
anyOf:
|
||||||
|
- items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
- type: 'null'
|
||||||
|
description: List of tools available from the connector
|
||||||
|
registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: ID of the registry this connector belongs to
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -8702,6 +8786,42 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListRegistriesResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListRegistriesResponse
|
||||||
|
description: Response containing a list of registries.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -9094,6 +9214,63 @@ components:
|
||||||
required:
|
required:
|
||||||
- reasoning_tokens
|
- reasoning_tokens
|
||||||
title: OutputTokensDetails
|
title: OutputTokensDetails
|
||||||
|
Registry:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: registry
|
||||||
|
title: Type
|
||||||
|
default: registry
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the registry
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Registry
|
||||||
|
description: A registry resource representing a registry of connectors.
|
||||||
|
RegistryType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: RegistryType
|
||||||
|
description: Type of registry.
|
||||||
SearchRankingOptions:
|
SearchRankingOptions:
|
||||||
properties:
|
properties:
|
||||||
ranker:
|
ranker:
|
||||||
|
|
@ -9567,6 +9744,45 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
RegistryInput:
|
||||||
|
description: Input for creating a registry.
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
nullable: true
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: RegistryInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector.
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for the connector
|
||||||
|
nullable: true
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -9702,6 +9918,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
423
docs/static/experimental-llama-stack-spec.yaml
vendored
423
docs/static/experimental-llama-stack-spec.yaml
vendored
|
|
@ -630,6 +630,212 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1alpha/connectors/{connector_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Connector.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector
|
||||||
|
description: Get a connector by its ID.
|
||||||
|
operationId: get_connector_v1alpha_connectors__connector_id__get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools/{tool_name}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A MCPListToolsTool.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector Tool
|
||||||
|
description: Get a tool definition by its name from a connector.
|
||||||
|
operationId: get_connector_tool_v1alpha_connectors__connector_id__tools__tool_name__get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
- name: tool_name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: tool_name'
|
||||||
|
/v1alpha/connectors/registries/{registry_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Registry.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Registry
|
||||||
|
description: Get a registry by its ID.
|
||||||
|
operationId: get_registry_v1alpha_connectors_registries__registry_id__get
|
||||||
|
parameters:
|
||||||
|
- name: registry_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: registry_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListToolsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListToolsResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connector Tools
|
||||||
|
description: List tools available from a connector.
|
||||||
|
operationId: list_connector_tools_v1alpha_connectors__connector_id__tools_get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListConnectorsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListConnectorsResponse'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connectors
|
||||||
|
description: List all configured connectors.
|
||||||
|
operationId: list_connectors_v1alpha_connectors_get
|
||||||
|
parameters:
|
||||||
|
- name: include_tools
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
title: Include Tools
|
||||||
|
- name: registry_id
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Registry Id
|
||||||
|
/v1alpha/connectors/registries:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListRegistriesResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListRegistriesResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Registries
|
||||||
|
description: List all registries.
|
||||||
|
operationId: list_registries_v1alpha_connectors_registries_get
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Error:
|
||||||
|
|
@ -7459,6 +7665,90 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
tools:
|
||||||
|
anyOf:
|
||||||
|
- items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
- type: 'null'
|
||||||
|
description: List of tools available from the connector
|
||||||
|
registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: ID of the registry this connector belongs to
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
DatasetPurpose:
|
DatasetPurpose:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -7537,6 +7827,42 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListRegistriesResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListRegistriesResponse
|
||||||
|
description: Response containing a list of registries.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -7860,6 +8186,63 @@ components:
|
||||||
required:
|
required:
|
||||||
- reasoning_tokens
|
- reasoning_tokens
|
||||||
title: OutputTokensDetails
|
title: OutputTokensDetails
|
||||||
|
Registry:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: registry
|
||||||
|
title: Type
|
||||||
|
default: registry
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the registry
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Registry
|
||||||
|
description: A registry resource representing a registry of connectors.
|
||||||
|
RegistryType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: RegistryType
|
||||||
|
description: Type of registry.
|
||||||
SearchRankingOptions:
|
SearchRankingOptions:
|
||||||
properties:
|
properties:
|
||||||
ranker:
|
ranker:
|
||||||
|
|
@ -8333,6 +8716,45 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
RegistryInput:
|
||||||
|
description: Input for creating a registry.
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
nullable: true
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: RegistryInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector.
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for the connector
|
||||||
|
nullable: true
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -8468,6 +8890,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
217
docs/static/llama-stack-spec.yaml
vendored
217
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -10054,6 +10054,90 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
tools:
|
||||||
|
anyOf:
|
||||||
|
- items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
- type: 'null'
|
||||||
|
description: List of tools available from the connector
|
||||||
|
registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: ID of the registry this connector belongs to
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -10144,6 +10228,42 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListRegistriesResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListRegistriesResponse
|
||||||
|
description: Response containing a list of registries.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -10536,6 +10656,63 @@ components:
|
||||||
required:
|
required:
|
||||||
- reasoning_tokens
|
- reasoning_tokens
|
||||||
title: OutputTokensDetails
|
title: OutputTokensDetails
|
||||||
|
Registry:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: registry
|
||||||
|
title: Type
|
||||||
|
default: registry
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the registry
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Registry
|
||||||
|
description: A registry resource representing a registry of connectors.
|
||||||
|
RegistryType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: RegistryType
|
||||||
|
description: Type of registry.
|
||||||
SearchRankingOptions:
|
SearchRankingOptions:
|
||||||
properties:
|
properties:
|
||||||
ranker:
|
ranker:
|
||||||
|
|
@ -11009,6 +11186,45 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
RegistryInput:
|
||||||
|
description: Input for creating a registry.
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
nullable: true
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: RegistryInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector.
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for the connector
|
||||||
|
nullable: true
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -11144,6 +11360,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
423
docs/static/stainless-llama-stack-spec.yaml
vendored
423
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -3893,6 +3893,212 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1alpha/connectors/{connector_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Connector.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector
|
||||||
|
description: Get a connector by its ID.
|
||||||
|
operationId: get_connector_v1alpha_connectors__connector_id__get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools/{tool_name}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A MCPListToolsTool.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector Tool
|
||||||
|
description: Get a tool definition by its name from a connector.
|
||||||
|
operationId: get_connector_tool_v1alpha_connectors__connector_id__tools__tool_name__get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
- name: tool_name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: tool_name'
|
||||||
|
/v1alpha/connectors/registries/{registry_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Registry.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Registry
|
||||||
|
description: Get a registry by its ID.
|
||||||
|
operationId: get_registry_v1alpha_connectors_registries__registry_id__get
|
||||||
|
parameters:
|
||||||
|
- name: registry_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: registry_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListToolsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListToolsResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connector Tools
|
||||||
|
description: List tools available from a connector.
|
||||||
|
operationId: list_connector_tools_v1alpha_connectors__connector_id__tools_get
|
||||||
|
parameters:
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListConnectorsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListConnectorsResponse'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connectors
|
||||||
|
description: List all configured connectors.
|
||||||
|
operationId: list_connectors_v1alpha_connectors_get
|
||||||
|
parameters:
|
||||||
|
- name: include_tools
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
title: Include Tools
|
||||||
|
- name: registry_id
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Registry Id
|
||||||
|
/v1alpha/connectors/registries:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListRegistriesResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListRegistriesResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Registries
|
||||||
|
description: List all registries.
|
||||||
|
operationId: list_registries_v1alpha_connectors_registries_get
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Error:
|
||||||
|
|
@ -11618,6 +11824,90 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
tools:
|
||||||
|
anyOf:
|
||||||
|
- items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
- type: 'null'
|
||||||
|
description: List of tools available from the connector
|
||||||
|
registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: ID of the registry this connector belongs to
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -11708,6 +11998,42 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListRegistriesResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Registry'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListRegistriesResponse
|
||||||
|
description: Response containing a list of registries.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/MCPListToolsTool'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -12100,6 +12426,63 @@ components:
|
||||||
required:
|
required:
|
||||||
- reasoning_tokens
|
- reasoning_tokens
|
||||||
title: OutputTokensDetails
|
title: OutputTokensDetails
|
||||||
|
Registry:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: registry
|
||||||
|
title: Type
|
||||||
|
default: registry
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the registry
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Created At
|
||||||
|
description: Timestamp of creation
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
title: Updated At
|
||||||
|
description: Timestamp of last update
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- url
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
title: Registry
|
||||||
|
description: A registry resource representing a registry of connectors.
|
||||||
|
RegistryType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: RegistryType
|
||||||
|
description: Type of registry.
|
||||||
SearchRankingOptions:
|
SearchRankingOptions:
|
||||||
properties:
|
properties:
|
||||||
ranker:
|
ranker:
|
||||||
|
|
@ -12573,6 +12956,45 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
RegistryInput:
|
||||||
|
description: Input for creating a registry.
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
user_registry_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: User-specified identifier for the registry
|
||||||
|
nullable: true
|
||||||
|
registry_type:
|
||||||
|
$ref: '#/components/schemas/RegistryType'
|
||||||
|
default: mcp
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: RegistryInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector.
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for the connector
|
||||||
|
nullable: true
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -12708,6 +13130,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ from llama_stack_api import (
|
||||||
Batches,
|
Batches,
|
||||||
Benchmarks,
|
Benchmarks,
|
||||||
BenchmarksProtocolPrivate,
|
BenchmarksProtocolPrivate,
|
||||||
|
Connectors,
|
||||||
Conversations,
|
Conversations,
|
||||||
DatasetIO,
|
DatasetIO,
|
||||||
Datasets,
|
Datasets,
|
||||||
|
|
@ -100,6 +101,7 @@ def api_protocol_map(external_apis: dict[Api, ExternalApiSpec] | None = None) ->
|
||||||
Api.files: Files,
|
Api.files: Files,
|
||||||
Api.prompts: Prompts,
|
Api.prompts: Prompts,
|
||||||
Api.conversations: Conversations,
|
Api.conversations: Conversations,
|
||||||
|
Api.connectors: Connectors,
|
||||||
}
|
}
|
||||||
|
|
||||||
if external_apis:
|
if external_apis:
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,14 @@ from .common.type_system import (
|
||||||
ParamType,
|
ParamType,
|
||||||
StringType,
|
StringType,
|
||||||
)
|
)
|
||||||
|
from .connectors import (
|
||||||
|
Connector,
|
||||||
|
ConnectorInput,
|
||||||
|
Connectors,
|
||||||
|
ConnectorType,
|
||||||
|
ListConnectorsResponse,
|
||||||
|
ListToolsResponse,
|
||||||
|
)
|
||||||
from .conversations import (
|
from .conversations import (
|
||||||
Conversation,
|
Conversation,
|
||||||
ConversationDeletedResource,
|
ConversationDeletedResource,
|
||||||
|
|
@ -340,6 +348,12 @@ from .rag_tool import (
|
||||||
RRFRanker,
|
RRFRanker,
|
||||||
WeightedRanker,
|
WeightedRanker,
|
||||||
)
|
)
|
||||||
|
from .registries import (
|
||||||
|
ListRegistriesResponse,
|
||||||
|
Registry,
|
||||||
|
RegistryInput,
|
||||||
|
RegistryType,
|
||||||
|
)
|
||||||
from .resource import Resource, ResourceType
|
from .resource import Resource, ResourceType
|
||||||
from .safety import (
|
from .safety import (
|
||||||
ModerationObject,
|
ModerationObject,
|
||||||
|
|
@ -482,6 +496,10 @@ __all__ = [
|
||||||
"CommonShieldFields",
|
"CommonShieldFields",
|
||||||
"CompletionInputType",
|
"CompletionInputType",
|
||||||
"CompletionRequest",
|
"CompletionRequest",
|
||||||
|
"Connector",
|
||||||
|
"ConnectorInput",
|
||||||
|
"Connectors",
|
||||||
|
"ConnectorType",
|
||||||
"Conversation",
|
"Conversation",
|
||||||
"ConversationDeletedResource",
|
"ConversationDeletedResource",
|
||||||
"ConversationItem",
|
"ConversationItem",
|
||||||
|
|
@ -556,6 +574,7 @@ __all__ = [
|
||||||
"LLMRAGQueryGeneratorConfig",
|
"LLMRAGQueryGeneratorConfig",
|
||||||
"ListBatchesResponse",
|
"ListBatchesResponse",
|
||||||
"ListBenchmarksResponse",
|
"ListBenchmarksResponse",
|
||||||
|
"ListConnectorsResponse",
|
||||||
"ListDatasetsResponse",
|
"ListDatasetsResponse",
|
||||||
"ListModelsResponse",
|
"ListModelsResponse",
|
||||||
"ListOpenAIChatCompletionResponse",
|
"ListOpenAIChatCompletionResponse",
|
||||||
|
|
@ -565,11 +584,13 @@ __all__ = [
|
||||||
"ListPostTrainingJobsResponse",
|
"ListPostTrainingJobsResponse",
|
||||||
"ListPromptsResponse",
|
"ListPromptsResponse",
|
||||||
"ListProvidersResponse",
|
"ListProvidersResponse",
|
||||||
|
"ListRegistriesResponse",
|
||||||
"ListRoutesResponse",
|
"ListRoutesResponse",
|
||||||
"ListScoringFunctionsResponse",
|
"ListScoringFunctionsResponse",
|
||||||
"ListShieldsResponse",
|
"ListShieldsResponse",
|
||||||
"ListToolDefsResponse",
|
"ListToolDefsResponse",
|
||||||
"ListToolGroupsResponse",
|
"ListToolGroupsResponse",
|
||||||
|
"ListToolsResponse",
|
||||||
"LogProbConfig",
|
"LogProbConfig",
|
||||||
"LoraFinetuningConfig",
|
"LoraFinetuningConfig",
|
||||||
"MCPListToolsTool",
|
"MCPListToolsTool",
|
||||||
|
|
@ -753,6 +774,9 @@ __all__ = [
|
||||||
"RRFRanker",
|
"RRFRanker",
|
||||||
"Ranker",
|
"Ranker",
|
||||||
"RegexParserScoringFnParams",
|
"RegexParserScoringFnParams",
|
||||||
|
"Registry",
|
||||||
|
"RegistryType",
|
||||||
|
"RegistryInput",
|
||||||
"RemoteProviderConfig",
|
"RemoteProviderConfig",
|
||||||
"RemoteProviderSpec",
|
"RemoteProviderSpec",
|
||||||
"RerankData",
|
"RerankData",
|
||||||
|
|
|
||||||
176
src/llama_stack_api/connectors.py
Normal file
176
src/llama_stack_api/connectors.py
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
from enum import StrEnum
|
||||||
|
from typing import Literal, Protocol
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
from typing_extensions import runtime_checkable
|
||||||
|
|
||||||
|
from llama_stack_api.openai_responses import MCPListToolsTool
|
||||||
|
from llama_stack_api.registries import ListRegistriesResponse, Registry
|
||||||
|
from llama_stack_api.resource import Resource, ResourceType
|
||||||
|
from llama_stack_api.schema_utils import json_schema_type, webmethod
|
||||||
|
from llama_stack_api.version import LLAMA_STACK_API_V1ALPHA
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ConnectorType(StrEnum):
|
||||||
|
"""Type of connector."""
|
||||||
|
|
||||||
|
MCP = "mcp"
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class Connector(Resource):
|
||||||
|
"""A connector resource representing a connector registered in Llama Stack.
|
||||||
|
|
||||||
|
:param type: Type of resource, always 'connector' for connectors
|
||||||
|
:param connector_type: Type of connector (e.g., MCP)
|
||||||
|
:param connector_id: User-specified identifier for the connector
|
||||||
|
:param url: URL of the connector
|
||||||
|
:param created_at: Timestamp of creation
|
||||||
|
:param updated_at: Timestamp of last update
|
||||||
|
:param server_label: (Optional) Label of the server
|
||||||
|
:param server_description: (Optional) Description of the server
|
||||||
|
:param tools: (Optional) List of tools available from the connector
|
||||||
|
:param registry_id: (Optional) ID of the registry this connector belongs to
|
||||||
|
"""
|
||||||
|
|
||||||
|
model_config = {"populate_by_name": True}
|
||||||
|
|
||||||
|
type: Literal[ResourceType.connector] = ResourceType.connector
|
||||||
|
connector_type: ConnectorType = Field(default=ConnectorType.MCP)
|
||||||
|
user_connector_id: str | None = Field(
|
||||||
|
default=None, alias="connector_id", description="User-specified identifier for the connector"
|
||||||
|
)
|
||||||
|
url: str = Field(..., description="URL of the connector")
|
||||||
|
created_at: datetime = Field(..., description="Timestamp of creation")
|
||||||
|
updated_at: datetime = Field(..., description="Timestamp of last update")
|
||||||
|
server_name: str | None = Field(default=None, description="Name of the server")
|
||||||
|
server_label: str | None = Field(default=None, description="Label of the server")
|
||||||
|
server_description: str | None = Field(default=None, description="Description of the server")
|
||||||
|
tools: list[MCPListToolsTool] | None = Field(default=None, description="List of tools available from the connector")
|
||||||
|
registry_id: str | None = Field(default=None, description="ID of the registry this connector belongs to")
|
||||||
|
|
||||||
|
def _generate_connector_id(self) -> str:
|
||||||
|
name = self.server_name if self.server_name is not None else self.identifier
|
||||||
|
if self.registry_id is not None:
|
||||||
|
return f"{self.connector_type.value}::{self.registry_id}::{name}"
|
||||||
|
return f"{self.connector_type.value}::{name}"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def connector_id(self) -> str:
|
||||||
|
return self.user_connector_id if self.user_connector_id is not None else self._generate_connector_id()
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ConnectorInput(BaseModel):
|
||||||
|
"""Input for creating a connector.
|
||||||
|
|
||||||
|
:param connector_type: Type of connector
|
||||||
|
:param connector_id: Unique identifier for the connector
|
||||||
|
:param url: URL of the connector
|
||||||
|
"""
|
||||||
|
|
||||||
|
connector_type: ConnectorType = Field(default=ConnectorType.MCP)
|
||||||
|
connector_id: str | None = Field(default=None, description="Unique identifier for the connector")
|
||||||
|
url: str = Field(..., description="URL of the connector")
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ListConnectorsResponse(BaseModel):
|
||||||
|
"""Response containing a list of connectors.
|
||||||
|
|
||||||
|
:param data: List of connectors
|
||||||
|
"""
|
||||||
|
|
||||||
|
data: list[Connector]
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ListToolsResponse(BaseModel):
|
||||||
|
"""Response containing a list of tools.
|
||||||
|
|
||||||
|
:param data: List of tools
|
||||||
|
"""
|
||||||
|
|
||||||
|
data: list[MCPListToolsTool]
|
||||||
|
|
||||||
|
|
||||||
|
@runtime_checkable
|
||||||
|
class Connectors(Protocol):
|
||||||
|
@webmethod(route="/connectors", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def list_connectors(
|
||||||
|
self,
|
||||||
|
registry_id: str | None = None,
|
||||||
|
include_tools: bool = False,
|
||||||
|
) -> ListConnectorsResponse:
|
||||||
|
"""List all configured connectors.
|
||||||
|
|
||||||
|
:param registry_id: (Optional) The ID of a registry to filter connectors for.
|
||||||
|
:param include_tools: (Optional) Whether to include tools in the response.
|
||||||
|
:returns: A ListConnectorsResponse.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/{connector_id:path}", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def get_connector(
|
||||||
|
self,
|
||||||
|
connector_id: str,
|
||||||
|
) -> Connector:
|
||||||
|
"""Get a connector by its ID.
|
||||||
|
|
||||||
|
:param connector_id: The ID of the connector to get.
|
||||||
|
:returns: A Connector.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/{connector_id:path}/tools", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def list_connector_tools(
|
||||||
|
self,
|
||||||
|
connector_id: str,
|
||||||
|
) -> ListToolsResponse:
|
||||||
|
"""List tools available from a connector.
|
||||||
|
|
||||||
|
:param connector_id: The ID of the connector to list tools for.
|
||||||
|
:returns: A ListToolsResponse.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(
|
||||||
|
route="/connectors/{connector_id:path}/tools/{tool_name:path}", method="GET", level=LLAMA_STACK_API_V1ALPHA
|
||||||
|
)
|
||||||
|
async def get_connector_tool(
|
||||||
|
self,
|
||||||
|
connector_id: str,
|
||||||
|
tool_name: str,
|
||||||
|
) -> MCPListToolsTool:
|
||||||
|
"""Get a tool definition by its name from a connector.
|
||||||
|
|
||||||
|
:param connector_id: The ID of the connector to get the tool from.
|
||||||
|
:param tool_name: The name of the tool to get.
|
||||||
|
:returns: A MCPListToolsTool.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/registries", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def list_registries(self) -> ListRegistriesResponse:
|
||||||
|
"""List all registries.
|
||||||
|
|
||||||
|
:returns: A ListRegistriesResponse.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/registries/{registry_id:path}", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def get_registry(self, registry_id: str) -> Registry:
|
||||||
|
"""Get a registry by its ID.
|
||||||
|
|
||||||
|
:param registry_id: The ID of the registry to get.
|
||||||
|
:returns: A Registry.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
@ -111,6 +111,7 @@ class Api(Enum, metaclass=DynamicApiMeta):
|
||||||
:cvar tool_groups: Tool group organization
|
:cvar tool_groups: Tool group organization
|
||||||
:cvar files: File storage and management
|
:cvar files: File storage and management
|
||||||
:cvar prompts: Prompt versions and management
|
:cvar prompts: Prompt versions and management
|
||||||
|
:cvar connectors: External connector management (e.g., MCP servers)
|
||||||
:cvar inspect: Built-in system inspection and introspection
|
:cvar inspect: Built-in system inspection and introspection
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -136,6 +137,7 @@ class Api(Enum, metaclass=DynamicApiMeta):
|
||||||
files = "files"
|
files = "files"
|
||||||
prompts = "prompts"
|
prompts = "prompts"
|
||||||
conversations = "conversations"
|
conversations = "conversations"
|
||||||
|
connectors = "connectors"
|
||||||
|
|
||||||
# built-in API
|
# built-in API
|
||||||
inspect = "inspect"
|
inspect = "inspect"
|
||||||
|
|
|
||||||
68
src/llama_stack_api/registries.py
Normal file
68
src/llama_stack_api/registries.py
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
from enum import StrEnum
|
||||||
|
from typing import Literal
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from llama_stack_api.resource import Resource, ResourceType
|
||||||
|
from llama_stack_api.schema_utils import json_schema_type
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class RegistryType(StrEnum):
|
||||||
|
"""Type of registry."""
|
||||||
|
|
||||||
|
MCP = "mcp"
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class Registry(Resource):
|
||||||
|
"""A registry resource representing a registry of connectors.
|
||||||
|
|
||||||
|
:param type: Type of resource, always 'registry' for registries
|
||||||
|
:param identifier: Unique identifier for this resource in llama stack
|
||||||
|
:param provider_resource_id: Unique identifier for this resource in the provider
|
||||||
|
:param provider_id: ID of the provider that owns this resource
|
||||||
|
:param type: Type of resource (e.g. 'model', 'shield', 'vector_store', etc.)
|
||||||
|
"""
|
||||||
|
|
||||||
|
type: Literal[ResourceType.registry] = ResourceType.registry
|
||||||
|
registry_type: RegistryType = Field(default=RegistryType.MCP)
|
||||||
|
user_registry_id: str | None = Field(default=None, description="User-specified identifier for the registry")
|
||||||
|
url: str = Field(..., description="URL of the registry")
|
||||||
|
created_at: datetime = Field(..., description="Timestamp of creation")
|
||||||
|
updated_at: datetime = Field(..., description="Timestamp of last update")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def registry_id(self) -> str:
|
||||||
|
return self.user_registry_id if self.user_registry_id is not None else self.identifier
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ListRegistriesResponse(BaseModel):
|
||||||
|
"""Response containing a list of registries.
|
||||||
|
|
||||||
|
:param data: List of registries
|
||||||
|
"""
|
||||||
|
|
||||||
|
data: list[Registry]
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class RegistryInput(BaseModel):
|
||||||
|
"""Input for creating a registry.
|
||||||
|
|
||||||
|
:param url: URL of the registry
|
||||||
|
:param user_registry_id: User-specified identifier for the registry
|
||||||
|
"""
|
||||||
|
|
||||||
|
url: str
|
||||||
|
user_registry_id: str | None = Field(default=None, description="User-specified identifier for the registry")
|
||||||
|
registry_type: RegistryType = Field(default=RegistryType.MCP)
|
||||||
|
|
@ -20,6 +20,8 @@ class ResourceType(StrEnum):
|
||||||
tool = "tool"
|
tool = "tool"
|
||||||
tool_group = "tool_group"
|
tool_group = "tool_group"
|
||||||
prompt = "prompt"
|
prompt = "prompt"
|
||||||
|
connector = "connector"
|
||||||
|
registry = "registry"
|
||||||
|
|
||||||
|
|
||||||
class Resource(BaseModel):
|
class Resource(BaseModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue