@homeflare/distilled-litellm 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -12
- package/dist/services/a2a.js +1 -1
- package/dist/services/a2a_registration.js +1 -1
- package/dist/services/access_groups.d.ts +18 -0
- package/dist/services/access_groups.d.ts.map +1 -1
- package/dist/services/access_groups.js +15 -1
- package/dist/services/access_groups.js.map +1 -1
- package/dist/services/adaptive_router.js +1 -1
- package/dist/services/agents.d.ts +10 -0
- package/dist/services/agents.d.ts.map +1 -1
- package/dist/services/agents.js +10 -1
- package/dist/services/agents.js.map +1 -1
- package/dist/services/alerting.js +1 -1
- package/dist/services/anthropic_passthrough.js +1 -1
- package/dist/services/anthropic_skills.d.ts +7 -1
- package/dist/services/anthropic_skills.d.ts.map +1 -1
- package/dist/services/anthropic_skills.js +6 -2
- package/dist/services/anthropic_skills.js.map +1 -1
- package/dist/services/assistants.js +1 -1
- package/dist/services/audio.js +1 -1
- package/dist/services/audit_logging.d.ts +2 -0
- package/dist/services/audit_logging.d.ts.map +1 -1
- package/dist/services/audit_logging.js +2 -1
- package/dist/services/audit_logging.js.map +1 -1
- package/dist/services/auto_router.d.ts +162 -62
- package/dist/services/auto_router.d.ts.map +1 -1
- package/dist/services/auto_router.js +92 -31
- package/dist/services/auto_router.js.map +1 -1
- package/dist/services/batch.js +1 -1
- package/dist/services/beta_agents.js +1 -1
- package/dist/services/beta_mcp.js +1 -1
- package/dist/services/budget_management.d.ts +8 -3
- package/dist/services/budget_management.d.ts.map +1 -1
- package/dist/services/budget_management.js +7 -4
- package/dist/services/budget_management.js.map +1 -1
- package/dist/services/budget_spend_tracking.d.ts +24 -5
- package/dist/services/budget_spend_tracking.d.ts.map +1 -1
- package/dist/services/budget_spend_tracking.js +17 -4
- package/dist/services/budget_spend_tracking.js.map +1 -1
- package/dist/services/cache_settings.js +1 -1
- package/dist/services/caching.js +1 -1
- package/dist/services/chat_completions.js +1 -1
- package/dist/services/claude_code_marketplace.d.ts +11 -10
- package/dist/services/claude_code_marketplace.d.ts.map +1 -1
- package/dist/services/claude_code_marketplace.js +8 -6
- package/dist/services/claude_code_marketplace.js.map +1 -1
- package/dist/services/cloudzero.js +1 -1
- package/dist/services/completions.js +1 -1
- package/dist/services/compliance.js +1 -1
- package/dist/services/config_overrides.d.ts +5 -1
- package/dist/services/config_overrides.d.ts.map +1 -1
- package/dist/services/config_overrides.js +3 -1
- package/dist/services/config_overrides.js.map +1 -1
- package/dist/services/config_yaml.d.ts +120 -6
- package/dist/services/config_yaml.d.ts.map +1 -1
- package/dist/services/config_yaml.js +67 -1
- package/dist/services/config_yaml.js.map +1 -1
- package/dist/services/containers.d.ts +8 -2
- package/dist/services/containers.d.ts.map +1 -1
- package/dist/services/containers.js +13 -5
- package/dist/services/containers.js.map +1 -1
- package/dist/services/coordination_redis_settings.js +1 -1
- package/dist/services/cost_tracking.d.ts +91 -1
- package/dist/services/cost_tracking.d.ts.map +1 -1
- package/dist/services/cost_tracking.js +82 -2
- package/dist/services/cost_tracking.js.map +1 -1
- package/dist/services/credential_management.d.ts +16 -3
- package/dist/services/credential_management.d.ts.map +1 -1
- package/dist/services/credential_management.js +13 -4
- package/dist/services/credential_management.js.map +1 -1
- package/dist/services/customer_management.d.ts +25 -2
- package/dist/services/customer_management.d.ts.map +1 -1
- package/dist/services/customer_management.js +22 -3
- package/dist/services/customer_management.js.map +1 -1
- package/dist/services/email_management.js +1 -1
- package/dist/services/embeddings.js +1 -1
- package/dist/services/evals.js +1 -1
- package/dist/services/experimental.js +1 -1
- package/dist/services/fallback_management.js +1 -1
- package/dist/services/files.js +1 -1
- package/dist/services/fine_tuning.js +1 -1
- package/dist/services/gemini_agents.js +1 -1
- package/dist/services/google_genai_endpoints.js +1 -1
- package/dist/services/guardrails.d.ts +80 -7
- package/dist/services/guardrails.d.ts.map +1 -1
- package/dist/services/guardrails.js +37 -1
- package/dist/services/guardrails.js.map +1 -1
- package/dist/services/health.d.ts +2 -2
- package/dist/services/health.d.ts.map +1 -1
- package/dist/services/health.js +2 -2
- package/dist/services/health.js.map +1 -1
- package/dist/services/images.js +1 -1
- package/dist/services/index.d.ts +1 -15
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -15
- package/dist/services/index.js.map +1 -1
- package/dist/services/internal_user_management.d.ts +227 -39
- package/dist/services/internal_user_management.d.ts.map +1 -1
- package/dist/services/internal_user_management.js +194 -37
- package/dist/services/internal_user_management.js.map +1 -1
- package/dist/services/invite_links.js +1 -1
- package/dist/services/jwt_mappings.d.ts +3 -0
- package/dist/services/jwt_mappings.d.ts.map +1 -1
- package/dist/services/jwt_mappings.js +4 -1
- package/dist/services/jwt_mappings.js.map +1 -1
- package/dist/services/key_management.d.ts +116 -50
- package/dist/services/key_management.d.ts.map +1 -1
- package/dist/services/key_management.js +95 -40
- package/dist/services/key_management.js.map +1 -1
- package/dist/services/langfuse_passthrough.js +1 -1
- package/dist/services/llm_passthrough.d.ts +1199 -0
- package/dist/services/llm_passthrough.d.ts.map +1 -0
- package/dist/services/llm_passthrough.js +2150 -0
- package/dist/services/llm_passthrough.js.map +1 -0
- package/dist/services/llm_utils.js +1 -1
- package/dist/services/logging_callbacks.js +1 -1
- package/dist/services/mcp_byok_oauth.d.ts +18 -11
- package/dist/services/mcp_byok_oauth.d.ts.map +1 -1
- package/dist/services/mcp_byok_oauth.js +27 -24
- package/dist/services/mcp_byok_oauth.js.map +1 -1
- package/dist/services/mcp_discoverable.d.ts +34 -0
- package/dist/services/mcp_discoverable.d.ts.map +1 -1
- package/dist/services/mcp_discoverable.js +51 -1
- package/dist/services/mcp_discoverable.js.map +1 -1
- package/dist/services/mcp_management.d.ts +90 -2
- package/dist/services/mcp_management.d.ts.map +1 -1
- package/dist/services/mcp_management.js +115 -3
- package/dist/services/mcp_management.js.map +1 -1
- package/dist/services/mcp_rest.d.ts +13 -0
- package/dist/services/mcp_rest.d.ts.map +1 -1
- package/dist/services/mcp_rest.js +10 -2
- package/dist/services/mcp_rest.js.map +1 -1
- package/dist/services/memory_management.d.ts +2 -0
- package/dist/services/memory_management.d.ts.map +1 -1
- package/dist/services/memory_management.js +2 -1
- package/dist/services/memory_management.js.map +1 -1
- package/dist/services/misc.d.ts +86 -1
- package/dist/services/misc.d.ts.map +1 -1
- package/dist/services/misc.js +126 -2
- package/dist/services/misc.js.map +1 -1
- package/dist/services/model_management.d.ts +310 -19
- package/dist/services/model_management.d.ts.map +1 -1
- package/dist/services/model_management.js +240 -7
- package/dist/services/model_management.js.map +1 -1
- package/dist/services/moderations.js +1 -1
- package/dist/services/ocr.js +1 -1
- package/dist/services/open_ai_pass_through.d.ts +35 -90
- package/dist/services/open_ai_pass_through.d.ts.map +1 -1
- package/dist/services/open_ai_pass_through.js +41 -139
- package/dist/services/open_ai_pass_through.js.map +1 -1
- package/dist/services/organization_management.d.ts +21 -1
- package/dist/services/organization_management.d.ts.map +1 -1
- package/dist/services/organization_management.js +20 -2
- package/dist/services/organization_management.js.map +1 -1
- package/dist/services/plugins.js +1 -1
- package/dist/services/policies.d.ts +2 -0
- package/dist/services/policies.d.ts.map +1 -1
- package/dist/services/policies.js +3 -1
- package/dist/services/policies.js.map +1 -1
- package/dist/services/policy_engine.d.ts +6 -0
- package/dist/services/policy_engine.d.ts.map +1 -1
- package/dist/services/policy_engine.js +4 -1
- package/dist/services/policy_engine.js.map +1 -1
- package/dist/services/project_management.d.ts +15 -0
- package/dist/services/project_management.d.ts.map +1 -1
- package/dist/services/project_management.js +14 -1
- package/dist/services/project_management.js.map +1 -1
- package/dist/services/prompts.js +1 -1
- package/dist/services/public.d.ts +124 -0
- package/dist/services/public.d.ts.map +1 -1
- package/dist/services/public.js +158 -1
- package/dist/services/public.js.map +1 -1
- package/dist/services/rag.js +1 -1
- package/dist/services/realtime.d.ts +4 -26
- package/dist/services/realtime.d.ts.map +1 -1
- package/dist/services/realtime.js +7 -57
- package/dist/services/realtime.js.map +1 -1
- package/dist/services/rerank.d.ts +72 -0
- package/dist/services/rerank.d.ts.map +1 -1
- package/dist/services/rerank.js +61 -4
- package/dist/services/rerank.js.map +1 -1
- package/dist/services/responses.d.ts +30 -0
- package/dist/services/responses.d.ts.map +1 -1
- package/dist/services/responses.js +59 -1
- package/dist/services/responses.js.map +1 -1
- package/dist/services/router_settings.js +1 -1
- package/dist/services/rust_control_plane.js +1 -1
- package/dist/services/scim.d.ts +41 -1
- package/dist/services/scim.d.ts.map +1 -1
- package/dist/services/scim.js +60 -2
- package/dist/services/scim.js.map +1 -1
- package/dist/services/search.js +1 -1
- package/dist/services/search_tools.js +1 -1
- package/dist/services/settings.d.ts +88 -0
- package/dist/services/settings.d.ts.map +1 -1
- package/dist/services/settings.js +113 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/services/sso_settings.d.ts +1 -1
- package/dist/services/sso_settings.d.ts.map +1 -1
- package/dist/services/sso_settings.js +1 -1
- package/dist/services/sso_settings.js.map +1 -1
- package/dist/services/tag_management.d.ts +7 -0
- package/dist/services/tag_management.d.ts.map +1 -1
- package/dist/services/tag_management.js +8 -1
- package/dist/services/tag_management.js.map +1 -1
- package/dist/services/team_management.d.ts +265 -17
- package/dist/services/team_management.d.ts.map +1 -1
- package/dist/services/team_management.js +247 -12
- package/dist/services/team_management.js.map +1 -1
- package/dist/services/tools.js +1 -1
- package/dist/services/ui_settings.js +1 -1
- package/dist/services/ui_theme_settings.js +1 -1
- package/dist/services/usage_ai.js +1 -1
- package/dist/services/vantage.js +1 -1
- package/dist/services/vector_store_management.js +1 -1
- package/dist/services/vector_stores.js +1 -1
- package/dist/services/videos.js +1 -1
- package/dist/services/web_socket.d.ts +0 -18
- package/dist/services/web_socket.d.ts.map +1 -1
- package/dist/services/web_socket.js +1 -33
- package/dist/services/web_socket.js.map +1 -1
- package/dist/services/workflow_management.js +1 -1
- package/package.json +1 -1
- package/src/services/a2a.ts +1 -1
- package/src/services/a2a_registration.ts +1 -1
- package/src/services/access_groups.ts +44 -1
- package/src/services/adaptive_router.ts +1 -1
- package/src/services/agents.ts +22 -1
- package/src/services/alerting.ts +1 -1
- package/src/services/anthropic_passthrough.ts +1 -1
- package/src/services/anthropic_skills.ts +12 -2
- package/src/services/assistants.ts +1 -1
- package/src/services/audio.ts +1 -1
- package/src/services/audit_logging.ts +4 -1
- package/src/services/auto_router.ts +303 -93
- package/src/services/batch.ts +1 -1
- package/src/services/beta_agents.ts +1 -1
- package/src/services/beta_mcp.ts +1 -1
- package/src/services/budget_management.ts +12 -4
- package/src/services/budget_spend_tracking.ts +38 -6
- package/src/services/cache_settings.ts +1 -1
- package/src/services/caching.ts +1 -1
- package/src/services/chat_completions.ts +1 -1
- package/src/services/claude_code_marketplace.ts +20 -14
- package/src/services/cloudzero.ts +1 -1
- package/src/services/completions.ts +1 -1
- package/src/services/compliance.ts +1 -1
- package/src/services/config_overrides.ts +8 -2
- package/src/services/config_yaml.ts +251 -6
- package/src/services/containers.ts +29 -11
- package/src/services/coordination_redis_settings.ts +1 -1
- package/src/services/cost_tracking.ts +198 -2
- package/src/services/credential_management.ts +25 -6
- package/src/services/customer_management.ts +49 -3
- package/src/services/email_management.ts +1 -1
- package/src/services/embeddings.ts +1 -1
- package/src/services/evals.ts +1 -1
- package/src/services/experimental.ts +1 -1
- package/src/services/fallback_management.ts +1 -1
- package/src/services/files.ts +1 -1
- package/src/services/fine_tuning.ts +1 -1
- package/src/services/gemini_agents.ts +1 -1
- package/src/services/google_genai_endpoints.ts +1 -1
- package/src/services/guardrails.ts +198 -8
- package/src/services/health.ts +3 -2
- package/src/services/images.ts +1 -1
- package/src/services/index.ts +1 -15
- package/src/services/internal_user_management.ts +565 -103
- package/src/services/invite_links.ts +1 -1
- package/src/services/jwt_mappings.ts +7 -1
- package/src/services/key_management.ts +257 -127
- package/src/services/langfuse_passthrough.ts +1 -1
- package/src/services/llm_passthrough.ts +4542 -0
- package/src/services/llm_utils.ts +1 -1
- package/src/services/logging_callbacks.ts +1 -1
- package/src/services/mcp_byok_oauth.ts +65 -45
- package/src/services/mcp_discoverable.ts +109 -1
- package/src/services/mcp_management.ts +258 -3
- package/src/services/mcp_rest.ts +30 -5
- package/src/services/memory_management.ts +4 -1
- package/src/services/misc.ts +269 -2
- package/src/services/model_management.ts +666 -21
- package/src/services/moderations.ts +1 -1
- package/src/services/ocr.ts +1 -1
- package/src/services/open_ai_pass_through.ts +81 -286
- package/src/services/organization_management.ts +44 -2
- package/src/services/plugins.ts +1 -1
- package/src/services/policies.ts +5 -1
- package/src/services/policy_engine.ts +10 -1
- package/src/services/project_management.ts +33 -1
- package/src/services/prompts.ts +1 -1
- package/src/services/public.ts +356 -1
- package/src/services/rag.ts +1 -1
- package/src/services/realtime.ts +11 -111
- package/src/services/rerank.ts +187 -7
- package/src/services/responses.ts +117 -1
- package/src/services/router_settings.ts +1 -1
- package/src/services/rust_control_plane.ts +1 -1
- package/src/services/scim.ts +134 -3
- package/src/services/search.ts +1 -1
- package/src/services/search_tools.ts +1 -1
- package/src/services/settings.ts +278 -1
- package/src/services/sso_settings.ts +2 -1
- package/src/services/tag_management.ts +15 -1
- package/src/services/team_management.ts +676 -37
- package/src/services/tools.ts +1 -1
- package/src/services/ui_settings.ts +1 -1
- package/src/services/ui_theme_settings.ts +1 -1
- package/src/services/usage_ai.ts +1 -1
- package/src/services/vantage.ts +1 -1
- package/src/services/vector_store_management.ts +1 -1
- package/src/services/vector_stores.ts +1 -1
- package/src/services/videos.ts +1 -1
- package/src/services/web_socket.ts +1 -61
- package/src/services/workflow_management.ts +1 -1
- package/dist/services/anthropic_pass_through.d.ts +0 -70
- package/dist/services/anthropic_pass_through.d.ts.map +0 -1
- package/dist/services/anthropic_pass_through.js +0 -114
- package/dist/services/anthropic_pass_through.js.map +0 -1
- package/dist/services/assembly_ai_eu_pass_through.d.ts +0 -70
- package/dist/services/assembly_ai_eu_pass_through.d.ts.map +0 -1
- package/dist/services/assembly_ai_eu_pass_through.js +0 -114
- package/dist/services/assembly_ai_eu_pass_through.js.map +0 -1
- package/dist/services/assembly_ai_pass_through.d.ts +0 -70
- package/dist/services/assembly_ai_pass_through.d.ts.map +0 -1
- package/dist/services/assembly_ai_pass_through.js +0 -114
- package/dist/services/assembly_ai_pass_through.js.map +0 -1
- package/dist/services/aws_comprehend_medical_pass_through.d.ts +0 -36
- package/dist/services/aws_comprehend_medical_pass_through.d.ts.map +0 -1
- package/dist/services/aws_comprehend_medical_pass_through.js +0 -56
- package/dist/services/aws_comprehend_medical_pass_through.js.map +0 -1
- package/dist/services/azure_ai_pass_through.d.ts +0 -70
- package/dist/services/azure_ai_pass_through.d.ts.map +0 -1
- package/dist/services/azure_ai_pass_through.js +0 -112
- package/dist/services/azure_ai_pass_through.js.map +0 -1
- package/dist/services/azure_pass_through.d.ts +0 -70
- package/dist/services/azure_pass_through.d.ts.map +0 -1
- package/dist/services/azure_pass_through.js +0 -107
- package/dist/services/azure_pass_through.js.map +0 -1
- package/dist/services/bedrock_pass_through.d.ts +0 -70
- package/dist/services/bedrock_pass_through.d.ts.map +0 -1
- package/dist/services/bedrock_pass_through.js +0 -114
- package/dist/services/bedrock_pass_through.js.map +0 -1
- package/dist/services/cohere_pass_through.d.ts +0 -70
- package/dist/services/cohere_pass_through.d.ts.map +0 -1
- package/dist/services/cohere_pass_through.js +0 -112
- package/dist/services/cohere_pass_through.js.map +0 -1
- package/dist/services/cursor_pass_through.d.ts +0 -70
- package/dist/services/cursor_pass_through.d.ts.map +0 -1
- package/dist/services/cursor_pass_through.js +0 -112
- package/dist/services/cursor_pass_through.js.map +0 -1
- package/dist/services/google_ai_studio_pass_through.d.ts +0 -70
- package/dist/services/google_ai_studio_pass_through.d.ts.map +0 -1
- package/dist/services/google_ai_studio_pass_through.js +0 -112
- package/dist/services/google_ai_studio_pass_through.js.map +0 -1
- package/dist/services/milvus_pass_through.d.ts +0 -70
- package/dist/services/milvus_pass_through.d.ts.map +0 -1
- package/dist/services/milvus_pass_through.js +0 -112
- package/dist/services/milvus_pass_through.js.map +0 -1
- package/dist/services/mistral_pass_through.d.ts +0 -70
- package/dist/services/mistral_pass_through.d.ts.map +0 -1
- package/dist/services/mistral_pass_through.js +0 -114
- package/dist/services/mistral_pass_through.js.map +0 -1
- package/dist/services/vertex_ai_pass_through.d.ts +0 -180
- package/dist/services/vertex_ai_pass_through.d.ts.map +0 -1
- package/dist/services/vertex_ai_pass_through.js +0 -334
- package/dist/services/vertex_ai_pass_through.js.map +0 -1
- package/dist/services/vllm_pass_through.d.ts +0 -70
- package/dist/services/vllm_pass_through.d.ts.map +0 -1
- package/dist/services/vllm_pass_through.js +0 -104
- package/dist/services/vllm_pass_through.js.map +0 -1
- package/dist/services/watsonx_pass_through.d.ts +0 -70
- package/dist/services/watsonx_pass_through.d.ts.map +0 -1
- package/dist/services/watsonx_pass_through.js +0 -114
- package/dist/services/watsonx_pass_through.js.map +0 -1
- package/src/services/anthropic_pass_through.ts +0 -233
- package/src/services/assembly_ai_eu_pass_through.ts +0 -237
- package/src/services/assembly_ai_pass_through.ts +0 -237
- package/src/services/aws_comprehend_medical_pass_through.ts +0 -109
- package/src/services/azure_ai_pass_through.ts +0 -231
- package/src/services/azure_pass_through.ts +0 -227
- package/src/services/bedrock_pass_through.ts +0 -229
- package/src/services/cohere_pass_through.ts +0 -227
- package/src/services/cursor_pass_through.ts +0 -227
- package/src/services/google_ai_studio_pass_through.ts +0 -227
- package/src/services/milvus_pass_through.ts +0 -227
- package/src/services/mistral_pass_through.ts +0 -229
- package/src/services/vertex_ai_pass_through.ts +0 -684
- package/src/services/vllm_pass_through.ts +0 -227
- package/src/services/watsonx_pass_through.ts +0 -229
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (pinned litellm-openapi @ 1.
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (pinned litellm-openapi @ 1.103.0 — see README). Do not edit.
|
|
2
2
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
4
|
import * as API from "@distilled.cloud/core/api";
|
|
@@ -31,6 +31,31 @@ export class Forbidden
|
|
|
31
31
|
[{ status: 403 }],
|
|
32
32
|
) {}
|
|
33
33
|
|
|
34
|
+
/** The caller may not delete a key it named (it is not a proxy admin and not allowed to modify that key). LiteLLM answers 403 with the message `You are not authorized to delete this key`; the key was not deleted. */
|
|
35
|
+
export class KeyDeleteForbidden
|
|
36
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
37
|
+
/*@__PURE__*/ S.TaggedError<KeyDeleteForbidden>()("KeyDeleteForbidden", {
|
|
38
|
+
code: S.Number,
|
|
39
|
+
message: S.String,
|
|
40
|
+
}).pipe(C.withAuthError),
|
|
41
|
+
[
|
|
42
|
+
{
|
|
43
|
+
status: 403,
|
|
44
|
+
message: { includes: "not authorized to delete this key" },
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
) {}
|
|
48
|
+
|
|
49
|
+
/** No key matches what /key/delete was asked to delete: the alias (or key) is absent, or another caller deleted it first. LiteLLM answers 404 with the message `No keys found`. Whether the key is still there is a question for /key/list, not for this error. */
|
|
50
|
+
export class KeyNotFound
|
|
51
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
52
|
+
/*@__PURE__*/ S.TaggedError<KeyNotFound>()("KeyNotFound", {
|
|
53
|
+
code: S.Number,
|
|
54
|
+
message: S.String,
|
|
55
|
+
}).pipe(C.withBadRequestError),
|
|
56
|
+
[{ status: 404, message: { includes: "No keys found" } }],
|
|
57
|
+
) {}
|
|
58
|
+
|
|
34
59
|
export class NotFound
|
|
35
60
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
36
61
|
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
@@ -49,16 +74,138 @@ export class UnprocessableEntity
|
|
|
49
74
|
[{ status: 422 }],
|
|
50
75
|
) {}
|
|
51
76
|
|
|
77
|
+
export type LiteLLMObjectPermissionBaseAgentAccessGroupsList = Array<string>;
|
|
78
|
+
export const LiteLLMObjectPermissionBaseAgentAccessGroupsList =
|
|
79
|
+
/*@__PURE__*/ S.Array(
|
|
80
|
+
S.String,
|
|
81
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseAgentAccessGroupsList>;
|
|
82
|
+
|
|
83
|
+
export type LiteLLMObjectPermissionBaseAgentsList = Array<string>;
|
|
84
|
+
export const LiteLLMObjectPermissionBaseAgentsList = /*@__PURE__*/ S.Array(
|
|
85
|
+
S.String,
|
|
86
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseAgentsList>;
|
|
87
|
+
|
|
88
|
+
export type LiteLLMObjectPermissionBaseBlockedToolsList = Array<string>;
|
|
89
|
+
export const LiteLLMObjectPermissionBaseBlockedToolsList =
|
|
90
|
+
/*@__PURE__*/ S.Array(
|
|
91
|
+
S.String,
|
|
92
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseBlockedToolsList>;
|
|
93
|
+
|
|
94
|
+
export type LiteLLMObjectPermissionBaseMcpAccessGroupsList = Array<string>;
|
|
95
|
+
export const LiteLLMObjectPermissionBaseMcpAccessGroupsList =
|
|
96
|
+
/*@__PURE__*/ S.Array(
|
|
97
|
+
S.String,
|
|
98
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpAccessGroupsList>;
|
|
99
|
+
|
|
100
|
+
export type LiteLLMObjectPermissionBaseMcpServersList = Array<string>;
|
|
101
|
+
export const LiteLLMObjectPermissionBaseMcpServersList = /*@__PURE__*/ S.Array(
|
|
102
|
+
S.String,
|
|
103
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpServersList>;
|
|
104
|
+
|
|
105
|
+
export type LiteLLMObjectPermissionBaseMcpToolPermissionsValueList =
|
|
106
|
+
Array<string>;
|
|
107
|
+
export const LiteLLMObjectPermissionBaseMcpToolPermissionsValueList =
|
|
108
|
+
/*@__PURE__*/ S.Array(
|
|
109
|
+
S.String,
|
|
110
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolPermissionsValueList>;
|
|
111
|
+
|
|
112
|
+
export type LiteLLMObjectPermissionBaseMcpToolPermissionsMap = {
|
|
113
|
+
[key: string]:
|
|
114
|
+
| LiteLLMObjectPermissionBaseMcpToolPermissionsValueList
|
|
115
|
+
| undefined;
|
|
116
|
+
};
|
|
117
|
+
export const LiteLLMObjectPermissionBaseMcpToolPermissionsMap =
|
|
118
|
+
/*@__PURE__*/ S.Record(
|
|
119
|
+
S.String,
|
|
120
|
+
LiteLLMObjectPermissionBaseMcpToolPermissionsValueList,
|
|
121
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolPermissionsMap>;
|
|
122
|
+
|
|
123
|
+
export type LiteLLMObjectPermissionBaseMcpToolsetsList = Array<string>;
|
|
124
|
+
export const LiteLLMObjectPermissionBaseMcpToolsetsList = /*@__PURE__*/ S.Array(
|
|
125
|
+
S.String,
|
|
126
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolsetsList>;
|
|
127
|
+
|
|
128
|
+
export type LiteLLMObjectPermissionBaseModelsList = Array<string>;
|
|
129
|
+
export const LiteLLMObjectPermissionBaseModelsList = /*@__PURE__*/ S.Array(
|
|
130
|
+
S.String,
|
|
131
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseModelsList>;
|
|
132
|
+
|
|
133
|
+
export type LiteLLMObjectPermissionBaseSearchToolsList = Array<string>;
|
|
134
|
+
export const LiteLLMObjectPermissionBaseSearchToolsList = /*@__PURE__*/ S.Array(
|
|
135
|
+
S.String,
|
|
136
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseSearchToolsList>;
|
|
137
|
+
|
|
138
|
+
export type LiteLLMObjectPermissionBaseSkillsList = Array<string>;
|
|
139
|
+
export const LiteLLMObjectPermissionBaseSkillsList = /*@__PURE__*/ S.Array(
|
|
140
|
+
S.String,
|
|
141
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseSkillsList>;
|
|
142
|
+
|
|
143
|
+
export type LiteLLMObjectPermissionBaseVectorStoresList = Array<string>;
|
|
144
|
+
export const LiteLLMObjectPermissionBaseVectorStoresList =
|
|
145
|
+
/*@__PURE__*/ S.Array(
|
|
146
|
+
S.String,
|
|
147
|
+
) as any as S.Schema<LiteLLMObjectPermissionBaseVectorStoresList>;
|
|
148
|
+
|
|
149
|
+
export interface LiteLLMObjectPermissionBase {
|
|
150
|
+
agent_access_groups?: LiteLLMObjectPermissionBaseAgentAccessGroupsList | null;
|
|
151
|
+
agents?: LiteLLMObjectPermissionBaseAgentsList | null;
|
|
152
|
+
blocked_tools?: LiteLLMObjectPermissionBaseBlockedToolsList | null;
|
|
153
|
+
mcp_access_groups?: LiteLLMObjectPermissionBaseMcpAccessGroupsList | null;
|
|
154
|
+
mcp_servers?: LiteLLMObjectPermissionBaseMcpServersList | null;
|
|
155
|
+
mcp_tool_permissions?: LiteLLMObjectPermissionBaseMcpToolPermissionsMap | null;
|
|
156
|
+
mcp_tool_search_enabled?: boolean | null;
|
|
157
|
+
mcp_toolsets?: LiteLLMObjectPermissionBaseMcpToolsetsList | null;
|
|
158
|
+
models?: LiteLLMObjectPermissionBaseModelsList | null;
|
|
159
|
+
search_tools?: LiteLLMObjectPermissionBaseSearchToolsList | null;
|
|
160
|
+
skills?: LiteLLMObjectPermissionBaseSkillsList | null;
|
|
161
|
+
vector_stores?: LiteLLMObjectPermissionBaseVectorStoresList | null;
|
|
162
|
+
}
|
|
163
|
+
export const LiteLLMObjectPermissionBase = /*@__PURE__*/ S.suspend(() =>
|
|
164
|
+
S.Struct({
|
|
165
|
+
agent_access_groups: S.optional(
|
|
166
|
+
S.NullOr(LiteLLMObjectPermissionBaseAgentAccessGroupsList),
|
|
167
|
+
),
|
|
168
|
+
agents: S.optional(S.NullOr(LiteLLMObjectPermissionBaseAgentsList)),
|
|
169
|
+
blocked_tools: S.optional(
|
|
170
|
+
S.NullOr(LiteLLMObjectPermissionBaseBlockedToolsList),
|
|
171
|
+
),
|
|
172
|
+
mcp_access_groups: S.optional(
|
|
173
|
+
S.NullOr(LiteLLMObjectPermissionBaseMcpAccessGroupsList),
|
|
174
|
+
),
|
|
175
|
+
mcp_servers: S.optional(
|
|
176
|
+
S.NullOr(LiteLLMObjectPermissionBaseMcpServersList),
|
|
177
|
+
),
|
|
178
|
+
mcp_tool_permissions: S.optional(
|
|
179
|
+
S.NullOr(LiteLLMObjectPermissionBaseMcpToolPermissionsMap),
|
|
180
|
+
),
|
|
181
|
+
mcp_tool_search_enabled: S.optional(S.NullOr(S.Boolean)),
|
|
182
|
+
mcp_toolsets: S.optional(
|
|
183
|
+
S.NullOr(LiteLLMObjectPermissionBaseMcpToolsetsList),
|
|
184
|
+
),
|
|
185
|
+
models: S.optional(S.NullOr(LiteLLMObjectPermissionBaseModelsList)),
|
|
186
|
+
search_tools: S.optional(
|
|
187
|
+
S.NullOr(LiteLLMObjectPermissionBaseSearchToolsList),
|
|
188
|
+
),
|
|
189
|
+
skills: S.optional(S.NullOr(LiteLLMObjectPermissionBaseSkillsList)),
|
|
190
|
+
vector_stores: S.optional(
|
|
191
|
+
S.NullOr(LiteLLMObjectPermissionBaseVectorStoresList),
|
|
192
|
+
),
|
|
193
|
+
}),
|
|
194
|
+
).annotate({
|
|
195
|
+
identifier: "LiteLLMObjectPermissionBase",
|
|
196
|
+
}) as any as S.Schema<LiteLLMObjectPermissionBase>;
|
|
197
|
+
|
|
52
198
|
export type BulkUpdateKeyRequestItemTagsList = Array<string>;
|
|
53
199
|
export const BulkUpdateKeyRequestItemTagsList = /*@__PURE__*/ S.Array(
|
|
54
200
|
S.String,
|
|
55
201
|
) as any as S.Schema<BulkUpdateKeyRequestItemTagsList>;
|
|
56
202
|
|
|
57
|
-
/**
|
|
203
|
+
/** One /key/bulk_update item; only the fields it carries are written. */
|
|
58
204
|
export interface BulkUpdateKeyRequestItem {
|
|
59
205
|
budget_id?: string | null;
|
|
60
206
|
key: string;
|
|
61
207
|
max_budget?: number | null;
|
|
208
|
+
object_permission?: LiteLLMObjectPermissionBase | null;
|
|
62
209
|
tags?: BulkUpdateKeyRequestItemTagsList | null;
|
|
63
210
|
team_id?: string | null;
|
|
64
211
|
}
|
|
@@ -67,6 +214,7 @@ export const BulkUpdateKeyRequestItem = /*@__PURE__*/ S.suspend(() =>
|
|
|
67
214
|
budget_id: S.optional(S.NullOr(S.String)),
|
|
68
215
|
key: S.String,
|
|
69
216
|
max_budget: S.optional(S.NullOr(S.Number)),
|
|
217
|
+
object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionBase)),
|
|
70
218
|
tags: S.optional(S.NullOr(BulkUpdateKeyRequestItemTagsList)),
|
|
71
219
|
team_id: S.optional(S.NullOr(S.String)),
|
|
72
220
|
}),
|
|
@@ -520,120 +668,6 @@ export const GenerateKeyFnKeyGeneratePostRequestModelsList =
|
|
|
520
668
|
S.Unknown,
|
|
521
669
|
) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestModelsList>;
|
|
522
670
|
|
|
523
|
-
export type LiteLLMObjectPermissionBaseAgentAccessGroupsList = Array<string>;
|
|
524
|
-
export const LiteLLMObjectPermissionBaseAgentAccessGroupsList =
|
|
525
|
-
/*@__PURE__*/ S.Array(
|
|
526
|
-
S.String,
|
|
527
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseAgentAccessGroupsList>;
|
|
528
|
-
|
|
529
|
-
export type LiteLLMObjectPermissionBaseAgentsList = Array<string>;
|
|
530
|
-
export const LiteLLMObjectPermissionBaseAgentsList = /*@__PURE__*/ S.Array(
|
|
531
|
-
S.String,
|
|
532
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseAgentsList>;
|
|
533
|
-
|
|
534
|
-
export type LiteLLMObjectPermissionBaseBlockedToolsList = Array<string>;
|
|
535
|
-
export const LiteLLMObjectPermissionBaseBlockedToolsList =
|
|
536
|
-
/*@__PURE__*/ S.Array(
|
|
537
|
-
S.String,
|
|
538
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseBlockedToolsList>;
|
|
539
|
-
|
|
540
|
-
export type LiteLLMObjectPermissionBaseMcpAccessGroupsList = Array<string>;
|
|
541
|
-
export const LiteLLMObjectPermissionBaseMcpAccessGroupsList =
|
|
542
|
-
/*@__PURE__*/ S.Array(
|
|
543
|
-
S.String,
|
|
544
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpAccessGroupsList>;
|
|
545
|
-
|
|
546
|
-
export type LiteLLMObjectPermissionBaseMcpServersList = Array<string>;
|
|
547
|
-
export const LiteLLMObjectPermissionBaseMcpServersList = /*@__PURE__*/ S.Array(
|
|
548
|
-
S.String,
|
|
549
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpServersList>;
|
|
550
|
-
|
|
551
|
-
export type LiteLLMObjectPermissionBaseMcpToolPermissionsValueList =
|
|
552
|
-
Array<string>;
|
|
553
|
-
export const LiteLLMObjectPermissionBaseMcpToolPermissionsValueList =
|
|
554
|
-
/*@__PURE__*/ S.Array(
|
|
555
|
-
S.String,
|
|
556
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolPermissionsValueList>;
|
|
557
|
-
|
|
558
|
-
export type LiteLLMObjectPermissionBaseMcpToolPermissionsMap = {
|
|
559
|
-
[key: string]:
|
|
560
|
-
| LiteLLMObjectPermissionBaseMcpToolPermissionsValueList
|
|
561
|
-
| undefined;
|
|
562
|
-
};
|
|
563
|
-
export const LiteLLMObjectPermissionBaseMcpToolPermissionsMap =
|
|
564
|
-
/*@__PURE__*/ S.Record(
|
|
565
|
-
S.String,
|
|
566
|
-
LiteLLMObjectPermissionBaseMcpToolPermissionsValueList,
|
|
567
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolPermissionsMap>;
|
|
568
|
-
|
|
569
|
-
export type LiteLLMObjectPermissionBaseMcpToolsetsList = Array<string>;
|
|
570
|
-
export const LiteLLMObjectPermissionBaseMcpToolsetsList = /*@__PURE__*/ S.Array(
|
|
571
|
-
S.String,
|
|
572
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolsetsList>;
|
|
573
|
-
|
|
574
|
-
export type LiteLLMObjectPermissionBaseModelsList = Array<string>;
|
|
575
|
-
export const LiteLLMObjectPermissionBaseModelsList = /*@__PURE__*/ S.Array(
|
|
576
|
-
S.String,
|
|
577
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseModelsList>;
|
|
578
|
-
|
|
579
|
-
export type LiteLLMObjectPermissionBaseSearchToolsList = Array<string>;
|
|
580
|
-
export const LiteLLMObjectPermissionBaseSearchToolsList = /*@__PURE__*/ S.Array(
|
|
581
|
-
S.String,
|
|
582
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseSearchToolsList>;
|
|
583
|
-
|
|
584
|
-
export type LiteLLMObjectPermissionBaseVectorStoresList = Array<string>;
|
|
585
|
-
export const LiteLLMObjectPermissionBaseVectorStoresList =
|
|
586
|
-
/*@__PURE__*/ S.Array(
|
|
587
|
-
S.String,
|
|
588
|
-
) as any as S.Schema<LiteLLMObjectPermissionBaseVectorStoresList>;
|
|
589
|
-
|
|
590
|
-
export interface LiteLLMObjectPermissionBase {
|
|
591
|
-
agent_access_groups?: LiteLLMObjectPermissionBaseAgentAccessGroupsList | null;
|
|
592
|
-
agents?: LiteLLMObjectPermissionBaseAgentsList | null;
|
|
593
|
-
blocked_tools?: LiteLLMObjectPermissionBaseBlockedToolsList | null;
|
|
594
|
-
mcp_access_groups?: LiteLLMObjectPermissionBaseMcpAccessGroupsList | null;
|
|
595
|
-
mcp_servers?: LiteLLMObjectPermissionBaseMcpServersList | null;
|
|
596
|
-
mcp_tool_permissions?: LiteLLMObjectPermissionBaseMcpToolPermissionsMap | null;
|
|
597
|
-
mcp_tool_search_enabled?: boolean | null;
|
|
598
|
-
mcp_toolsets?: LiteLLMObjectPermissionBaseMcpToolsetsList | null;
|
|
599
|
-
models?: LiteLLMObjectPermissionBaseModelsList | null;
|
|
600
|
-
search_tools?: LiteLLMObjectPermissionBaseSearchToolsList | null;
|
|
601
|
-
vector_stores?: LiteLLMObjectPermissionBaseVectorStoresList | null;
|
|
602
|
-
}
|
|
603
|
-
export const LiteLLMObjectPermissionBase = /*@__PURE__*/ S.suspend(() =>
|
|
604
|
-
S.Struct({
|
|
605
|
-
agent_access_groups: S.optional(
|
|
606
|
-
S.NullOr(LiteLLMObjectPermissionBaseAgentAccessGroupsList),
|
|
607
|
-
),
|
|
608
|
-
agents: S.optional(S.NullOr(LiteLLMObjectPermissionBaseAgentsList)),
|
|
609
|
-
blocked_tools: S.optional(
|
|
610
|
-
S.NullOr(LiteLLMObjectPermissionBaseBlockedToolsList),
|
|
611
|
-
),
|
|
612
|
-
mcp_access_groups: S.optional(
|
|
613
|
-
S.NullOr(LiteLLMObjectPermissionBaseMcpAccessGroupsList),
|
|
614
|
-
),
|
|
615
|
-
mcp_servers: S.optional(
|
|
616
|
-
S.NullOr(LiteLLMObjectPermissionBaseMcpServersList),
|
|
617
|
-
),
|
|
618
|
-
mcp_tool_permissions: S.optional(
|
|
619
|
-
S.NullOr(LiteLLMObjectPermissionBaseMcpToolPermissionsMap),
|
|
620
|
-
),
|
|
621
|
-
mcp_tool_search_enabled: S.optional(S.NullOr(S.Boolean)),
|
|
622
|
-
mcp_toolsets: S.optional(
|
|
623
|
-
S.NullOr(LiteLLMObjectPermissionBaseMcpToolsetsList),
|
|
624
|
-
),
|
|
625
|
-
models: S.optional(S.NullOr(LiteLLMObjectPermissionBaseModelsList)),
|
|
626
|
-
search_tools: S.optional(
|
|
627
|
-
S.NullOr(LiteLLMObjectPermissionBaseSearchToolsList),
|
|
628
|
-
),
|
|
629
|
-
vector_stores: S.optional(
|
|
630
|
-
S.NullOr(LiteLLMObjectPermissionBaseVectorStoresList),
|
|
631
|
-
),
|
|
632
|
-
}),
|
|
633
|
-
).annotate({
|
|
634
|
-
identifier: "LiteLLMObjectPermissionBase",
|
|
635
|
-
}) as any as S.Schema<LiteLLMObjectPermissionBase>;
|
|
636
|
-
|
|
637
671
|
export type GenerateKeyFnKeyGeneratePostRequestPermissionsMap = {
|
|
638
672
|
[key: string]: unknown | undefined;
|
|
639
673
|
};
|
|
@@ -730,8 +764,10 @@ export interface RetryPolicy {
|
|
|
730
764
|
AuthenticationErrorRetries?: number | null;
|
|
731
765
|
BadRequestErrorRetries?: number | null;
|
|
732
766
|
ContentPolicyViolationErrorRetries?: number | null;
|
|
767
|
+
DefaultRetries?: number | null;
|
|
733
768
|
InternalServerErrorRetries?: number | null;
|
|
734
769
|
RateLimitErrorRetries?: number | null;
|
|
770
|
+
ServiceUnavailableErrorRetries?: number | null;
|
|
735
771
|
TimeoutErrorRetries?: number | null;
|
|
736
772
|
}
|
|
737
773
|
export const RetryPolicy = /*@__PURE__*/ S.suspend(() =>
|
|
@@ -739,8 +775,10 @@ export const RetryPolicy = /*@__PURE__*/ S.suspend(() =>
|
|
|
739
775
|
AuthenticationErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
740
776
|
BadRequestErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
741
777
|
ContentPolicyViolationErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
778
|
+
DefaultRetries: S.optional(S.NullOr(S.Number)),
|
|
742
779
|
InternalServerErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
743
780
|
RateLimitErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
781
|
+
ServiceUnavailableErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
744
782
|
TimeoutErrorRetries: S.optional(S.NullOr(S.Number)),
|
|
745
783
|
}),
|
|
746
784
|
).annotate({ identifier: "RetryPolicy" }) as any as S.Schema<RetryPolicy>;
|
|
@@ -754,6 +792,25 @@ export const UpdateRouterConfigModelGroupRetryPolicyMap =
|
|
|
754
792
|
RetryPolicy,
|
|
755
793
|
) as any as S.Schema<UpdateRouterConfigModelGroupRetryPolicyMap>;
|
|
756
794
|
|
|
795
|
+
export type UpdateRouterConfigOptionalPreCallChecksItem =
|
|
796
|
+
| "prompt_caching"
|
|
797
|
+
| "router_budget_limiting"
|
|
798
|
+
| "responses_api_deployment_check"
|
|
799
|
+
| "deployment_affinity"
|
|
800
|
+
| "session_affinity"
|
|
801
|
+
| "forward_client_headers_by_model_group"
|
|
802
|
+
| "enforce_model_rate_limits"
|
|
803
|
+
| "encrypted_content_affinity";
|
|
804
|
+
export const UpdateRouterConfigOptionalPreCallChecksItem = S.String;
|
|
805
|
+
|
|
806
|
+
export type UpdateRouterConfigOptionalPreCallChecksList = Array<
|
|
807
|
+
UpdateRouterConfigOptionalPreCallChecksItem | (string & {})
|
|
808
|
+
>;
|
|
809
|
+
export const UpdateRouterConfigOptionalPreCallChecksList =
|
|
810
|
+
/*@__PURE__*/ S.Array(
|
|
811
|
+
UpdateRouterConfigOptionalPreCallChecksItem,
|
|
812
|
+
) as any as S.Schema<UpdateRouterConfigOptionalPreCallChecksList>;
|
|
813
|
+
|
|
757
814
|
export type RoutingGroupModelsList = Array<string>;
|
|
758
815
|
export const RoutingGroupModelsList = /*@__PURE__*/ S.Array(
|
|
759
816
|
S.String,
|
|
@@ -810,6 +867,7 @@ export interface UpdateRouterConfig {
|
|
|
810
867
|
model_group_alias?: UpdateRouterConfigModelGroupAliasMap | null;
|
|
811
868
|
model_group_retry_policy?: UpdateRouterConfigModelGroupRetryPolicyMap | null;
|
|
812
869
|
num_retries?: number | null;
|
|
870
|
+
optional_pre_call_checks?: UpdateRouterConfigOptionalPreCallChecksList | null;
|
|
813
871
|
retry_after?: number | null;
|
|
814
872
|
retry_policy?: RetryPolicy | null;
|
|
815
873
|
routing_groups?: UpdateRouterConfigRoutingGroupsList | null;
|
|
@@ -817,6 +875,7 @@ export interface UpdateRouterConfig {
|
|
|
817
875
|
routing_strategy_args?: UpdateRouterConfigRoutingStrategyArgsMap | null;
|
|
818
876
|
tag_routing_prefix?: string | null;
|
|
819
877
|
timeout?: number | null;
|
|
878
|
+
weights?: unknown | null;
|
|
820
879
|
}
|
|
821
880
|
export const UpdateRouterConfig = /*@__PURE__*/ S.suspend(() =>
|
|
822
881
|
S.Struct({
|
|
@@ -838,6 +897,9 @@ export const UpdateRouterConfig = /*@__PURE__*/ S.suspend(() =>
|
|
|
838
897
|
S.NullOr(UpdateRouterConfigModelGroupRetryPolicyMap),
|
|
839
898
|
),
|
|
840
899
|
num_retries: S.optional(S.NullOr(S.Number)),
|
|
900
|
+
optional_pre_call_checks: S.optional(
|
|
901
|
+
S.NullOr(UpdateRouterConfigOptionalPreCallChecksList),
|
|
902
|
+
),
|
|
841
903
|
retry_after: S.optional(S.NullOr(S.Number)),
|
|
842
904
|
retry_policy: S.optional(S.NullOr(RetryPolicy)),
|
|
843
905
|
routing_groups: S.optional(S.NullOr(UpdateRouterConfigRoutingGroupsList)),
|
|
@@ -847,6 +909,7 @@ export const UpdateRouterConfig = /*@__PURE__*/ S.suspend(() =>
|
|
|
847
909
|
),
|
|
848
910
|
tag_routing_prefix: S.optional(S.NullOr(S.String)),
|
|
849
911
|
timeout: S.optional(S.NullOr(S.Number)),
|
|
912
|
+
weights: S.optional(S.NullOr(S.Unknown)),
|
|
850
913
|
}),
|
|
851
914
|
).annotate({
|
|
852
915
|
identifier: "UpdateRouterConfig",
|
|
@@ -900,6 +963,7 @@ export interface GenerateKeyFnKeyGeneratePostRequest {
|
|
|
900
963
|
disable_global_guardrails?: boolean | null;
|
|
901
964
|
duration?: string | null;
|
|
902
965
|
enable_prompt_caching?: boolean | null;
|
|
966
|
+
end_user_budget_id?: string | null;
|
|
903
967
|
enforced_params?: GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList | null;
|
|
904
968
|
guardrails?: GenerateKeyFnKeyGeneratePostRequestGuardrailsList | null;
|
|
905
969
|
key?: string | null;
|
|
@@ -935,6 +999,7 @@ export interface GenerateKeyFnKeyGeneratePostRequest {
|
|
|
935
999
|
tags?: GenerateKeyFnKeyGeneratePostRequestTagsList | null;
|
|
936
1000
|
team_id?: string | null;
|
|
937
1001
|
throttle_on_budget_exceeded?: boolean | null;
|
|
1002
|
+
tpd_limit?: number | null;
|
|
938
1003
|
tpm_limit?: number | null;
|
|
939
1004
|
tpm_limit_type?:
|
|
940
1005
|
| GenerateKeyFnKeyGeneratePostRequestTpmLimitType
|
|
@@ -985,6 +1050,7 @@ export const GenerateKeyFnKeyGeneratePostRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
985
1050
|
disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
|
|
986
1051
|
duration: S.optional(S.NullOr(S.String)),
|
|
987
1052
|
enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
|
|
1053
|
+
end_user_budget_id: S.optional(S.NullOr(S.String)),
|
|
988
1054
|
enforced_params: S.optional(
|
|
989
1055
|
S.NullOr(GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList),
|
|
990
1056
|
),
|
|
@@ -1039,6 +1105,7 @@ export const GenerateKeyFnKeyGeneratePostRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
1039
1105
|
tags: S.optional(S.NullOr(GenerateKeyFnKeyGeneratePostRequestTagsList)),
|
|
1040
1106
|
team_id: S.optional(S.NullOr(S.String)),
|
|
1041
1107
|
throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
|
|
1108
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
1042
1109
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
1043
1110
|
tpm_limit_type: S.optional(
|
|
1044
1111
|
S.NullOr(GenerateKeyFnKeyGeneratePostRequestTpmLimitType),
|
|
@@ -1241,6 +1308,7 @@ export interface GenerateKeyResponse {
|
|
|
1241
1308
|
disable_global_guardrails?: boolean | null;
|
|
1242
1309
|
duration?: string | null;
|
|
1243
1310
|
enable_prompt_caching?: boolean | null;
|
|
1311
|
+
end_user_budget_id?: string | null;
|
|
1244
1312
|
enforced_params?: GenerateKeyResponseEnforcedParamsList | null;
|
|
1245
1313
|
expires?: string | null;
|
|
1246
1314
|
guardrails?: GenerateKeyResponseGuardrailsList | null;
|
|
@@ -1273,6 +1341,7 @@ export interface GenerateKeyResponse {
|
|
|
1273
1341
|
throttle_on_budget_exceeded?: boolean | null;
|
|
1274
1342
|
token?: string | null;
|
|
1275
1343
|
token_id?: string | null;
|
|
1344
|
+
tpd_limit?: number | null;
|
|
1276
1345
|
tpm_limit?: number | null;
|
|
1277
1346
|
tpm_limit_type?: GenerateKeyResponseTpmLimitType | null;
|
|
1278
1347
|
updated_at?: string | null;
|
|
@@ -1313,6 +1382,7 @@ export const GenerateKeyResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
1313
1382
|
disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
|
|
1314
1383
|
duration: S.optional(S.NullOr(S.String)),
|
|
1315
1384
|
enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
|
|
1385
|
+
end_user_budget_id: S.optional(S.NullOr(S.String)),
|
|
1316
1386
|
enforced_params: S.optional(
|
|
1317
1387
|
S.NullOr(GenerateKeyResponseEnforcedParamsList),
|
|
1318
1388
|
),
|
|
@@ -1349,6 +1419,7 @@ export const GenerateKeyResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
1349
1419
|
throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
|
|
1350
1420
|
token: S.optional(S.NullOr(S.String)),
|
|
1351
1421
|
token_id: S.optional(S.NullOr(S.String)),
|
|
1422
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
1352
1423
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
1353
1424
|
tpm_limit_type: S.optional(S.NullOr(GenerateKeyResponseTpmLimitType)),
|
|
1354
1425
|
updated_at: S.optional(S.NullOr(S.String)),
|
|
@@ -1577,6 +1648,7 @@ export interface GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest
|
|
|
1577
1648
|
disable_global_guardrails?: boolean | null;
|
|
1578
1649
|
duration?: string | null;
|
|
1579
1650
|
enable_prompt_caching?: boolean | null;
|
|
1651
|
+
end_user_budget_id?: string | null;
|
|
1580
1652
|
enforced_params?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList | null;
|
|
1581
1653
|
guardrails?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestGuardrailsList | null;
|
|
1582
1654
|
key?: string | null;
|
|
@@ -1612,6 +1684,7 @@ export interface GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest
|
|
|
1612
1684
|
tags?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagsList | null;
|
|
1613
1685
|
team_id?: string | null;
|
|
1614
1686
|
throttle_on_budget_exceeded?: boolean | null;
|
|
1687
|
+
tpd_limit?: number | null;
|
|
1615
1688
|
tpm_limit?: number | null;
|
|
1616
1689
|
tpm_limit_type?:
|
|
1617
1690
|
| GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTpmLimitType
|
|
@@ -1681,6 +1754,7 @@ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest =
|
|
|
1681
1754
|
disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
|
|
1682
1755
|
duration: S.optional(S.NullOr(S.String)),
|
|
1683
1756
|
enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
|
|
1757
|
+
end_user_budget_id: S.optional(S.NullOr(S.String)),
|
|
1684
1758
|
enforced_params: S.optional(
|
|
1685
1759
|
S.NullOr(
|
|
1686
1760
|
GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList,
|
|
@@ -1767,6 +1841,7 @@ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest =
|
|
|
1767
1841
|
),
|
|
1768
1842
|
team_id: S.optional(S.NullOr(S.String)),
|
|
1769
1843
|
throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
|
|
1844
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
1770
1845
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
1771
1846
|
tpm_limit_type: S.optional(
|
|
1772
1847
|
S.NullOr(
|
|
@@ -1800,7 +1875,7 @@ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse =
|
|
|
1800
1875
|
}) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse>;
|
|
1801
1876
|
|
|
1802
1877
|
export interface GetInfoKeyFnKeyInfoRequest {
|
|
1803
|
-
/** Key
|
|
1878
|
+
/** Key to look up. Pass the key's sha256 hash so the raw key stays out of URLs and access logs. Example key='d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa' */
|
|
1804
1879
|
key?: string;
|
|
1805
1880
|
}
|
|
1806
1881
|
export const GetInfoKeyFnKeyInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
@@ -1880,8 +1955,10 @@ export interface ListKeysKeyListGetRequest {
|
|
|
1880
1955
|
organization_id?: string;
|
|
1881
1956
|
/** Filter keys by key hash */
|
|
1882
1957
|
key_hash?: string;
|
|
1883
|
-
/** Filter keys by key alias. Exact match by default; set substring_matching=true
|
|
1958
|
+
/** Filter keys by key alias. Exact match by default; set substring_matching=true for case-insensitive substring matching. */
|
|
1884
1959
|
key_alias?: string;
|
|
1960
|
+
/** Combined search: matches keys whose token (key hash) equals the value OR whose key_alias contains it (case-insensitive). */
|
|
1961
|
+
search?: string;
|
|
1885
1962
|
/** Return full key object */
|
|
1886
1963
|
return_full_object?: boolean;
|
|
1887
1964
|
/** Include all keys for teams that user is an admin of. */
|
|
@@ -1894,7 +1971,7 @@ export interface ListKeysKeyListGetRequest {
|
|
|
1894
1971
|
sort_order?: string;
|
|
1895
1972
|
/** Expand related objects (e.g. 'user') */
|
|
1896
1973
|
expand?: ListKeysKeyListGetRequestExpandList;
|
|
1897
|
-
/** Filter by status (
|
|
1974
|
+
/** Filter by status: 'active' (not blocked, not expired), 'expired' (not blocked, past expiry), 'revoked' (blocked) or 'deleted' (archived keys). Omit to return live keys regardless of status. */
|
|
1898
1975
|
status?: string;
|
|
1899
1976
|
/** Filter keys by project ID */
|
|
1900
1977
|
project_id?: string;
|
|
@@ -1902,7 +1979,7 @@ export interface ListKeysKeyListGetRequest {
|
|
|
1902
1979
|
access_group_id?: string;
|
|
1903
1980
|
/** Filter keys by agent ID */
|
|
1904
1981
|
agent_id?: string;
|
|
1905
|
-
/** If true (proxy admins only)
|
|
1982
|
+
/** If true, match key_alias (any caller) and user_id (proxy admins only) as case-insensitive substrings instead of exact values. Defaults to false: /key/list matched these exactly before substring search was added, and an exact user_id filter must never return another user's keys. */
|
|
1906
1983
|
substring_matching?: boolean;
|
|
1907
1984
|
/** Filter keys by expiration. 'expired' returns keys whose expires is in the past; 'active' returns keys that never expire or expire in the future. Omit to return keys regardless of expiration. */
|
|
1908
1985
|
expires?: string;
|
|
@@ -1916,6 +1993,7 @@ export const ListKeysKeyListGetRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
1916
1993
|
organization_id: S.optional(S.String.pipe(T.Query())),
|
|
1917
1994
|
key_hash: S.optional(S.String.pipe(T.Query())),
|
|
1918
1995
|
key_alias: S.optional(S.String.pipe(T.Query())),
|
|
1996
|
+
search: S.optional(S.String.pipe(T.Query())),
|
|
1919
1997
|
return_full_object: S.optional(S.Boolean.pipe(T.Query())),
|
|
1920
1998
|
include_team_keys: S.optional(S.Boolean.pipe(T.Query())),
|
|
1921
1999
|
include_created_by_keys: S.optional(S.Boolean.pipe(T.Query())),
|
|
@@ -2061,6 +2139,11 @@ export const LiteLLMObjectPermissionTableSearchToolsList =
|
|
|
2061
2139
|
S.String,
|
|
2062
2140
|
) as any as S.Schema<LiteLLMObjectPermissionTableSearchToolsList>;
|
|
2063
2141
|
|
|
2142
|
+
export type LiteLLMObjectPermissionTableSkillsList = Array<string>;
|
|
2143
|
+
export const LiteLLMObjectPermissionTableSkillsList = /*@__PURE__*/ S.Array(
|
|
2144
|
+
S.String,
|
|
2145
|
+
) as any as S.Schema<LiteLLMObjectPermissionTableSkillsList>;
|
|
2146
|
+
|
|
2064
2147
|
export type LiteLLMObjectPermissionTableVectorStoresList = Array<string>;
|
|
2065
2148
|
export const LiteLLMObjectPermissionTableVectorStoresList =
|
|
2066
2149
|
/*@__PURE__*/ S.Array(
|
|
@@ -2080,6 +2163,7 @@ export interface LiteLLMObjectPermissionTable {
|
|
|
2080
2163
|
models?: LiteLLMObjectPermissionTableModelsList | null;
|
|
2081
2164
|
object_permission_id: string;
|
|
2082
2165
|
search_tools?: LiteLLMObjectPermissionTableSearchToolsList | null;
|
|
2166
|
+
skills?: LiteLLMObjectPermissionTableSkillsList | null;
|
|
2083
2167
|
vector_stores?: LiteLLMObjectPermissionTableVectorStoresList | null;
|
|
2084
2168
|
}
|
|
2085
2169
|
export const LiteLLMObjectPermissionTable = /*@__PURE__*/ S.suspend(() =>
|
|
@@ -2109,6 +2193,7 @@ export const LiteLLMObjectPermissionTable = /*@__PURE__*/ S.suspend(() =>
|
|
|
2109
2193
|
search_tools: S.optional(
|
|
2110
2194
|
S.NullOr(LiteLLMObjectPermissionTableSearchToolsList),
|
|
2111
2195
|
),
|
|
2196
|
+
skills: S.optional(S.NullOr(LiteLLMObjectPermissionTableSkillsList)),
|
|
2112
2197
|
vector_stores: S.optional(
|
|
2113
2198
|
S.NullOr(LiteLLMObjectPermissionTableVectorStoresList),
|
|
2114
2199
|
),
|
|
@@ -2234,6 +2319,14 @@ export const UserAPIKeyAuthTeamModelAliasesMap = /*@__PURE__*/ S.Record(
|
|
|
2234
2319
|
S.Unknown,
|
|
2235
2320
|
) as any as S.Schema<UserAPIKeyAuthTeamModelAliasesMap>;
|
|
2236
2321
|
|
|
2322
|
+
export type UserAPIKeyAuthTeamModelMaxBudgetMap = {
|
|
2323
|
+
[key: string]: unknown | undefined;
|
|
2324
|
+
};
|
|
2325
|
+
export const UserAPIKeyAuthTeamModelMaxBudgetMap = /*@__PURE__*/ S.Record(
|
|
2326
|
+
S.String,
|
|
2327
|
+
S.Unknown,
|
|
2328
|
+
) as any as S.Schema<UserAPIKeyAuthTeamModelMaxBudgetMap>;
|
|
2329
|
+
|
|
2237
2330
|
export type UserAPIKeyAuthTeamModelsList = Array<unknown>;
|
|
2238
2331
|
export const UserAPIKeyAuthTeamModelsList = /*@__PURE__*/ S.Array(
|
|
2239
2332
|
S.Unknown,
|
|
@@ -2291,6 +2384,7 @@ export interface UserAPIKeyAuth {
|
|
|
2291
2384
|
end_user_model_max_budget?: UserAPIKeyAuthEndUserModelMaxBudgetMap | null;
|
|
2292
2385
|
end_user_object_permission?: LiteLLMObjectPermissionTable | null;
|
|
2293
2386
|
end_user_rpm_limit?: number | null;
|
|
2387
|
+
end_user_tpd_limit?: number | null;
|
|
2294
2388
|
end_user_tpm_limit?: number | null;
|
|
2295
2389
|
expires?: string | null;
|
|
2296
2390
|
is_session_token?: boolean;
|
|
@@ -2342,14 +2436,18 @@ export interface UserAPIKeyAuth {
|
|
|
2342
2436
|
team_member_tpm_limit?: number | null;
|
|
2343
2437
|
team_metadata?: UserAPIKeyAuthTeamMetadataMap | null;
|
|
2344
2438
|
team_model_aliases?: UserAPIKeyAuthTeamModelAliasesMap | null;
|
|
2439
|
+
team_model_max_budget?: UserAPIKeyAuthTeamModelMaxBudgetMap | null;
|
|
2345
2440
|
team_models?: UserAPIKeyAuthTeamModelsList;
|
|
2346
2441
|
team_object_permission?: LiteLLMObjectPermissionTable | null;
|
|
2347
2442
|
team_object_permission_id?: string | null;
|
|
2348
2443
|
team_rpm_limit?: number | null;
|
|
2349
2444
|
team_soft_budget?: number | null;
|
|
2350
2445
|
team_spend?: number | null;
|
|
2446
|
+
team_tpd_limit?: number | null;
|
|
2351
2447
|
team_tpm_limit?: number | null;
|
|
2352
2448
|
token?: string | null;
|
|
2449
|
+
total_spend?: number;
|
|
2450
|
+
tpd_limit?: number | null;
|
|
2353
2451
|
tpm_limit?: number | null;
|
|
2354
2452
|
tpm_limit_per_model?: UserAPIKeyAuthTpmLimitPerModelMap | null;
|
|
2355
2453
|
updated_at?: string | null;
|
|
@@ -2397,6 +2495,7 @@ export const UserAPIKeyAuth = /*@__PURE__*/ S.suspend(() =>
|
|
|
2397
2495
|
S.NullOr(LiteLLMObjectPermissionTable),
|
|
2398
2496
|
),
|
|
2399
2497
|
end_user_rpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2498
|
+
end_user_tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
2400
2499
|
end_user_tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2401
2500
|
expires: S.optional(S.NullOr(S.String)),
|
|
2402
2501
|
is_session_token: S.optional(S.Boolean),
|
|
@@ -2454,14 +2553,20 @@ export const UserAPIKeyAuth = /*@__PURE__*/ S.suspend(() =>
|
|
|
2454
2553
|
team_member_tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2455
2554
|
team_metadata: S.optional(S.NullOr(UserAPIKeyAuthTeamMetadataMap)),
|
|
2456
2555
|
team_model_aliases: S.optional(S.NullOr(UserAPIKeyAuthTeamModelAliasesMap)),
|
|
2556
|
+
team_model_max_budget: S.optional(
|
|
2557
|
+
S.NullOr(UserAPIKeyAuthTeamModelMaxBudgetMap),
|
|
2558
|
+
),
|
|
2457
2559
|
team_models: S.optional(UserAPIKeyAuthTeamModelsList),
|
|
2458
2560
|
team_object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionTable)),
|
|
2459
2561
|
team_object_permission_id: S.optional(S.NullOr(S.String)),
|
|
2460
2562
|
team_rpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2461
2563
|
team_soft_budget: S.optional(S.NullOr(S.Number)),
|
|
2462
2564
|
team_spend: S.optional(S.NullOr(S.Number)),
|
|
2565
|
+
team_tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
2463
2566
|
team_tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2464
2567
|
token: S.optional(S.NullOr(S.String)),
|
|
2568
|
+
total_spend: S.optional(S.Number),
|
|
2569
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
2465
2570
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2466
2571
|
tpm_limit_per_model: S.optional(
|
|
2467
2572
|
S.NullOr(UserAPIKeyAuthTpmLimitPerModelMap),
|
|
@@ -2649,6 +2754,7 @@ export interface LiteLLMDeletedVerificationToken {
|
|
|
2649
2754
|
object_permission?: LiteLLMObjectPermissionTable | null;
|
|
2650
2755
|
object_permission_id?: string | null;
|
|
2651
2756
|
org_id?: string | null;
|
|
2757
|
+
organization_id?: string | null;
|
|
2652
2758
|
permissions?: LiteLLMDeletedVerificationTokenPermissionsMap;
|
|
2653
2759
|
project_id?: string | null;
|
|
2654
2760
|
rotation_count?: number | null;
|
|
@@ -2660,6 +2766,8 @@ export interface LiteLLMDeletedVerificationToken {
|
|
|
2660
2766
|
spend?: number;
|
|
2661
2767
|
team_id?: string | null;
|
|
2662
2768
|
token?: string | null;
|
|
2769
|
+
total_spend?: number;
|
|
2770
|
+
tpd_limit?: number | null;
|
|
2663
2771
|
tpm_limit?: number | null;
|
|
2664
2772
|
updated_at?: string | null;
|
|
2665
2773
|
updated_by?: string | null;
|
|
@@ -2718,6 +2826,7 @@ export const LiteLLMDeletedVerificationToken = /*@__PURE__*/ S.suspend(() =>
|
|
|
2718
2826
|
object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionTable)),
|
|
2719
2827
|
object_permission_id: S.optional(S.NullOr(S.String)),
|
|
2720
2828
|
org_id: S.optional(S.NullOr(S.String)),
|
|
2829
|
+
organization_id: S.optional(S.NullOr(S.String)),
|
|
2721
2830
|
permissions: S.optional(LiteLLMDeletedVerificationTokenPermissionsMap),
|
|
2722
2831
|
project_id: S.optional(S.NullOr(S.String)),
|
|
2723
2832
|
rotation_count: S.optional(S.NullOr(S.Number)),
|
|
@@ -2731,6 +2840,8 @@ export const LiteLLMDeletedVerificationToken = /*@__PURE__*/ S.suspend(() =>
|
|
|
2731
2840
|
spend: S.optional(S.Number),
|
|
2732
2841
|
team_id: S.optional(S.NullOr(S.String)),
|
|
2733
2842
|
token: S.optional(S.NullOr(S.String)),
|
|
2843
|
+
total_spend: S.optional(S.Number),
|
|
2844
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
2734
2845
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
2735
2846
|
updated_at: S.optional(S.NullOr(S.String)),
|
|
2736
2847
|
updated_by: S.optional(S.NullOr(S.String)),
|
|
@@ -2941,6 +3052,8 @@ export interface LiteLLMVerificationToken {
|
|
|
2941
3052
|
spend?: number;
|
|
2942
3053
|
team_id?: string | null;
|
|
2943
3054
|
token?: string | null;
|
|
3055
|
+
total_spend?: number;
|
|
3056
|
+
tpd_limit?: number | null;
|
|
2944
3057
|
tpm_limit?: number | null;
|
|
2945
3058
|
updated_at?: string | null;
|
|
2946
3059
|
updated_by?: string | null;
|
|
@@ -3003,6 +3116,8 @@ export const LiteLLMVerificationToken = /*@__PURE__*/ S.suspend(() =>
|
|
|
3003
3116
|
spend: S.optional(S.Number),
|
|
3004
3117
|
team_id: S.optional(S.NullOr(S.String)),
|
|
3005
3118
|
token: S.optional(S.NullOr(S.String)),
|
|
3119
|
+
total_spend: S.optional(S.Number),
|
|
3120
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
3006
3121
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
3007
3122
|
updated_at: S.optional(S.NullOr(S.String)),
|
|
3008
3123
|
updated_by: S.optional(S.NullOr(S.String)),
|
|
@@ -3304,6 +3419,7 @@ export interface RegenerateKeyRequest {
|
|
|
3304
3419
|
disable_global_guardrails?: boolean | null;
|
|
3305
3420
|
duration?: string | null;
|
|
3306
3421
|
enable_prompt_caching?: boolean | null;
|
|
3422
|
+
end_user_budget_id?: string | null;
|
|
3307
3423
|
enforced_params?: RegenerateKeyRequestEnforcedParamsList | null;
|
|
3308
3424
|
grace_period?: string | null;
|
|
3309
3425
|
guardrails?: RegenerateKeyRequestGuardrailsList | null;
|
|
@@ -3339,6 +3455,7 @@ export interface RegenerateKeyRequest {
|
|
|
3339
3455
|
tags?: RegenerateKeyRequestTagsList | null;
|
|
3340
3456
|
team_id?: string | null;
|
|
3341
3457
|
throttle_on_budget_exceeded?: boolean | null;
|
|
3458
|
+
tpd_limit?: number | null;
|
|
3342
3459
|
tpm_limit?: number | null;
|
|
3343
3460
|
tpm_limit_type?: RegenerateKeyRequestTpmLimitType | (string & {}) | null;
|
|
3344
3461
|
user_id?: string | null;
|
|
@@ -3376,6 +3493,7 @@ export const RegenerateKeyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
3376
3493
|
disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
|
|
3377
3494
|
duration: S.optional(S.NullOr(S.String)),
|
|
3378
3495
|
enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
|
|
3496
|
+
end_user_budget_id: S.optional(S.NullOr(S.String)),
|
|
3379
3497
|
enforced_params: S.optional(
|
|
3380
3498
|
S.NullOr(RegenerateKeyRequestEnforcedParamsList),
|
|
3381
3499
|
),
|
|
@@ -3413,6 +3531,7 @@ export const RegenerateKeyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
3413
3531
|
tags: S.optional(S.NullOr(RegenerateKeyRequestTagsList)),
|
|
3414
3532
|
team_id: S.optional(S.NullOr(S.String)),
|
|
3415
3533
|
throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
|
|
3534
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
3416
3535
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
3417
3536
|
tpm_limit_type: S.optional(S.NullOr(RegenerateKeyRequestTpmLimitType)),
|
|
3418
3537
|
user_id: S.optional(S.NullOr(S.String)),
|
|
@@ -3744,6 +3863,7 @@ export interface UpdateKeyFnKeyUpdatePostRequest {
|
|
|
3744
3863
|
disable_global_guardrails?: boolean | null;
|
|
3745
3864
|
duration?: string | null;
|
|
3746
3865
|
enable_prompt_caching?: boolean | null;
|
|
3866
|
+
end_user_budget_id?: string | null;
|
|
3747
3867
|
enforced_params?: UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList | null;
|
|
3748
3868
|
guardrails?: UpdateKeyFnKeyUpdatePostRequestGuardrailsList | null;
|
|
3749
3869
|
key?: string | null;
|
|
@@ -3760,6 +3880,8 @@ export interface UpdateKeyFnKeyUpdatePostRequest {
|
|
|
3760
3880
|
organization_id?: string | null;
|
|
3761
3881
|
permissions?: UpdateKeyFnKeyUpdatePostRequestPermissionsMap | null;
|
|
3762
3882
|
policies?: UpdateKeyFnKeyUpdatePostRequestPoliciesList | null;
|
|
3883
|
+
/** Omit to retain the project, or send null to detach. Assigning a different project is not supported. */
|
|
3884
|
+
project_id?: string | null;
|
|
3763
3885
|
prompts?: UpdateKeyFnKeyUpdatePostRequestPromptsList | null;
|
|
3764
3886
|
rotation_interval?: string | null;
|
|
3765
3887
|
router_settings?: UpdateRouterConfig | null;
|
|
@@ -3768,6 +3890,7 @@ export interface UpdateKeyFnKeyUpdatePostRequest {
|
|
|
3768
3890
|
| UpdateKeyFnKeyUpdatePostRequestRpmLimitType
|
|
3769
3891
|
| (string & {})
|
|
3770
3892
|
| null;
|
|
3893
|
+
soft_budget?: number | null;
|
|
3771
3894
|
spend?: number | null;
|
|
3772
3895
|
tag_rpm_limit?: UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap | null;
|
|
3773
3896
|
tags?: UpdateKeyFnKeyUpdatePostRequestTagsList | null;
|
|
@@ -3775,6 +3898,7 @@ export interface UpdateKeyFnKeyUpdatePostRequest {
|
|
|
3775
3898
|
temp_budget_expiry?: string | null;
|
|
3776
3899
|
temp_budget_increase?: number | null;
|
|
3777
3900
|
throttle_on_budget_exceeded?: boolean | null;
|
|
3901
|
+
tpd_limit?: number | null;
|
|
3778
3902
|
tpm_limit?: number | null;
|
|
3779
3903
|
tpm_limit_type?:
|
|
3780
3904
|
| UpdateKeyFnKeyUpdatePostRequestTpmLimitType
|
|
@@ -3821,6 +3945,7 @@ export const UpdateKeyFnKeyUpdatePostRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
3821
3945
|
disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
|
|
3822
3946
|
duration: S.optional(S.NullOr(S.String)),
|
|
3823
3947
|
enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
|
|
3948
|
+
end_user_budget_id: S.optional(S.NullOr(S.String)),
|
|
3824
3949
|
enforced_params: S.optional(
|
|
3825
3950
|
S.NullOr(UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList),
|
|
3826
3951
|
),
|
|
@@ -3851,6 +3976,7 @@ export const UpdateKeyFnKeyUpdatePostRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
3851
3976
|
S.NullOr(UpdateKeyFnKeyUpdatePostRequestPermissionsMap),
|
|
3852
3977
|
),
|
|
3853
3978
|
policies: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestPoliciesList)),
|
|
3979
|
+
project_id: S.optional(S.NullOr(S.String)),
|
|
3854
3980
|
prompts: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestPromptsList)),
|
|
3855
3981
|
rotation_interval: S.optional(S.NullOr(S.String)),
|
|
3856
3982
|
router_settings: S.optional(S.NullOr(UpdateRouterConfig)),
|
|
@@ -3858,6 +3984,7 @@ export const UpdateKeyFnKeyUpdatePostRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
3858
3984
|
rpm_limit_type: S.optional(
|
|
3859
3985
|
S.NullOr(UpdateKeyFnKeyUpdatePostRequestRpmLimitType),
|
|
3860
3986
|
),
|
|
3987
|
+
soft_budget: S.optional(S.NullOr(S.Number)),
|
|
3861
3988
|
spend: S.optional(S.NullOr(S.Number)),
|
|
3862
3989
|
tag_rpm_limit: S.optional(
|
|
3863
3990
|
S.NullOr(UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap),
|
|
@@ -3867,6 +3994,7 @@ export const UpdateKeyFnKeyUpdatePostRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
3867
3994
|
temp_budget_expiry: S.optional(S.NullOr(S.String)),
|
|
3868
3995
|
temp_budget_increase: S.optional(S.NullOr(S.Number)),
|
|
3869
3996
|
throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
|
|
3997
|
+
tpd_limit: S.optional(S.NullOr(S.Number)),
|
|
3870
3998
|
tpm_limit: S.optional(S.NullOr(S.Number)),
|
|
3871
3999
|
tpm_limit_type: S.optional(
|
|
3872
4000
|
S.NullOr(UpdateKeyFnKeyUpdatePostRequestTpmLimitType),
|
|
@@ -3893,7 +4021,7 @@ export type BulkUpdateKeysKeyBulkUpdatePostError =
|
|
|
3893
4021
|
| Forbidden
|
|
3894
4022
|
| UnprocessableEntity
|
|
3895
4023
|
| LitellmOpError;
|
|
3896
|
-
/** Bulk Update Keys Bulk update multiple keys at once. This endpoint allows updating multiple keys in a single request. Each key update is processed independently - if some updates fail, others will still succeed. Parameters: - keys: List[BulkUpdateKeyRequestItem] - List of key update requests, each containing: - key: str - The key identifier (token) to update - budget_id: Optional[str] - Budget ID associated with the key - max_budget: Optional[float] - Max budget for key - team_id: Optional[str] - Team ID associated with key - tags: Optional[List[str]] - Tags for organizing keys Returns: - total_requested: int - Total number of keys requested for update - successful_updates: List[SuccessfulKeyUpdate] - List of successfully updated keys with their updated info - failed_updates: List[FailedKeyUpdate] - List of failed updates with key_info and failed_reason Example request: ```bash curl --location 'http://0.0.0.0:4000/key/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "keys": [ { "key": "sk-1234", "max_budget": 100.0, "team_id": "team-123", "tags": ["production", "api"] }, { "key": "sk-5678", "budget_id": "budget-456", "tags": ["staging"] } ] }' ``` */
|
|
4024
|
+
/** Bulk Update Keys Bulk update multiple keys at once. This endpoint allows updating multiple keys in a single request. Each key update is processed independently - if some updates fail, others will still succeed. Parameters: - keys: List[BulkUpdateKeyRequestItem] - List of key update requests, each containing: - key: str - The key identifier (token) to update - budget_id: Optional[str] - Budget ID associated with the key - max_budget: Optional[float] - Max budget for key - team_id: Optional[str] - Team ID associated with key - tags: Optional[List[str]] - Tags for organizing keys - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission, as on /key/update Only the fields an item carries are written: a field left out keeps its current value, and a field sent explicitly, null included, is applied exactly as /key/update applies it. Returns: - total_requested: int - Total number of keys requested for update - successful_updates: List[SuccessfulKeyUpdate] - List of successfully updated keys with their updated info - failed_updates: List[FailedKeyUpdate] - List of failed updates with key_info and failed_reason Example request: ```bash curl --location 'http://0.0.0.0:4000/key/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "keys": [ { "key": "sk-1234", "max_budget": 100.0, "team_id": "team-123", "tags": ["production", "api"] }, { "key": "sk-5678", "budget_id": "budget-456", "tags": ["staging"] } ] }' ``` */
|
|
3897
4025
|
export const bulkUpdateKeysKeyBulkUpdatePost: API.OperationMethod<
|
|
3898
4026
|
BulkUpdateKeysKeyBulkUpdatePostRequest,
|
|
3899
4027
|
BulkUpdateKeyResponse,
|
|
@@ -3927,6 +4055,8 @@ export const bulkUpdateTeamKeysTeamKeyBulkUpdatePost: API.OperationMethod<
|
|
|
3927
4055
|
export type DeleteKeyFnKeyDeletePostError =
|
|
3928
4056
|
| BadRequest
|
|
3929
4057
|
| UnprocessableEntity
|
|
4058
|
+
| KeyNotFound
|
|
4059
|
+
| KeyDeleteForbidden
|
|
3930
4060
|
| LitellmOpError;
|
|
3931
4061
|
/** Delete Key Fn Delete a key from the key management system. Parameters:: - keys (List[str]): A list of keys or hashed keys to delete. Example {"keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]} - key_aliases (List[str]): A list of key aliases to delete. Can be passed instead of `keys`.Example {"key_aliases": ["alias1", "alias2"]} Returns: - deleted_keys (List[str]): A list of deleted keys. Example {"deleted_keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]} Example: ```bash curl --location 'http://0.0.0.0:4000/key/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "keys": ["sk-QWrxEynunsNpV1zT48HIrw"] }' ``` Raises: HTTPException: If an error occurs during key deletion. */
|
|
3932
4062
|
export const deleteKeyFnKeyDeletePost: API.OperationMethod<
|
|
@@ -3937,7 +4067,7 @@ export const deleteKeyFnKeyDeletePost: API.OperationMethod<
|
|
|
3937
4067
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3938
4068
|
input: DeleteKeyFnKeyDeletePostRequest,
|
|
3939
4069
|
output: DeleteKeyFnKeyDeletePostResponse,
|
|
3940
|
-
errors: [BadRequest, UnprocessableEntity],
|
|
4070
|
+
errors: [BadRequest, UnprocessableEntity, KeyNotFound, KeyDeleteForbidden],
|
|
3941
4071
|
protocol: LitellmProtocol,
|
|
3942
4072
|
retry: Retry.Retry,
|
|
3943
4073
|
}));
|
|
@@ -3947,7 +4077,7 @@ export type GenerateKeyFnKeyGeneratePostError =
|
|
|
3947
4077
|
| Forbidden
|
|
3948
4078
|
| UnprocessableEntity
|
|
3949
4079
|
| LitellmOpError;
|
|
3950
|
-
/** Generate Key Fn Generate an API key based on the provided data. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - key_alias: Optional[str] - User defined key alias - key: Optional[str] - User defined key value. Must start with 'sk-' and be at least 16 characters long. If not set, a 16-digit unique sk-key is created for you. - team_id: Optional[str] - The team id of the key - user_id: Optional[str] - The user id of the key - agent_id: Optional[str] - The agent id associated with the key. - organization_id: Optional[str] - The organization id of the key. If not set, and team_id is set, the organization id will be the same as the team id. If conflict, an error will be raised. - project_id: Optional[str] - The project id of the key. When set, models and max_budget are validated against the project's limits. - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models - config: Optional[dict] - any key-specific configs, overrides config in config.yaml - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key - max_budget: Optional[float] - Specify max budget for a given key. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - guardrails: Optional[List[str]] - List of active guardrails for the key - policies: Optional[List[str]] - List of policy names to apply to the key. Policies define guardrails, conditions, and inheritance rules. - disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key. - throttle_on_budget_exceeded: Optional[bool] - When the key exceeds its max_budget, throttle its tpm/rpm to the global budget_exceeded_throttle_percentage instead of blocking the key entirely. - enable_prompt_caching: Optional[bool] - Auto-inject prompt caching breakpoints (Anthropic cache_control markers) on requests made with this key. Anthropic and
|
|
4080
|
+
/** Generate Key Fn Generate an API key based on the provided data. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - key_alias: Optional[str] - User defined key alias - key: Optional[str] - User defined key value. Must start with 'sk-' and be at least 16 characters long. If not set, a 16-digit unique sk-key is created for you. - team_id: Optional[str] - The team id of the key - user_id: Optional[str] - The user id of the key - agent_id: Optional[str] - The agent id associated with the key. - organization_id: Optional[str] - The organization id of the key. If not set, and team_id is set, the organization id will be the same as the team id. If conflict, an error will be raised. - project_id: Optional[str] - The project id of the key. When set, models and max_budget are validated against the project's limits. - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - end_user_budget_id: Optional[str] - Proxy admin only. Budget id applied to end users first seen through this key that carry no budget of their own. Takes precedence over `litellm_settings.max_end_user_budget_id`. - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models - config: Optional[dict] - any key-specific configs, overrides config in config.yaml - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key - max_budget: Optional[float] - Specify max budget for a given key. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - guardrails: Optional[List[str]] - List of active guardrails for the key - policies: Optional[List[str]] - List of policy names to apply to the key. Policies define guardrails, conditions, and inheritance rules. - disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key. - throttle_on_budget_exceeded: Optional[bool] - When the key exceeds its max_budget, throttle its tpm/rpm to the global budget_exceeded_throttle_percentage instead of blocking the key entirely. - enable_prompt_caching: Optional[bool] - Auto-inject prompt caching breakpoints (Anthropic cache_control markers) on requests made with this key. Supported Claude models on Anthropic, Bedrock, Vertex AI, and Azure AI only. - permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false} - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget. - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit. - model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit. - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. Falls back to the team setting, then to the built-in estimate. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above. Example - {"gpt-4": 4096, "gpt-3.5-turbo": 1024}. Takes precedence over the key-wide value. - mcp_rpm_limit: Optional[dict] - key-specific per-MCP-server rpm limit, keyed by MCP server name (alias if set, else the configured name). Example - {"github": 100, "slack": 200}. IF null or {} then no MCP-specific rpm limit. - tag_rpm_limit: Optional[dict] - key-specific per-request-tag rpm limit, keyed by request tag. Example - {"cell-1": 1000, "cell-2": 500}. Each tag gets an independent counter; requests whose tag is absent fall back to the key-level rpm limit. - tpm_limit_type: Optional[str] - Type of tpm limit. Options: "best_effort_throughput" (no error if we're overallocating tpm), "guaranteed_throughput" (raise an error if we're overallocating tpm), "dynamic" (dynamically exceed limit when no 429 errors). Defaults to "best_effort_throughput". - rpm_limit_type: Optional[str] - Type of rpm limit. Options: "best_effort_throughput" (no error if we're overallocating rpm), "guaranteed_throughput" (raise an error if we're overallocating rpm), "dynamic" (dynamically exceed limit when no 429 errors). Defaults to "best_effort_throughput". - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request - blocked: Optional[bool] - Whether the key is blocked. - rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute) - tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute) - tpd_limit: Optional[int] - Specify tpd limit for a given key (Tokens per day). Charged by batch submissions instead of tpm_limit/rpm_limit. - soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached. - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - allowed_passthrough_routes: Optional[list] - List of allowed pass through endpoints for the key. Store the actual endpoint or store a wildcard pattern for a set of endpoints. Example - ["/my-custom-endpoint"]. Use this instead of allowed_routes, if you just want to specify which pass through endpoints the key can access, without specifying the routes. If allowed_routes is specified, allowed_pass_through_endpoints is ignored. - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. - key_type: Optional[str] - Type of key that determines default allowed routes. Options: "llm_api" (can call LLM API routes), "management" (can call management routes), "read_only" (can only call info/read routes), "default" (uses default allowed routes). Defaults to "default". - prompts: Optional[List[str]] - List of allowed prompts for the key. If specified, the key will only be able to use these specific prompts. - auto_rotate: Optional[bool] - Whether this key should be automatically rotated (regenerated) - rotation_interval: Optional[str] - How often to auto-rotate this key (e.g., '30s', '30m', '30h', '30d'). Required if auto_rotate=True. - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. - router_settings: Optional[UpdateRouterConfig] - key-specific router settings. Example - {"model_group_retry_policy": {"gpt-4": {"RateLimitErrorRetries": 5}}}. IF null or {} then no router settings. - access_group_ids: Optional[List[str]] - List of access group IDs to associate with the key. Access groups define which models a key can access. Example - ["access_group_1", "access_group_2"]. - budget_limits: Optional[list] - List of concurrent budget windows for the key. Each window specifies a budget_limit, time_period, and optional budget_duration. Example - [{"budget_limit": 10.0, "time_period": "1d"}, {"budget_limit": 50.0, "time_period": "7d"}]. Examples: 1. Allow users to turn on/off pii masking ```bash curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "permissions": {"allow_pii_controls": true} }' ``` Returns: - key: (str) The generated api key - expires: (datetime) Datetime object for when key expires. - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. */
|
|
3951
4081
|
export const generateKeyFnKeyGeneratePost: API.OperationMethod<
|
|
3952
4082
|
GenerateKeyFnKeyGeneratePostRequest,
|
|
3953
4083
|
GenerateKeyResponse,
|
|
@@ -3964,7 +4094,7 @@ export const generateKeyFnKeyGeneratePost: API.OperationMethod<
|
|
|
3964
4094
|
export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostError =
|
|
3965
4095
|
| UnprocessableEntity
|
|
3966
4096
|
| LitellmOpError;
|
|
3967
|
-
/** Generate Service Account Key Fn Generate a Service Account API key based on the provided data. This key does not belong to any user. It belongs to the team. Why use a service account key? - Prevent key from being deleted when user is deleted. - Apply team limits, not team member limits to key. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - key_alias: Optional[str] - User defined key alias - key: Optional[str] - User defined key value. Must start with 'sk-' and be at least 16 characters long. If not set, a 16-digit unique sk-key is created for you. - team_id: Optional[str] - The team id of the key - user_id: Optional[str] - [NON-FUNCTIONAL] THIS WILL BE IGNORED. The user id of the key - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models - config: Optional[dict] - any key-specific configs, overrides config in config.yaml - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key - max_budget: Optional[float] - Specify max budget for a given key. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - guardrails: Optional[List[str]] - List of active guardrails for the key - permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false} - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget. - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit. - model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit. - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. Falls back to the team setting, then to the built-in estimate. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above. Example - {"gpt-4": 4096, "gpt-3.5-turbo": 1024}. Takes precedence over the key-wide value. - mcp_rpm_limit: Optional[dict] - key-specific per-MCP-server rpm limit, keyed by MCP server name (alias if set, else the configured name). Example - {"github": 100, "slack": 200}. IF null or {} then no MCP-specific rpm limit. - tpm_limit_type: Optional[str] - TPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - rpm_limit_type: Optional[str] - RPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request - blocked: Optional[bool] - Whether the key is blocked. - rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute) - tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute) - soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached. - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. Examples: - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. 1. Allow users to turn on/off pii masking ```bash curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "permissions": {"allow_pii_controls": true} }' ``` Returns: - key: (str) The generated api key - expires: (datetime) Datetime object for when key expires. - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. */
|
|
4097
|
+
/** Generate Service Account Key Fn Generate a Service Account API key based on the provided data. This key does not belong to any user. It belongs to the team. Why use a service account key? - Prevent key from being deleted when user is deleted. - Apply team limits, not team member limits to key. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - key_alias: Optional[str] - User defined key alias - key: Optional[str] - User defined key value. Must start with 'sk-' and be at least 16 characters long. If not set, a 16-digit unique sk-key is created for you. - team_id: Optional[str] - The team id of the key - user_id: Optional[str] - [NON-FUNCTIONAL] THIS WILL BE IGNORED. The user id of the key - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - end_user_budget_id: Optional[str] - Proxy admin only. Budget id applied to end users first seen through this key that carry no budget of their own. Omit to keep the current value, pass an empty string to clear it. - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models - config: Optional[dict] - any key-specific configs, overrides config in config.yaml - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key - max_budget: Optional[float] - Specify max budget for a given key. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - guardrails: Optional[List[str]] - List of active guardrails for the key - permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false} - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget. - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit. - model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit. - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. Falls back to the team setting, then to the built-in estimate. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above. Example - {"gpt-4": 4096, "gpt-3.5-turbo": 1024}. Takes precedence over the key-wide value. - mcp_rpm_limit: Optional[dict] - key-specific per-MCP-server rpm limit, keyed by MCP server name (alias if set, else the configured name). Example - {"github": 100, "slack": 200}. IF null or {} then no MCP-specific rpm limit. - tpm_limit_type: Optional[str] - TPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - rpm_limit_type: Optional[str] - RPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request - blocked: Optional[bool] - Whether the key is blocked. - rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute) - tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute) - tpd_limit: Optional[int] - Specify tpd limit for a given key (Tokens per day). Charged by batch submissions instead of tpm_limit/rpm_limit. - soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached. - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. Examples: - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. 1. Allow users to turn on/off pii masking ```bash curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "permissions": {"allow_pii_controls": true} }' ``` Returns: - key: (str) The generated api key - expires: (datetime) Datetime object for when key expires. - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. */
|
|
3968
4098
|
export const generateServiceAccountKeyFnKeyServiceAccountGeneratePost: API.OperationMethod<
|
|
3969
4099
|
GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest,
|
|
3970
4100
|
GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse,
|
|
@@ -3979,7 +4109,7 @@ export const generateServiceAccountKeyFnKeyServiceAccountGeneratePost: API.Opera
|
|
|
3979
4109
|
}));
|
|
3980
4110
|
|
|
3981
4111
|
export type GetInfoKeyFnKeyInfoError = UnprocessableEntity | LitellmOpError;
|
|
3982
|
-
/** Info Key Fn Retrieve information about a key. Parameters: - key: str | None (query parameter) - The key to look up. Accepts the plaintext key or its hash. Defaults to the key in the Authorization header. Returns: - key: str - The key that was looked up, echoed back as it was passed in - info: dict - The key's row, minus the hashed token - key_alias: str | None - User-friendly key alias - spend: float - Amount spent by the key. When budget_duration is set this covers only the current budget window, not the key's lifetime - max_budget: float | None - Max budget for the key, enforced against spend - budget_duration: str | None - Budget reset period ("30d", "1h", etc.) - budget_reset_at: datetime | None - When the current budget window ends and spend is next reset to 0, not when it was last reset. Reset times snap to standard boundaries in the configured timezone (30d and 1mo land on the 1st of the month, 7d on Monday, 1h on the hour), so subtracting budget_duration from it does not give the window's start - model_max_budget: dict - Per-model budgets, e.g. {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - model_max_budget_usage: dict | None - Current-window spend per model, present only when the key has per-model budgets - models: list - Model_name's the key is allowed to call - tpm_limit / rpm_limit: int | None - Tokens and requests per minute limits - metadata: dict - Metadata for the key, e.g. {"team": "core-infra"} - blocked: bool | None - Whether the key is blocked - expires: datetime | None - When the key stops authenticating requests - last_active: datetime | None - When the key was last used - object_permission: dict | None - Resolved vector store / MCP permissions when the key has an object_permission_id Example Curl: ``` curl -X GET "http://0.0.0.0:4000/key/info?key=
|
|
4112
|
+
/** Info Key Fn Retrieve information about a key. Parameters: - key: str | None (query parameter) - The key to look up. Accepts the plaintext key or its hash; prefer the hash, since a query parameter is recorded verbatim by any HTTP access log in front of the proxy. Defaults to the key in the Authorization header. Returns: - key: str - The key that was looked up, echoed back as it was passed in - info: dict - The key's row, minus the hashed token. Deleted keys are served from the LiteLLM_DeletedVerificationToken archive and carry deleted_at / deleted_by - status: "active" | "expired" | "revoked" | "deleted" - Derived from blocked, expires and whether the row came from the archive - key_alias: str | None - User-friendly key alias - spend: float - Amount spent by the key. When budget_duration is set this covers only the current budget window, not the key's lifetime - max_budget: float | None - Max budget for the key, enforced against spend - budget_duration: str | None - Budget reset period ("30d", "1h", etc.) - budget_reset_at: datetime | None - When the current budget window ends and spend is next reset to 0, not when it was last reset. Reset times snap to standard boundaries in the configured timezone (30d and 1mo land on the 1st of the month, 7d on Monday, 1h on the hour), so subtracting budget_duration from it does not give the window's start - model_max_budget: dict - Per-model budgets, e.g. {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - model_max_budget_usage: dict | None - Current-window spend per model, present only when the key has per-model budgets - budget_limits: list | None - Concurrent budget windows, exactly as stored - budget_limits_usage: dict | None - Current-window spend per budget window, e.g. {"1h": {"current_spend": 0.0009}}, present only when the key has budget windows (read from the same cross-pod spend counter the budget enforcement uses) - models: list - Model_name's the key is allowed to call - tpm_limit / rpm_limit: int | None - Tokens and requests per minute limits - metadata: dict - Metadata for the key, e.g. {"team": "core-infra"} - blocked: bool | None - Whether the key is blocked - expires: datetime | None - When the key stops authenticating requests - last_active: datetime | None - When the key was last used - object_permission: dict | None - Resolved vector store / MCP permissions when the key has an object_permission_id Example Curl: ``` curl -X GET "http://0.0.0.0:4000/key/info?key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" -H "Authorization: Bearer sk-1234" ``` Example Curl - if no key is passed, it will use the Key Passed in Authorization Header ``` curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer sk-test-example-key-123" ``` */
|
|
3983
4113
|
export const getInfoKeyFnKeyInfo: API.OperationMethod<
|
|
3984
4114
|
GetInfoKeyFnKeyInfoRequest,
|
|
3985
4115
|
GetInfoKeyFnKeyInfoResponse,
|
|
@@ -4012,7 +4142,7 @@ export type ListKeysKeyListGetError =
|
|
|
4012
4142
|
| BadRequest
|
|
4013
4143
|
| UnprocessableEntity
|
|
4014
4144
|
| LitellmOpError;
|
|
4015
|
-
/** List Keys List all keys for a given user / team / organization. Parameters: expand: Optional[List[str]] - Expand related objects (e.g. 'user' to include user information) status: Optional[str] - Filter by status
|
|
4145
|
+
/** List Keys List all keys for a given user / team / organization. Parameters: expand: Optional[List[str]] - Expand related objects (e.g. 'user' to include user information) status: Optional[str] - Filter by status: "active", "expired", "revoked" (blocked) or "deleted". "deleted" reads the LiteLLM_DeletedVerificationToken archive; the other values partition the live key table, so every live key matches exactly one of them. Returns: { "keys": List[str] or List[UserAPIKeyAuth], "total_count": int, "current_page": int, "total_pages": int, } When expand includes "user", each key object will include a "user" field with the associated user object. Note: When expand=user is specified, full key objects are returned regardless of the return_full_object parameter. */
|
|
4016
4146
|
export const listKeysKeyListGet: API.OperationMethod<
|
|
4017
4147
|
ListKeysKeyListGetRequest,
|
|
4018
4148
|
KeyListResponseObject,
|
|
@@ -4147,7 +4277,7 @@ export type UpdateKeyFnKeyUpdatePostError =
|
|
|
4147
4277
|
| NotFound
|
|
4148
4278
|
| UnprocessableEntity
|
|
4149
4279
|
| LitellmOpError;
|
|
4150
|
-
/** Update Key Fn Update an existing API key's parameters. Parameters: - key: Optional[str] - The key to update. Either key or key_alias must be provided. - key_alias: Optional[str] - User-friendly key alias. If key is omitted, also identifies the key to update (must match exactly one key, same as /key/delete's key_aliases) - user_id: Optional[str] - User ID associated with key - team_id: Optional[str] - Team ID associated with key - agent_id: Optional[str] - The agent id associated with the key. - organization_id: Optional[str] - The organization id of the key. - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - models: Optional[list] - Model_name's a user is allowed to call - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - spend: Optional[float] - Amount spent by key - max_budget: Optional[float] - Max budget for key - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) - soft_budget: Optional[float] -
|
|
4280
|
+
/** Update Key Fn Update an existing API key's parameters. The body is a merge patch: a field left out keeps its stored value, and on the key's own columns an explicit null clears it. The metadata-backed fields below are the exception, merging into the stored metadata instead: passing one as null leaves it unchanged, while `metadata` itself replaces the stored metadata wholesale. Parameters: - key: Optional[str] - The key to update. Either key or key_alias must be provided. - key_alias: Optional[str] - User-friendly key alias. If key is omitted, also identifies the key to update (must match exactly one key, same as /key/delete's key_aliases) - user_id: Optional[str] - User ID associated with key - team_id: Optional[str] - Team ID associated with key - agent_id: Optional[str] - The agent id associated with the key. - project_id: Optional[str] - Omit to retain the project, or send null to detach. A different project ID is rejected. - organization_id: Optional[str] - The organization id of the key. - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - end_user_budget_id: Optional[str] - Proxy admin only. Budget id applied to end users first seen through this key that carry no budget of their own. Omit to keep the current value, pass an empty string to clear it. - models: Optional[list] - Model_name's a user is allowed to call - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - spend: Optional[float] - Amount spent by key - max_budget: Optional[float] - Max budget for key - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) - soft_budget: Optional[float] - Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached. Set to null to remove the soft budget. - max_parallel_requests: Optional[int] - Rate limit for parallel requests - metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"} - tpm_limit: Optional[int] - Tokens per minute limit - rpm_limit: Optional[int] - Requests per minute limit - tpd_limit: Optional[int] - Tokens per day limit, charged by batch submissions instead of tpm_limit/rpm_limit - model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200} - mcp_rpm_limit: Optional[dict] - Per-MCP-server RPM limits, keyed by MCP server name {"github": 100, "slack": 200} - tag_rpm_limit: Optional[dict] - Per-request-tag RPM limits, keyed by request tag {"cell-1": 1000, "cell-2": 500}. Each tag gets an independent counter; absent tags fall back to the key-level rpm limit. - model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000} - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above {"gpt-4": 4096, "gpt-3.5-turbo": 1024} - tpm_limit_type: Optional[str] - TPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - rpm_limit_type: Optional[str] - RPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - allowed_cache_controls: Optional[list] - List of allowed cache control values - duration: Optional[str] - Key validity duration ("30d", "1h", etc.), null to never expire, or "-1" to never expire (deprecated, use null) - permissions: Optional[dict] - Key-specific permissions - send_invite_email: Optional[bool] - Send invite email to user_id - guardrails: Optional[List[str]] - List of active guardrails for the key - policies: Optional[List[str]] - List of policy names to apply to the key. Policies define guardrails, conditions, and inheritance rules. - disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key. - throttle_on_budget_exceeded: Optional[bool] - When the key exceeds its max_budget, throttle its tpm/rpm to the global budget_exceeded_throttle_percentage instead of blocking the key entirely. - enable_prompt_caching: Optional[bool] - Auto-inject prompt caching breakpoints (Anthropic cache_control markers) on requests made with this key. Supported Claude models on Anthropic, Bedrock, Vertex AI, and Azure AI only. - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - blocked: Optional[bool] - Whether the key is blocked - aliases: Optional[dict] - Model aliases for the key - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases) - config: Optional[dict] - [DEPRECATED PARAM] Key-specific config. - temp_budget_increase: Optional[float] - Temporary budget increase for the key (Enterprise only). - temp_budget_expiry: Optional[str] - Expiry time for the temporary budget increase (Enterprise only). - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - allowed_passthrough_routes: Optional[list] - List of allowed pass through routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/my-custom-endpoint"]. Use this instead of allowed_routes, if you just want to specify which pass through routes the key can access, without specifying the routes. If allowed_routes is specified, allowed_passthrough_routes is ignored. - prompts: Optional[List[str]] - List of allowed prompts for the key. If specified, the key will only be able to use these specific prompts. - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. - auto_rotate: Optional[bool] - Whether this key should be automatically rotated - rotation_interval: Optional[str] - How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. - router_settings: Optional[UpdateRouterConfig] - key-specific router settings. Example - {"model_group_retry_policy": {"gpt-4": {"RateLimitErrorRetries": 5}}}. IF null or {} then no router settings. - access_group_ids: Optional[List[str]] - List of access group IDs to associate with the key. Access groups define which models a key can access. Example - ["access_group_1", "access_group_2"]. - budget_limits: Optional[list] - List of concurrent budget windows for the key. Each window specifies a budget_limit, time_period, and optional budget_duration. Example - [{"budget_limit": 10.0, "time_period": "1d"}, {"budget_limit": 50.0, "time_period": "7d"}]. Example: ```bash curl --location 'http://0.0.0.0:4000/key/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "key": "sk-1234", "key_alias": "my-key", "user_id": "user-1234", "team_id": "team-1234", "max_budget": 100, "metadata": {"any_key": "any-val"}, }' ``` */
|
|
4151
4281
|
export const updateKeyFnKeyUpdatePost: API.OperationMethod<
|
|
4152
4282
|
UpdateKeyFnKeyUpdatePostRequest,
|
|
4153
4283
|
UpdateKeyFnKeyUpdatePostResponse,
|