- 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
248 lines
6.7 KiB
JSON
248 lines
6.7 KiB
JSON
{
|
|
"/utils/dotprompt_json_converter": {
|
|
"post": {
|
|
"tags": [
|
|
"prompts",
|
|
"utils"
|
|
],
|
|
"summary": "Convert Prompt File To Json",
|
|
"description": "Convert a .prompt file to JSON format.\n\nThis endpoint accepts a .prompt file upload and returns the equivalent JSON representation\nthat can be stored in a database or used programmatically.\n\nReturns the JSON structure with 'content' and 'metadata' fields.",
|
|
"operationId": "convert_prompt_file_to_json_utils_dotprompt_json_converter_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_convert_prompt_file_to_json_utils_dotprompt_json_converter_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Response Convert Prompt File To Json Utils Dotprompt Json Converter Post"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/utils/supported_openai_params": {
|
|
"get": {
|
|
"tags": [
|
|
"llm utils"
|
|
],
|
|
"summary": "Supported Openai Params",
|
|
"description": "Returns supported openai params for a given litellm model name\n\ne.g. `gpt-4` vs `gpt-3.5-turbo`\n\nExample curl:\n```\ncurl -X GET --location 'http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k' --header 'Authorization: Bearer sk-1234'\n```",
|
|
"operationId": "supported_openai_params_utils_supported_openai_params_get",
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "model",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Model"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/utils/test_policies_and_guardrails": {
|
|
"post": {
|
|
"tags": [
|
|
"utils"
|
|
],
|
|
"summary": "Test Policies And Guardrails",
|
|
"description": "Apply policies and/or guardrails to inputs (for compliance UI testing).\n\nUse inputs_list for batch testing: each input is processed as a separate call so\nper-input block/allow and errors are returned.\n\nUse inputs for a single call (legacy).",
|
|
"operationId": "test_policies_and_guardrails_utils_test_policies_and_guardrails_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TestPoliciesAndGuardrailsRequest"
|
|
}
|
|
}
|
|
},
|
|
"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": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/utils/token_counter": {
|
|
"post": {
|
|
"tags": [
|
|
"llm utils"
|
|
],
|
|
"summary": "Token Counter",
|
|
"description": "Args:\n request: TokenCountRequest\n call_endpoint: bool - When set to \"True\" it will call the token counting endpoint - e.g Anthropic or Google AI Studio Token Counting APIs.\n\nReturns:\n TokenCountResponse",
|
|
"operationId": "token_counter_utils_token_counter_post",
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "call_endpoint",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"title": "Call Endpoint"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TokenCountRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TokenCountResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/utils/transform_request": {
|
|
"post": {
|
|
"tags": [
|
|
"llm utils"
|
|
],
|
|
"summary": "Transform Request",
|
|
"operationId": "transform_request_utils_transform_request_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TransformRequestBody"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RawRequestTypedDict"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |