first commit
This commit is contained in:
491
docs/openapi/schemas/management/providers.yaml
Normal file
491
docs/openapi/schemas/management/providers.yaml
Normal file
@@ -0,0 +1,491 @@
|
||||
# Providers API schemas
|
||||
|
||||
ProviderStatus:
|
||||
type: string
|
||||
enum: [active, error, deleted]
|
||||
description: Status of the provider
|
||||
|
||||
NetworkConfig:
|
||||
type: object
|
||||
description: Network configuration for provider connections
|
||||
properties:
|
||||
base_url:
|
||||
type: string
|
||||
description: Base URL for the provider (optional)
|
||||
extra_headers:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Additional headers to include in requests
|
||||
default_request_timeout_in_seconds:
|
||||
type: integer
|
||||
description: Default timeout for requests
|
||||
max_retries:
|
||||
type: integer
|
||||
description: Maximum number of retries
|
||||
retry_backoff_initial:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Initial backoff duration in milliseconds
|
||||
retry_backoff_max:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Maximum backoff duration in milliseconds
|
||||
insecure_skip_verify:
|
||||
type: boolean
|
||||
description: Disable TLS certificate verification for provider connections. This bypasses server certificate validation and should be used only as a last resort when a trusted CA chain cannot be configured. Prefer ca_cert_pem for self-signed or private CA deployments.
|
||||
ca_cert_pem:
|
||||
type: string
|
||||
description: PEM-encoded CA certificate to trust for provider endpoint connections (e.g. self-signed or internal CA)
|
||||
|
||||
ConcurrencyAndBufferSize:
|
||||
type: object
|
||||
description: Concurrency settings
|
||||
properties:
|
||||
concurrency:
|
||||
type: integer
|
||||
description: Number of concurrent operations
|
||||
buffer_size:
|
||||
type: integer
|
||||
description: Size of the buffer
|
||||
|
||||
ProxyConfig:
|
||||
type: object
|
||||
description: Proxy configuration
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [none, http, socks5, environment]
|
||||
url:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
ca_cert_pem:
|
||||
type: string
|
||||
|
||||
AzureKeyConfig:
|
||||
type: object
|
||||
description: Azure-specific key configuration
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
api_version:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
client_id:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
client_secret:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
tenant_id:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
scopes:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: List of scopes to use for authentication
|
||||
|
||||
VertexKeyConfig:
|
||||
type: object
|
||||
description: Vertex-specific key configuration
|
||||
properties:
|
||||
project_id:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
project_number:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
region:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
auth_credentials:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
|
||||
BedrockKeyConfig:
|
||||
type: object
|
||||
description: AWS Bedrock-specific key configuration
|
||||
properties:
|
||||
access_key:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
secret_key:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
session_token:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
region:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
arn:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
batch_s3_config:
|
||||
type: object
|
||||
properties:
|
||||
buckets:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
bucket_name:
|
||||
type: string
|
||||
prefix:
|
||||
type: string
|
||||
is_default:
|
||||
type: boolean
|
||||
|
||||
VllmKeyConfig:
|
||||
type: object
|
||||
description: VLLM-specific key configuration
|
||||
properties:
|
||||
url:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
model_name:
|
||||
type: string
|
||||
required:
|
||||
- url
|
||||
|
||||
OllamaKeyConfig:
|
||||
type: object
|
||||
description: Ollama-specific key configuration
|
||||
properties:
|
||||
url:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
required:
|
||||
- url
|
||||
|
||||
ReplicateKeyConfig:
|
||||
type: object
|
||||
description: Replicate-specific key configuration
|
||||
properties:
|
||||
use_deployments_endpoint:
|
||||
type: boolean
|
||||
description: Whether to use the deployments endpoint instead of the models endpoint
|
||||
|
||||
SglKeyConfig:
|
||||
type: object
|
||||
description: SGLang-specific key configuration
|
||||
properties:
|
||||
url:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
required:
|
||||
- url
|
||||
|
||||
VLLMKeyConfig:
|
||||
type: object
|
||||
description: vLLM-specific key configuration for per-key routing to different vLLM instances
|
||||
properties:
|
||||
url:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
description: vLLM server base URL (required)
|
||||
model_name:
|
||||
type: string
|
||||
description: Exact model name served on this vLLM instance
|
||||
|
||||
VLLMKeyConfig:
|
||||
type: object
|
||||
description: vLLM-specific key configuration for per-key routing to different vLLM instances
|
||||
properties:
|
||||
url:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
description: vLLM server base URL (required)
|
||||
model_name:
|
||||
type: string
|
||||
description: Exact model name served on this vLLM instance
|
||||
|
||||
Key:
|
||||
type: object
|
||||
description: API key configuration
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the key
|
||||
name:
|
||||
type: string
|
||||
description: Name of the key
|
||||
value:
|
||||
$ref: '../../schemas/management/common.yaml#/EnvVar'
|
||||
description: API key value (redacted in responses)
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: List of models this key can access (whitelist)
|
||||
blacklisted_models:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: List of models this key cannot access (blacklist)
|
||||
weight:
|
||||
type: number
|
||||
description: Weight for load balancing
|
||||
aliases:
|
||||
type: object
|
||||
propertyNames:
|
||||
minLength: 1
|
||||
additionalProperties:
|
||||
type: string
|
||||
minLength: 1
|
||||
description: Model alias mappings — maps a user-facing model name to a provider-specific identifier (deployment name, inference profile ID, fine-tuned model ID, etc.)
|
||||
azure_key_config:
|
||||
$ref: '#/AzureKeyConfig'
|
||||
vertex_key_config:
|
||||
$ref: '#/VertexKeyConfig'
|
||||
bedrock_key_config:
|
||||
$ref: '#/BedrockKeyConfig'
|
||||
vllm_key_config:
|
||||
$ref: '#/VllmKeyConfig'
|
||||
ollama_key_config:
|
||||
$ref: '#/OllamaKeyConfig'
|
||||
sgl_key_config:
|
||||
$ref: '#/SglKeyConfig'
|
||||
replicate_key_config:
|
||||
$ref: '#/ReplicateKeyConfig'
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Whether the key is active (defaults to true)
|
||||
use_for_batch_api:
|
||||
type: boolean
|
||||
description: Whether this key can be used for batch API operations
|
||||
config_hash:
|
||||
type: string
|
||||
description: Hash of config.json version, used for change detection
|
||||
status:
|
||||
type: string
|
||||
description: Status of key (e.g., success, list_models_failed)
|
||||
description:
|
||||
type: string
|
||||
description: Error or status description for the key
|
||||
|
||||
AllowedRequests:
|
||||
type: object
|
||||
description: Allowed request types for custom providers
|
||||
properties:
|
||||
list_models:
|
||||
type: boolean
|
||||
text_completion:
|
||||
type: boolean
|
||||
text_completion_stream:
|
||||
type: boolean
|
||||
chat_completion:
|
||||
type: boolean
|
||||
chat_completion_stream:
|
||||
type: boolean
|
||||
responses:
|
||||
type: boolean
|
||||
responses_stream:
|
||||
type: boolean
|
||||
count_tokens:
|
||||
type: boolean
|
||||
embedding:
|
||||
type: boolean
|
||||
speech:
|
||||
type: boolean
|
||||
speech_stream:
|
||||
type: boolean
|
||||
transcription:
|
||||
type: boolean
|
||||
transcription_stream:
|
||||
type: boolean
|
||||
image_generation:
|
||||
type: boolean
|
||||
image_generation_stream:
|
||||
type: boolean
|
||||
batch_create:
|
||||
type: boolean
|
||||
batch_list:
|
||||
type: boolean
|
||||
batch_retrieve:
|
||||
type: boolean
|
||||
batch_cancel:
|
||||
type: boolean
|
||||
batch_results:
|
||||
type: boolean
|
||||
file_upload:
|
||||
type: boolean
|
||||
file_list:
|
||||
type: boolean
|
||||
file_retrieve:
|
||||
type: boolean
|
||||
file_delete:
|
||||
type: boolean
|
||||
file_content:
|
||||
type: boolean
|
||||
|
||||
CustomProviderConfig:
|
||||
type: object
|
||||
description: Custom provider configuration
|
||||
properties:
|
||||
is_key_less:
|
||||
type: boolean
|
||||
base_provider_type:
|
||||
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
|
||||
allowed_requests:
|
||||
$ref: '#/AllowedRequests'
|
||||
request_path_overrides:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
|
||||
ProviderResponse:
|
||||
type: object
|
||||
description: Provider configuration response
|
||||
properties:
|
||||
name:
|
||||
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
|
||||
network_config:
|
||||
$ref: '#/NetworkConfig'
|
||||
concurrency_and_buffer_size:
|
||||
$ref: '#/ConcurrencyAndBufferSize'
|
||||
proxy_config:
|
||||
$ref: '#/ProxyConfig'
|
||||
send_back_raw_request:
|
||||
type: boolean
|
||||
send_back_raw_response:
|
||||
type: boolean
|
||||
store_raw_request_response:
|
||||
type: boolean
|
||||
custom_provider_config:
|
||||
$ref: '#/CustomProviderConfig'
|
||||
provider_status:
|
||||
$ref: '#/ProviderStatus'
|
||||
status:
|
||||
type: string
|
||||
description: Operational status (e.g., list_models_failed)
|
||||
description:
|
||||
type: string
|
||||
description: Error/status description
|
||||
config_hash:
|
||||
type: string
|
||||
description: Hash of config.json version, used for change detection
|
||||
|
||||
ListProvidersResponse:
|
||||
type: object
|
||||
description: List providers response
|
||||
properties:
|
||||
providers:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/ProviderResponse'
|
||||
total:
|
||||
type: integer
|
||||
|
||||
AddProviderRequest:
|
||||
type: object
|
||||
description: Add provider request. Keys are managed separately via /api/providers/{provider}/keys.
|
||||
required:
|
||||
- provider
|
||||
properties:
|
||||
provider:
|
||||
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
|
||||
network_config:
|
||||
$ref: '#/NetworkConfig'
|
||||
concurrency_and_buffer_size:
|
||||
$ref: '#/ConcurrencyAndBufferSize'
|
||||
proxy_config:
|
||||
$ref: '#/ProxyConfig'
|
||||
send_back_raw_request:
|
||||
type: boolean
|
||||
send_back_raw_response:
|
||||
type: boolean
|
||||
store_raw_request_response:
|
||||
type: boolean
|
||||
custom_provider_config:
|
||||
$ref: '#/CustomProviderConfig'
|
||||
|
||||
UpdateProviderRequest:
|
||||
type: object
|
||||
description: Update provider request. Keys are managed separately via /api/providers/{provider}/keys.
|
||||
properties:
|
||||
network_config:
|
||||
$ref: '#/NetworkConfig'
|
||||
concurrency_and_buffer_size:
|
||||
$ref: '#/ConcurrencyAndBufferSize'
|
||||
proxy_config:
|
||||
$ref: '#/ProxyConfig'
|
||||
send_back_raw_request:
|
||||
type: boolean
|
||||
send_back_raw_response:
|
||||
type: boolean
|
||||
store_raw_request_response:
|
||||
type: boolean
|
||||
custom_provider_config:
|
||||
$ref: '#/CustomProviderConfig'
|
||||
|
||||
ListProviderKeysResponse:
|
||||
type: object
|
||||
description: Response for listing keys for a provider
|
||||
properties:
|
||||
keys:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/Key'
|
||||
total:
|
||||
type: integer
|
||||
|
||||
ModelResponse:
|
||||
type: object
|
||||
description: Model information
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
accessible_by_keys:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
Architecture:
|
||||
type: object
|
||||
properties:
|
||||
modality:
|
||||
type: string
|
||||
tokenizer:
|
||||
type: string
|
||||
instruct_type:
|
||||
type: string
|
||||
input_modalities:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
output_modalities:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
ModelDetailsResponse:
|
||||
type: object
|
||||
description: Model details with capability metadata
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
context_length:
|
||||
type: integer
|
||||
max_input_tokens:
|
||||
type: integer
|
||||
max_output_tokens:
|
||||
type: integer
|
||||
architecture:
|
||||
$ref: '#/Architecture'
|
||||
accessible_by_keys:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
ListModelsResponse:
|
||||
type: object
|
||||
description: List models response
|
||||
properties:
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/ModelResponse'
|
||||
total:
|
||||
type: integer
|
||||
|
||||
ListModelDetailsResponse:
|
||||
type: object
|
||||
description: List model details response
|
||||
properties:
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/ModelDetailsResponse'
|
||||
total:
|
||||
type: integer
|
||||
Reference in New Issue
Block a user