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,234 @@
{
"/responses": {
"get": {
"summary": "WebSocket: responses_websocket_endpoint",
"description": "WebSocket connection endpoint",
"operationId": "websocket_responses_websocket_endpoint",
"parameters": [
{
"name": "model",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"101": {
"description": "WebSocket Protocol Switched"
}
},
"tags": [
"WebSocket"
]
}
},
"/responses/compact": {
"post": {
"tags": [
"responses"
],
"summary": "Compact Response",
"description": "Compact a response by running a compaction pass over a conversation.\n\nReturns encrypted, opaque items that can be used to reduce context size.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/compact -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\n```",
"operationId": "compact_response_responses_compact_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/responses/{response_id}": {
"get": {
"tags": [
"responses"
],
"summary": "Get Response",
"description": "Get a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Returns cumulative cached content from background responses\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/get\n\n```bash\n# Get polling response\ncurl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H \"Authorization: Bearer sk-1234\"\n\n# Get provider response\ncurl -X GET http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer sk-1234\"\n```",
"operationId": "get_response_responses__response_id__get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "response_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Response Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"responses"
],
"summary": "Delete Response",
"description": "Delete a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Deletes from Redis cache\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete\n\n```bash\ncurl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer sk-1234\"\n```",
"operationId": "delete_response_responses__response_id__delete",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "response_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Response Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/responses/{response_id}/cancel": {
"post": {
"tags": [
"responses"
],
"summary": "Cancel Response",
"description": "Cancel a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Cancels background response and updates status in Redis\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/cancel\n\n```bash\n# Cancel polling response\ncurl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H \"Authorization: Bearer sk-1234\"\n\n# Cancel provider response\ncurl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H \"Authorization: Bearer sk-1234\"\n```",
"operationId": "cancel_response_responses__response_id__cancel_post",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "response_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Response Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/responses/{response_id}/input_items": {
"get": {
"tags": [
"responses"
],
"summary": "Get Response Input Items",
"description": "List input items for a response.",
"operationId": "get_response_input_items_responses__response_id__input_items_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "response_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Response Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
}