- 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
226 lines
11 KiB
JSON
226 lines
11 KiB
JSON
{
|
|
"/project/delete": {
|
|
"delete": {
|
|
"tags": [
|
|
"project management"
|
|
],
|
|
"summary": "Delete Project",
|
|
"description": "Delete projects\n\nParameters:\n- project_ids: *List[str]* - List of project ids to delete\n\nExample:\n```bash\ncurl --location --request DELETE 'http://0.0.0.0:4000/project/delete' \\\n--header 'Authorization: Bearer sk-1234' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"project_ids\": [\"project-123\", \"project-456\"]\n}'\n```",
|
|
"operationId": "delete_project_project_delete_delete",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeleteProjectRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/LiteLLM_ProjectTable"
|
|
},
|
|
"type": "array",
|
|
"title": "Response Delete Project Project Delete Delete"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/project/info": {
|
|
"get": {
|
|
"tags": [
|
|
"project management"
|
|
],
|
|
"summary": "Project Info",
|
|
"description": "Get information about a specific project\n\nParameters:\n- project_id: *str* - The project id to fetch info for\n\nExample:\n```bash\ncurl --location 'http://0.0.0.0:4000/project/info?project_id=project-123' \\\n--header 'Authorization: Bearer sk-1234'\n```",
|
|
"operationId": "project_info_project_info_get",
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "project_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Project Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LiteLLM_ProjectTable"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/project/list": {
|
|
"get": {
|
|
"tags": [
|
|
"project management"
|
|
],
|
|
"summary": "List Projects",
|
|
"description": "List all projects that the user has access to\n\nExample:\n```bash\ncurl --location 'http://0.0.0.0:4000/project/list' \\\n--header 'Authorization: Bearer sk-1234'\n```",
|
|
"operationId": "list_projects_project_list_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/LiteLLM_ProjectTable"
|
|
},
|
|
"type": "array",
|
|
"title": "Response List Projects Project List Get"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/project/new": {
|
|
"post": {
|
|
"tags": [
|
|
"project management"
|
|
],
|
|
"summary": "New Project",
|
|
"description": "Create a new project. Projects sit between teams and keys in the hierarchy.\n\nOnly admins or team admins can create projects.\n\n# Parameters\n\n- project_alias: *Optional[str]* - The name of the project.\n- description: *Optional[str]* - Description of the project's purpose and use case.\n- team_id: *str* - The team id that this project belongs to. Required.\n- models: *List* - The models the project has access to.\n- budget_id: *Optional[str]* - The id for a budget (tpm/rpm/max budget) for the project.\n### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ###\n- max_budget: *Optional[float]* - Max budget for project\n- tpm_limit: *Optional[int]* - Max tpm limit for project\n- rpm_limit: *Optional[int]* - Max rpm limit for project\n- max_parallel_requests: *Optional[int]* - Max parallel requests for project\n- soft_budget: *Optional[float]* - Get a slack alert when this soft budget is reached. Don't block requests.\n- model_max_budget: *Optional[dict]* - Max budget for a specific model. Example: {\"gpt-4\": 100.0, \"gpt-3.5-turbo\": 50.0}\n- model_rpm_limit: *Optional[dict]* - RPM limits per model. Example: {\"gpt-4\": 1000, \"gpt-3.5-turbo\": 5000}\n- model_tpm_limit: *Optional[dict]* - TPM limits per model. Example: {\"gpt-4\": 50000, \"gpt-3.5-turbo\": 100000}\n- budget_duration: *Optional[str]* - Frequency of reseting project budget\n- metadata: *Optional[dict]* - Metadata for project, store information for project. Example metadata - {\"use_case_id\": \"SNOW-12345\", \"responsible_ai_id\": \"RAI-67890\"}\n- tags: *Optional[list]* - Tags for the project. Example: [\"production\", \"api\"]\n- blocked: *bool* - Flag indicating if the project is blocked or not - will stop all calls from keys with this project_id.\n- object_permission: Optional[LiteLLM_ObjectPermissionBase] - project-specific object permission. Example - {\"vector_stores\": [\"vector_store_1\", \"vector_store_2\"]}. IF null or {} then no object permission.\n\nExample 1: Create new project **without** a budget_id, with model-specific limits\n\n```bash\ncurl --location 'http://0.0.0.0:4000/project/new' \\\n--header 'Authorization: Bearer sk-1234' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"project_alias\": \"flight-search-assistant\",\n \"description\": \"AI-powered flight search and booking assistant\",\n \"team_id\": \"team-123\",\n \"models\": [\"gpt-4\", \"gpt-3.5-turbo\"],\n \"max_budget\": 100,\n \"model_rpm_limit\": {\n \"gpt-4\": 1000,\n \"gpt-3.5-turbo\": 5000\n },\n \"model_tpm_limit\": {\n \"gpt-4\": 50000,\n \"gpt-3.5-turbo\": 100000\n },\n \"metadata\": {\n \"use_case_id\": \"SNOW-12345\",\n \"responsible_ai_id\": \"RAI-67890\"\n }\n}'\n```\n\nExample 2: Create new project **with** a budget_id\n\n```bash\ncurl --location 'http://0.0.0.0:4000/project/new' \\\n--header 'Authorization: Bearer sk-1234' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"project_alias\": \"hotel-recommendations\",\n \"description\": \"Personalized hotel recommendation engine\",\n \"team_id\": \"team-123\",\n \"models\": [\"claude-3-sonnet\"],\n \"budget_id\": \"428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689\",\n \"metadata\": {\n \"use_case_id\": \"SNOW-54321\"\n }\n}'\n```",
|
|
"operationId": "new_project_project_new_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NewProjectRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NewProjectResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/project/update": {
|
|
"post": {
|
|
"tags": [
|
|
"project management"
|
|
],
|
|
"summary": "Update Project",
|
|
"description": "Update a project\n\nParameters:\n- project_id: *str* - The project id to update. Required.\n- project_alias: *Optional[str]* - Updated name for the project\n- description: *Optional[str]* - Updated description for the project\n- team_id: *Optional[str]* - Updated team_id for the project\n- metadata: *Optional[dict]* - Updated metadata for project\n- models: *Optional[list]* - Updated list of models for the project\n- blocked: *Optional[bool]* - Updated blocked status\n- max_budget: *Optional[float]* - Updated max budget\n- tpm_limit: *Optional[int]* - Updated tpm limit\n- rpm_limit: *Optional[int]* - Updated rpm limit\n- model_rpm_limit: *Optional[dict]* - Updated RPM limits per model\n- model_tpm_limit: *Optional[dict]* - Updated TPM limits per model\n- budget_duration: *Optional[str]* - Updated budget duration\n- tags: *Optional[list]* - Updated list of tags for the project\n- object_permission: Optional[LiteLLM_ObjectPermissionBase] - Updated object permission\n\nExample:\n```bash\ncurl --location 'http://0.0.0.0:4000/project/update' \\\n--header 'Authorization: Bearer sk-1234' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"project_id\": \"project-123\",\n \"description\": \"Updated flight search system with enhanced capabilities\",\n \"max_budget\": 200,\n \"model_rpm_limit\": {\n \"gpt-4\": 2000,\n \"gpt-3.5-turbo\": 10000\n },\n \"metadata\": {\n \"use_case_id\": \"SNOW-12345\",\n \"status\": \"active\"\n }\n}'\n```",
|
|
"operationId": "update_project_project_update_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UpdateProjectRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LiteLLM_ProjectTable"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyHeader": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |