feat(llm): mask API keys in UI responses and prevent masked-key leakage in fetch/test/save payloads

- 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
This commit is contained in:
2026-05-15 23:34:09 +03:00
parent b3572ce443
commit 30ba70933d
203 changed files with 158083 additions and 28396 deletions

View File

@@ -0,0 +1,263 @@
{
"/public/agent_hub": {
"get": {
"tags": [
"[beta] Agents",
"public"
],
"summary": "Get Agents",
"operationId": "get_agents_public_agent_hub_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/AgentCard-Output"
},
"type": "array",
"title": "Response Get Agents Public Agent Hub Get"
}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/public/agents/fields": {
"get": {
"tags": [
"public",
"[beta] Agents"
],
"summary": "Get Agent Fields",
"description": "Return agent type metadata required by the dashboard create-agent flow.\n\nIf an agent has `inherit_credentials_from_provider`, the provider's credential\nfields are automatically appended to the agent's credential_fields.",
"operationId": "get_agent_fields_public_agents_fields_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/AgentCreateInfo"
},
"type": "array",
"title": "Response Get Agent Fields Public Agents Fields Get"
}
}
}
}
}
}
},
"/public/endpoints": {
"get": {
"tags": [
"public"
],
"summary": "Get Supported Endpoints",
"description": "Return the list of LiteLLM proxy endpoints and which providers support each one.\n\nReads from the bundled local backup file. Result is cached in-process for\nthe lifetime of the server process.",
"operationId": "get_supported_endpoints_public_endpoints_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SupportedEndpointsResponse"
}
}
}
}
}
}
},
"/public/litellm_blog_posts": {
"get": {
"tags": [
"public"
],
"summary": "Get Litellm Blog Posts",
"description": "Public endpoint to get the latest LiteLLM blog posts.\n\nFetches from GitHub with a 1-hour in-process cache.\nFalls back to the bundled local backup on any failure.",
"operationId": "get_litellm_blog_posts_public_litellm_blog_posts_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlogPostsResponse"
}
}
}
}
}
}
},
"/public/litellm_model_cost_map": {
"get": {
"tags": [
"public",
"model management"
],
"summary": "Get Litellm Model Cost Map",
"description": "Public endpoint to get the LiteLLM model cost map.\nReturns pricing information for all supported models.",
"operationId": "get_litellm_model_cost_map_public_litellm_model_cost_map_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/public/mcp_hub": {
"get": {
"tags": [
"[beta] MCP",
"public"
],
"summary": "Get Mcp Servers",
"operationId": "get_mcp_servers_public_mcp_hub_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/MCPPublicServer"
},
"type": "array",
"title": "Response Get Mcp Servers Public Mcp Hub Get"
}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/public/model_hub": {
"get": {
"tags": [
"public",
"model management"
],
"summary": "Public Model Hub",
"operationId": "public_model_hub_public_model_hub_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/ModelGroupInfoProxy"
},
"type": "array",
"title": "Response Public Model Hub Public Model Hub Get"
}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/public/model_hub/info": {
"get": {
"tags": [
"public",
"model management"
],
"summary": "Public Model Hub Info",
"operationId": "public_model_hub_info_public_model_hub_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PublicModelHubInfo"
}
}
}
}
}
}
},
"/public/providers": {
"get": {
"tags": [
"public",
"providers"
],
"summary": "Get Supported Providers",
"description": "Return a sorted list of all providers supported by LiteLLM.",
"operationId": "get_supported_providers_public_providers_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"type": "string"
},
"type": "array",
"title": "Response Get Supported Providers Public Providers Get"
}
}
}
}
}
}
},
"/public/providers/fields": {
"get": {
"tags": [
"public",
"providers"
],
"summary": "Get Provider Fields",
"description": "Return provider metadata required by the dashboard create-model flow.",
"operationId": "get_provider_fields_public_providers_fields_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/ProviderCreateInfo"
},
"type": "array",
"title": "Response Get Provider Fields Public Providers Fields Get"
}
}
}
}
}
}
}
}