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:
223
docs/openapi/litellm/chunks_paths/paths_cache.json
Normal file
223
docs/openapi/litellm/chunks_paths/paths_cache.json
Normal file
@@ -0,0 +1,223 @@
|
||||
{
|
||||
"/cache/delete": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"caching",
|
||||
"caching"
|
||||
],
|
||||
"summary": "Cache Delete",
|
||||
"description": "Endpoint for deleting a key from the cache. All responses from litellm proxy have `x-litellm-cache-key` in the headers\n\nParameters:\n- **keys**: *Optional[List[str]]* - A list of keys to delete from the cache. Example {\"keys\": [\"key1\", \"key2\"]}\n\n```shell\ncurl -X POST \"http://0.0.0.0:4000/cache/delete\" -H \"Authorization: Bearer sk-1234\" -d '{\"keys\": [\"key1\", \"key2\"]}'\n```",
|
||||
"operationId": "cache_delete_cache_delete_post",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/cache/flushall": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"caching",
|
||||
"caching"
|
||||
],
|
||||
"summary": "Cache Flushall",
|
||||
"description": "A function to flush all items from the cache. (All items will be deleted from the cache with this)\nRaises HTTPException if the cache is not initialized or if the cache type does not support flushing.\nReturns a dictionary with the status of the operation.\n\nUsage:\n```\ncurl -X POST http://0.0.0.0:4000/cache/flushall -H \"Authorization: Bearer sk-1234\"\n```",
|
||||
"operationId": "cache_flushall_cache_flushall_post",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/cache/ping": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"caching"
|
||||
],
|
||||
"summary": "Cache Ping",
|
||||
"description": "Endpoint for checking if cache can be pinged",
|
||||
"operationId": "cache_ping_cache_ping_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CachePingResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/cache/redis/info": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"caching"
|
||||
],
|
||||
"summary": "Cache Redis Info",
|
||||
"description": "Endpoint for getting /redis/info",
|
||||
"operationId": "cache_redis_info_cache_redis_info_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/cache/settings": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Cache Settings"
|
||||
],
|
||||
"summary": "Get Cache Settings",
|
||||
"description": "Get cache configuration and available settings.\n\nReturns:\n- fields: List of all configurable cache settings with their metadata (type, description, default, options)\n- current_values: Current values of cache settings from database",
|
||||
"operationId": "get_cache_settings_cache_settings_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CacheSettingsResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Cache Settings"
|
||||
],
|
||||
"summary": "Update Cache Settings",
|
||||
"description": "Save cache settings to database and initialize cache.\n\nThis endpoint:\n1. Encrypts sensitive fields (passwords, etc.)\n2. Saves to LiteLLM_CacheConfig table\n3. Reinitializes cache with new settings",
|
||||
"operationId": "update_cache_settings_cache_settings_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CacheSettingsUpdateRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/cache/settings/test": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Cache Settings"
|
||||
],
|
||||
"summary": "Test Cache Connection",
|
||||
"description": "Test cache connection with provided credentials.\n\nCreates a temporary cache instance and uses its test_connection method\nto verify the credentials work without affecting global state.",
|
||||
"operationId": "test_cache_connection_cache_settings_test_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CacheTestRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CacheTestResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user