- Add mask_api_key() and is_masked_or_placeholder() to llm_provider service - Return masked keys in all provider CRUD endpoints - Reject masked/placeholder keys in fetch_models and test_provider_config - Show masked key with Change button in ProviderConfig.svelte edit form - Exclude masked keys from fetch-models, test, and submit payloads on frontend - Update semantics-core skill with clarified complexity tier rules - Switch agent modes from subagent to all
173 lines
5.0 KiB
JSON
173 lines
5.0 KiB
JSON
{
|
|
"/fallback": {
|
|
"post": {
|
|
"tags": [
|
|
"Fallback Management"
|
|
],
|
|
"summary": "Create Fallback",
|
|
"description": "Create or update fallbacks for a specific model.\n\nThis endpoint allows you to configure fallback models separately from the general config.\nFallbacks are triggered when a model call fails after retries.\n\n**Example Request:**\n```json\n{\n \"model\": \"gpt-3.5-turbo\",\n \"fallback_models\": [\"gpt-4\", \"claude-3-haiku\"],\n \"fallback_type\": \"general\"\n}\n```\n\n**Fallback Types:**\n- `general`: Standard fallbacks for any error (default)\n- `context_window`: Fallbacks specifically for context window exceeded errors\n- `content_policy`: Fallbacks specifically for content policy violations",
|
|
"operationId": "create_fallback_fallback_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FallbackCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FallbackResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/fallback/{model}": {
|
|
"get": {
|
|
"tags": [
|
|
"Fallback Management"
|
|
],
|
|
"summary": "Get Fallback",
|
|
"description": "Get fallback configuration for a specific model.\n\n**Parameters:**\n- `model`: The model name to get fallbacks for\n- `fallback_type`: Type of fallback to retrieve (query parameter)\n\n**Example:**\n```\nGET /fallback/gpt-3.5-turbo?fallback_type=general\n```",
|
|
"operationId": "get_fallback_fallback__model__get",
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "model",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Model"
|
|
}
|
|
},
|
|
{
|
|
"name": "fallback_type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"general",
|
|
"context_window",
|
|
"content_policy"
|
|
],
|
|
"type": "string",
|
|
"default": "general",
|
|
"title": "Fallback Type"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FallbackGetResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Fallback Management"
|
|
],
|
|
"summary": "Delete Fallback",
|
|
"description": "Delete fallback configuration for a specific model.\n\n**Parameters:**\n- `model`: The model name to delete fallbacks for\n- `fallback_type`: Type of fallback to delete (query parameter)\n\n**Example:**\n```\nDELETE /fallback/gpt-3.5-turbo?fallback_type=general\n```",
|
|
"operationId": "delete_fallback_fallback__model__delete",
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "model",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Model"
|
|
}
|
|
},
|
|
{
|
|
"name": "fallback_type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"general",
|
|
"context_window",
|
|
"content_policy"
|
|
],
|
|
"type": "string",
|
|
"default": "general",
|
|
"title": "Fallback Type"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FallbackDeleteResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |