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,209 @@
{
"/threads": {
"post": {
"tags": [
"assistants"
],
"summary": "Create Threads",
"description": "Create a thread.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/threads/createThread",
"operationId": "create_threads_threads_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/threads/{thread_id}": {
"get": {
"tags": [
"assistants"
],
"summary": "Get Thread",
"description": "Retrieves a thread.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/threads/getThread",
"operationId": "get_thread_threads__thread_id__get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "thread_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Thread Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/threads/{thread_id}/messages": {
"post": {
"tags": [
"assistants"
],
"summary": "Add Messages",
"description": "Create a message.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/messages/createMessage",
"operationId": "add_messages_threads__thread_id__messages_post",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "thread_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Thread Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"assistants"
],
"summary": "Get Messages",
"description": "Returns a list of messages for a given thread.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/messages/listMessages",
"operationId": "get_messages_threads__thread_id__messages_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "thread_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Thread Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/threads/{thread_id}/runs": {
"post": {
"tags": [
"assistants"
],
"summary": "Run Thread",
"description": "Create a run.\n\nAPI Reference: https://platform.openai.com/docs/api-reference/runs/createRun",
"operationId": "run_thread_threads__thread_id__runs_post",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "thread_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Thread Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
}