@homeflare/distilled-litellm 0.2.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/LICENSE +201 -0
- package/README.md +77 -0
- package/dist/credentials.d.ts +27 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +67 -0
- package/dist/credentials.js.map +1 -0
- package/dist/errors.d.ts +92 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +72 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +18 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +135 -0
- package/dist/protocol.js.map +1 -0
- package/dist/retry.d.ts +50 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +43 -0
- package/dist/retry.js.map +1 -0
- package/dist/services/a2a.d.ts +70 -0
- package/dist/services/a2a.d.ts.map +1 -0
- package/dist/services/a2a.js +128 -0
- package/dist/services/a2a.js.map +1 -0
- package/dist/services/a2a_registration.d.ts +43 -0
- package/dist/services/a2a_registration.d.ts.map +1 -0
- package/dist/services/a2a_registration.js +40 -0
- package/dist/services/a2a_registration.js.map +1 -0
- package/dist/services/access_groups.d.ts +192 -0
- package/dist/services/access_groups.d.ts.map +1 -0
- package/dist/services/access_groups.js +283 -0
- package/dist/services/access_groups.js.map +1 -0
- package/dist/services/adaptive_router.d.ts +15 -0
- package/dist/services/adaptive_router.d.ts.map +1 -0
- package/dist/services/adaptive_router.js +25 -0
- package/dist/services/adaptive_router.js.map +1 -0
- package/dist/services/agents.d.ts +537 -0
- package/dist/services/agents.d.ts.map +1 -0
- package/dist/services/agents.js +481 -0
- package/dist/services/agents.js.map +1 -0
- package/dist/services/alerting.d.ts +15 -0
- package/dist/services/alerting.d.ts.map +1 -0
- package/dist/services/alerting.js +25 -0
- package/dist/services/alerting.js.map +1 -0
- package/dist/services/anthropic_pass_through.d.ts +70 -0
- package/dist/services/anthropic_pass_through.d.ts.map +1 -0
- package/dist/services/anthropic_pass_through.js +114 -0
- package/dist/services/anthropic_pass_through.js.map +1 -0
- package/dist/services/anthropic_passthrough.d.ts +35 -0
- package/dist/services/anthropic_passthrough.d.ts.map +1 -0
- package/dist/services/anthropic_passthrough.js +59 -0
- package/dist/services/anthropic_passthrough.js.map +1 -0
- package/dist/services/anthropic_skills.d.ts +74 -0
- package/dist/services/anthropic_skills.d.ts.map +1 -0
- package/dist/services/anthropic_skills.js +94 -0
- package/dist/services/anthropic_skills.js.map +1 -0
- package/dist/services/assembly_ai_eu_pass_through.d.ts +70 -0
- package/dist/services/assembly_ai_eu_pass_through.d.ts.map +1 -0
- package/dist/services/assembly_ai_eu_pass_through.js +114 -0
- package/dist/services/assembly_ai_eu_pass_through.js.map +1 -0
- package/dist/services/assembly_ai_pass_through.d.ts +70 -0
- package/dist/services/assembly_ai_pass_through.d.ts.map +1 -0
- package/dist/services/assembly_ai_pass_through.js +114 -0
- package/dist/services/assembly_ai_pass_through.js.map +1 -0
- package/dist/services/assistants.d.ts +185 -0
- package/dist/services/assistants.d.ts.map +1 -0
- package/dist/services/assistants.js +331 -0
- package/dist/services/assistants.js.map +1 -0
- package/dist/services/audio.d.ts +57 -0
- package/dist/services/audio.d.ts.map +1 -0
- package/dist/services/audio.js +96 -0
- package/dist/services/audio.js.map +1 -0
- package/dist/services/audit_logging.d.ts +98 -0
- package/dist/services/audit_logging.d.ts.map +1 -0
- package/dist/services/audit_logging.js +83 -0
- package/dist/services/audit_logging.js.map +1 -0
- package/dist/services/auto_router.d.ts +286 -0
- package/dist/services/auto_router.d.ts.map +1 -0
- package/dist/services/auto_router.js +248 -0
- package/dist/services/auto_router.js.map +1 -0
- package/dist/services/aws_comprehend_medical_pass_through.d.ts +36 -0
- package/dist/services/aws_comprehend_medical_pass_through.d.ts.map +1 -0
- package/dist/services/aws_comprehend_medical_pass_through.js +56 -0
- package/dist/services/aws_comprehend_medical_pass_through.js.map +1 -0
- package/dist/services/azure_ai_pass_through.d.ts +70 -0
- package/dist/services/azure_ai_pass_through.d.ts.map +1 -0
- package/dist/services/azure_ai_pass_through.js +112 -0
- package/dist/services/azure_ai_pass_through.js.map +1 -0
- package/dist/services/azure_pass_through.d.ts +70 -0
- package/dist/services/azure_pass_through.d.ts.map +1 -0
- package/dist/services/azure_pass_through.js +107 -0
- package/dist/services/azure_pass_through.js.map +1 -0
- package/dist/services/batch.d.ts +165 -0
- package/dist/services/batch.d.ts.map +1 -0
- package/dist/services/batch.js +265 -0
- package/dist/services/batch.js.map +1 -0
- package/dist/services/bedrock_pass_through.d.ts +70 -0
- package/dist/services/bedrock_pass_through.d.ts.map +1 -0
- package/dist/services/bedrock_pass_through.js +114 -0
- package/dist/services/bedrock_pass_through.js.map +1 -0
- package/dist/services/beta_agents.d.ts +199 -0
- package/dist/services/beta_agents.d.ts.map +1 -0
- package/dist/services/beta_agents.js +151 -0
- package/dist/services/beta_agents.js.map +1 -0
- package/dist/services/beta_mcp.d.ts +37 -0
- package/dist/services/beta_mcp.d.ts.map +1 -0
- package/dist/services/beta_mcp.js +40 -0
- package/dist/services/beta_mcp.js.map +1 -0
- package/dist/services/budget_management.d.ts +185 -0
- package/dist/services/budget_management.d.ts.map +1 -0
- package/dist/services/budget_management.js +196 -0
- package/dist/services/budget_management.js.map +1 -0
- package/dist/services/budget_spend_tracking.d.ts +967 -0
- package/dist/services/budget_spend_tracking.d.ts.map +1 -0
- package/dist/services/budget_spend_tracking.js +1103 -0
- package/dist/services/budget_spend_tracking.js.map +1 -0
- package/dist/services/cache_settings.d.ts +96 -0
- package/dist/services/cache_settings.d.ts.map +1 -0
- package/dist/services/cache_settings.js +95 -0
- package/dist/services/cache_settings.js.map +1 -0
- package/dist/services/caching.d.ts +54 -0
- package/dist/services/caching.d.ts.map +1 -0
- package/dist/services/caching.js +78 -0
- package/dist/services/caching.js.map +1 -0
- package/dist/services/chat_completions.d.ts +656 -0
- package/dist/services/chat_completions.d.ts.map +1 -0
- package/dist/services/chat_completions.js +590 -0
- package/dist/services/chat_completions.js.map +1 -0
- package/dist/services/claude_code_marketplace.d.ts +212 -0
- package/dist/services/claude_code_marketplace.d.ts.map +1 -0
- package/dist/services/claude_code_marketplace.js +248 -0
- package/dist/services/claude_code_marketplace.js.map +1 -0
- package/dist/services/cloudzero.d.ts +117 -0
- package/dist/services/cloudzero.d.ts.map +1 -0
- package/dist/services/cloudzero.js +130 -0
- package/dist/services/cloudzero.js.map +1 -0
- package/dist/services/cohere_pass_through.d.ts +70 -0
- package/dist/services/cohere_pass_through.d.ts.map +1 -0
- package/dist/services/cohere_pass_through.js +112 -0
- package/dist/services/cohere_pass_through.js.map +1 -0
- package/dist/services/completions.d.ts +59 -0
- package/dist/services/completions.d.ts.map +1 -0
- package/dist/services/completions.js +98 -0
- package/dist/services/completions.js.map +1 -0
- package/dist/services/compliance.d.ts +66 -0
- package/dist/services/compliance.d.ts.map +1 -0
- package/dist/services/compliance.js +74 -0
- package/dist/services/compliance.js.map +1 -0
- package/dist/services/config_overrides.d.ts +157 -0
- package/dist/services/config_overrides.d.ts.map +1 -0
- package/dist/services/config_overrides.js +207 -0
- package/dist/services/config_overrides.js.map +1 -0
- package/dist/services/config_yaml.d.ts +647 -0
- package/dist/services/config_yaml.d.ts.map +1 -0
- package/dist/services/config_yaml.js +504 -0
- package/dist/services/config_yaml.js.map +1 -0
- package/dist/services/containers.d.ts +215 -0
- package/dist/services/containers.d.ts.map +1 -0
- package/dist/services/containers.js +416 -0
- package/dist/services/containers.js.map +1 -0
- package/dist/services/coordination_redis_settings.d.ts +93 -0
- package/dist/services/coordination_redis_settings.d.ts.map +1 -0
- package/dist/services/coordination_redis_settings.js +104 -0
- package/dist/services/coordination_redis_settings.js.map +1 -0
- package/dist/services/cost_tracking.d.ts +140 -0
- package/dist/services/cost_tracking.d.ts.map +1 -0
- package/dist/services/cost_tracking.js +181 -0
- package/dist/services/cost_tracking.js.map +1 -0
- package/dist/services/credential_management.d.ts +133 -0
- package/dist/services/credential_management.d.ts.map +1 -0
- package/dist/services/credential_management.js +198 -0
- package/dist/services/credential_management.js.map +1 -0
- package/dist/services/cursor_pass_through.d.ts +70 -0
- package/dist/services/cursor_pass_through.d.ts.map +1 -0
- package/dist/services/cursor_pass_through.js +112 -0
- package/dist/services/cursor_pass_through.js.map +1 -0
- package/dist/services/customer_management.d.ts +545 -0
- package/dist/services/customer_management.d.ts.map +1 -0
- package/dist/services/customer_management.js +567 -0
- package/dist/services/customer_management.js.map +1 -0
- package/dist/services/email_management.d.ts +57 -0
- package/dist/services/email_management.d.ts.map +1 -0
- package/dist/services/email_management.js +79 -0
- package/dist/services/email_management.js.map +1 -0
- package/dist/services/embeddings.d.ts +155 -0
- package/dist/services/embeddings.d.ts.map +1 -0
- package/dist/services/embeddings.js +168 -0
- package/dist/services/embeddings.js.map +1 -0
- package/dist/services/evals.d.ts +245 -0
- package/dist/services/evals.d.ts.map +1 -0
- package/dist/services/evals.js +292 -0
- package/dist/services/evals.js.map +1 -0
- package/dist/services/experimental.d.ts +166 -0
- package/dist/services/experimental.d.ts.map +1 -0
- package/dist/services/experimental.js +265 -0
- package/dist/services/experimental.js.map +1 -0
- package/dist/services/fallback_management.d.ts +91 -0
- package/dist/services/fallback_management.d.ts.map +1 -0
- package/dist/services/fallback_management.js +86 -0
- package/dist/services/fallback_management.js.map +1 -0
- package/dist/services/files.d.ts +219 -0
- package/dist/services/files.d.ts.map +1 -0
- package/dist/services/files.js +358 -0
- package/dist/services/files.js.map +1 -0
- package/dist/services/fine_tuning.d.ts +155 -0
- package/dist/services/fine_tuning.d.ts.map +1 -0
- package/dist/services/fine_tuning.js +232 -0
- package/dist/services/fine_tuning.js.map +1 -0
- package/dist/services/gemini_agents.d.ts +68 -0
- package/dist/services/gemini_agents.d.ts.map +1 -0
- package/dist/services/gemini_agents.js +110 -0
- package/dist/services/gemini_agents.js.map +1 -0
- package/dist/services/google_ai_studio_pass_through.d.ts +70 -0
- package/dist/services/google_ai_studio_pass_through.d.ts.map +1 -0
- package/dist/services/google_ai_studio_pass_through.js +112 -0
- package/dist/services/google_ai_studio_pass_through.js.map +1 -0
- package/dist/services/google_genai_endpoints.d.ts +174 -0
- package/dist/services/google_genai_endpoints.d.ts.map +1 -0
- package/dist/services/google_genai_endpoints.js +340 -0
- package/dist/services/google_genai_endpoints.js.map +1 -0
- package/dist/services/guardrails.d.ts +1221 -0
- package/dist/services/guardrails.d.ts.map +1 -0
- package/dist/services/guardrails.js +1087 -0
- package/dist/services/guardrails.js.map +1 -0
- package/dist/services/health.d.ts +212 -0
- package/dist/services/health.d.ts.map +1 -0
- package/dist/services/health.js +309 -0
- package/dist/services/health.js.map +1 -0
- package/dist/services/images.d.ts +117 -0
- package/dist/services/images.d.ts.map +1 -0
- package/dist/services/images.js +184 -0
- package/dist/services/images.js.map +1 -0
- package/dist/services/index.d.ts +106 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +107 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/internal_user_management.d.ts +1062 -0
- package/dist/services/internal_user_management.d.ts.map +1 -0
- package/dist/services/internal_user_management.js +850 -0
- package/dist/services/internal_user_management.js.map +1 -0
- package/dist/services/invite_links.d.ts +56 -0
- package/dist/services/invite_links.d.ts.map +1 -0
- package/dist/services/invite_links.js +82 -0
- package/dist/services/invite_links.js.map +1 -0
- package/dist/services/jwt_mappings.d.ts +79 -0
- package/dist/services/jwt_mappings.d.ts.map +1 -0
- package/dist/services/jwt_mappings.js +116 -0
- package/dist/services/jwt_mappings.js.map +1 -0
- package/dist/services/key_management.d.ts +1640 -0
- package/dist/services/key_management.d.ts.map +1 -0
- package/dist/services/key_management.js +1344 -0
- package/dist/services/key_management.js.map +1 -0
- package/dist/services/langfuse_passthrough.d.ts +70 -0
- package/dist/services/langfuse_passthrough.d.ts.map +1 -0
- package/dist/services/langfuse_passthrough.js +114 -0
- package/dist/services/langfuse_passthrough.js.map +1 -0
- package/dist/services/llm_utils.d.ts +101 -0
- package/dist/services/llm_utils.d.ts.map +1 -0
- package/dist/services/llm_utils.js +110 -0
- package/dist/services/llm_utils.js.map +1 -0
- package/dist/services/logging_callbacks.d.ts +33 -0
- package/dist/services/logging_callbacks.d.ts.map +1 -0
- package/dist/services/logging_callbacks.js +46 -0
- package/dist/services/logging_callbacks.js.map +1 -0
- package/dist/services/mcp_byok_oauth.d.ts +112 -0
- package/dist/services/mcp_byok_oauth.d.ts.map +1 -0
- package/dist/services/mcp_byok_oauth.js +226 -0
- package/dist/services/mcp_byok_oauth.js.map +1 -0
- package/dist/services/mcp_discoverable.d.ts +197 -0
- package/dist/services/mcp_discoverable.d.ts.map +1 -0
- package/dist/services/mcp_discoverable.js +304 -0
- package/dist/services/mcp_discoverable.js.map +1 -0
- package/dist/services/mcp_management.d.ts +956 -0
- package/dist/services/mcp_management.d.ts.map +1 -0
- package/dist/services/mcp_management.js +1139 -0
- package/dist/services/mcp_management.js.map +1 -0
- package/dist/services/mcp_rest.d.ts +281 -0
- package/dist/services/mcp_rest.d.ts.map +1 -0
- package/dist/services/mcp_rest.js +269 -0
- package/dist/services/mcp_rest.js.map +1 -0
- package/dist/services/memory_management.d.ts +93 -0
- package/dist/services/memory_management.d.ts.map +1 -0
- package/dist/services/memory_management.js +117 -0
- package/dist/services/memory_management.js.map +1 -0
- package/dist/services/milvus_pass_through.d.ts +70 -0
- package/dist/services/milvus_pass_through.d.ts.map +1 -0
- package/dist/services/milvus_pass_through.js +112 -0
- package/dist/services/milvus_pass_through.js.map +1 -0
- package/dist/services/misc.d.ts +676 -0
- package/dist/services/misc.d.ts.map +1 -0
- package/dist/services/misc.js +954 -0
- package/dist/services/misc.js.map +1 -0
- package/dist/services/mistral_pass_through.d.ts +70 -0
- package/dist/services/mistral_pass_through.d.ts.map +1 -0
- package/dist/services/mistral_pass_through.js +114 -0
- package/dist/services/mistral_pass_through.js.map +1 -0
- package/dist/services/model_management.d.ts +1649 -0
- package/dist/services/model_management.d.ts.map +1 -0
- package/dist/services/model_management.js +1805 -0
- package/dist/services/model_management.js.map +1 -0
- package/dist/services/moderations.d.ts +25 -0
- package/dist/services/moderations.d.ts.map +1 -0
- package/dist/services/moderations.js +39 -0
- package/dist/services/moderations.js.map +1 -0
- package/dist/services/ocr.d.ts +25 -0
- package/dist/services/ocr.d.ts.map +1 -0
- package/dist/services/ocr.js +39 -0
- package/dist/services/ocr.js.map +1 -0
- package/dist/services/open_ai_pass_through.d.ts +125 -0
- package/dist/services/open_ai_pass_through.d.ts.map +1 -0
- package/dist/services/open_ai_pass_through.js +232 -0
- package/dist/services/open_ai_pass_through.js.map +1 -0
- package/dist/services/organization_management.d.ts +664 -0
- package/dist/services/organization_management.d.ts.map +1 -0
- package/dist/services/organization_management.js +644 -0
- package/dist/services/organization_management.js.map +1 -0
- package/dist/services/plugins.d.ts +106 -0
- package/dist/services/plugins.d.ts.map +1 -0
- package/dist/services/plugins.js +180 -0
- package/dist/services/plugins.js.map +1 -0
- package/dist/services/policies.d.ts +618 -0
- package/dist/services/policies.d.ts.map +1 -0
- package/dist/services/policies.js +616 -0
- package/dist/services/policies.js.map +1 -0
- package/dist/services/policy_engine.d.ts +483 -0
- package/dist/services/policy_engine.d.ts.map +1 -0
- package/dist/services/policy_engine.js +501 -0
- package/dist/services/policy_engine.js.map +1 -0
- package/dist/services/project_management.d.ts +356 -0
- package/dist/services/project_management.d.ts.map +1 -0
- package/dist/services/project_management.js +318 -0
- package/dist/services/project_management.js.map +1 -0
- package/dist/services/prompts.d.ts +193 -0
- package/dist/services/prompts.d.ts.map +1 -0
- package/dist/services/prompts.js +260 -0
- package/dist/services/prompts.js.map +1 -0
- package/dist/services/public.d.ts +300 -0
- package/dist/services/public.d.ts.map +1 -0
- package/dist/services/public.js +362 -0
- package/dist/services/public.js.map +1 -0
- package/dist/services/rag.d.ts +45 -0
- package/dist/services/rag.d.ts.map +1 -0
- package/dist/services/rag.js +71 -0
- package/dist/services/rag.js.map +1 -0
- package/dist/services/realtime.d.ts +91 -0
- package/dist/services/realtime.d.ts.map +1 -0
- package/dist/services/realtime.js +164 -0
- package/dist/services/realtime.js.map +1 -0
- package/dist/services/rerank.d.ts +35 -0
- package/dist/services/rerank.d.ts.map +1 -0
- package/dist/services/rerank.js +55 -0
- package/dist/services/rerank.js.map +1 -0
- package/dist/services/responses.d.ts +237 -0
- package/dist/services/responses.d.ts.map +1 -0
- package/dist/services/responses.js +445 -0
- package/dist/services/responses.js.map +1 -0
- package/dist/services/router_settings.d.ts +67 -0
- package/dist/services/router_settings.d.ts.map +1 -0
- package/dist/services/router_settings.js +63 -0
- package/dist/services/router_settings.js.map +1 -0
- package/dist/services/rust_control_plane.d.ts +52 -0
- package/dist/services/rust_control_plane.d.ts.map +1 -0
- package/dist/services/rust_control_plane.js +54 -0
- package/dist/services/rust_control_plane.js.map +1 -0
- package/dist/services/scim.d.ts +412 -0
- package/dist/services/scim.d.ts.map +1 -0
- package/dist/services/scim.js +519 -0
- package/dist/services/scim.js.map +1 -0
- package/dist/services/search.d.ts +79 -0
- package/dist/services/search.d.ts.map +1 -0
- package/dist/services/search.js +122 -0
- package/dist/services/search.js.map +1 -0
- package/dist/services/search_tools.d.ts +140 -0
- package/dist/services/search_tools.d.ts.map +1 -0
- package/dist/services/search_tools.js +201 -0
- package/dist/services/search_tools.js.map +1 -0
- package/dist/services/settings.d.ts +53 -0
- package/dist/services/settings.d.ts.map +1 -0
- package/dist/services/settings.js +67 -0
- package/dist/services/settings.js.map +1 -0
- package/dist/services/sso_settings.d.ts +239 -0
- package/dist/services/sso_settings.d.ts.map +1 -0
- package/dist/services/sso_settings.js +214 -0
- package/dist/services/sso_settings.js.map +1 -0
- package/dist/services/tag_management.d.ts +390 -0
- package/dist/services/tag_management.d.ts.map +1 -0
- package/dist/services/tag_management.js +407 -0
- package/dist/services/tag_management.js.map +1 -0
- package/dist/services/team_management.d.ts +1502 -0
- package/dist/services/team_management.d.ts.map +1 -0
- package/dist/services/team_management.js +1429 -0
- package/dist/services/team_management.js.map +1 -0
- package/dist/services/tools.d.ts +227 -0
- package/dist/services/tools.d.ts.map +1 -0
- package/dist/services/tools.js +266 -0
- package/dist/services/tools.js.map +1 -0
- package/dist/services/ui_settings.d.ts +90 -0
- package/dist/services/ui_settings.d.ts.map +1 -0
- package/dist/services/ui_settings.js +96 -0
- package/dist/services/ui_settings.js.map +1 -0
- package/dist/services/ui_theme_settings.d.ts +62 -0
- package/dist/services/ui_theme_settings.d.ts.map +1 -0
- package/dist/services/ui_theme_settings.js +79 -0
- package/dist/services/ui_theme_settings.js.map +1 -0
- package/dist/services/usage_ai.d.ts +39 -0
- package/dist/services/usage_ai.d.ts.map +1 -0
- package/dist/services/usage_ai.js +40 -0
- package/dist/services/usage_ai.js.map +1 -0
- package/dist/services/vantage.d.ts +108 -0
- package/dist/services/vantage.d.ts.map +1 -0
- package/dist/services/vantage.js +124 -0
- package/dist/services/vantage.js.map +1 -0
- package/dist/services/vector_store_management.d.ts +161 -0
- package/dist/services/vector_store_management.d.ts.map +1 -0
- package/dist/services/vector_store_management.js +191 -0
- package/dist/services/vector_store_management.js.map +1 -0
- package/dist/services/vector_stores.d.ts +342 -0
- package/dist/services/vector_stores.d.ts.map +1 -0
- package/dist/services/vector_stores.js +639 -0
- package/dist/services/vector_stores.js.map +1 -0
- package/dist/services/vertex_ai_pass_through.d.ts +180 -0
- package/dist/services/vertex_ai_pass_through.d.ts.map +1 -0
- package/dist/services/vertex_ai_pass_through.js +334 -0
- package/dist/services/vertex_ai_pass_through.js.map +1 -0
- package/dist/services/videos.d.ts +207 -0
- package/dist/services/videos.d.ts.map +1 -0
- package/dist/services/videos.js +373 -0
- package/dist/services/videos.js.map +1 -0
- package/dist/services/vllm_pass_through.d.ts +70 -0
- package/dist/services/vllm_pass_through.d.ts.map +1 -0
- package/dist/services/vllm_pass_through.js +104 -0
- package/dist/services/vllm_pass_through.js.map +1 -0
- package/dist/services/watsonx_pass_through.d.ts +70 -0
- package/dist/services/watsonx_pass_through.d.ts.map +1 -0
- package/dist/services/watsonx_pass_through.js +114 -0
- package/dist/services/watsonx_pass_through.js.map +1 -0
- package/dist/services/web_socket.d.ts +77 -0
- package/dist/services/web_socket.d.ts.map +1 -0
- package/dist/services/web_socket.js +135 -0
- package/dist/services/web_socket.js.map +1 -0
- package/dist/services/workflow_management.d.ts +140 -0
- package/dist/services/workflow_management.d.ts.map +1 -0
- package/dist/services/workflow_management.js +220 -0
- package/dist/services/workflow_management.js.map +1 -0
- package/dist/traits.d.ts +14 -0
- package/dist/traits.d.ts.map +1 -0
- package/dist/traits.js +15 -0
- package/dist/traits.js.map +1 -0
- package/package.json +75 -0
- package/src/credentials.ts +97 -0
- package/src/errors.ts +108 -0
- package/src/index.ts +33 -0
- package/src/protocol.ts +160 -0
- package/src/retry.ts +74 -0
- package/src/services/a2a.ts +250 -0
- package/src/services/a2a_registration.ts +94 -0
- package/src/services/access_groups.ts +716 -0
- package/src/services/adaptive_router.ts +49 -0
- package/src/services/agents.ts +1314 -0
- package/src/services/alerting.ts +49 -0
- package/src/services/anthropic_pass_through.ts +233 -0
- package/src/services/anthropic_passthrough.ts +123 -0
- package/src/services/anthropic_skills.ts +200 -0
- package/src/services/assembly_ai_eu_pass_through.ts +237 -0
- package/src/services/assembly_ai_pass_through.ts +237 -0
- package/src/services/assistants.ts +685 -0
- package/src/services/audio.ts +189 -0
- package/src/services/audit_logging.ts +194 -0
- package/src/services/auto_router.ts +625 -0
- package/src/services/aws_comprehend_medical_pass_through.ts +109 -0
- package/src/services/azure_ai_pass_through.ts +231 -0
- package/src/services/azure_pass_through.ts +227 -0
- package/src/services/batch.ts +553 -0
- package/src/services/bedrock_pass_through.ts +229 -0
- package/src/services/beta_agents.ts +444 -0
- package/src/services/beta_mcp.ts +105 -0
- package/src/services/budget_management.ts +465 -0
- package/src/services/budget_spend_tracking.ts +2670 -0
- package/src/services/cache_settings.ts +234 -0
- package/src/services/caching.ts +175 -0
- package/src/services/chat_completions.ts +1788 -0
- package/src/services/claude_code_marketplace.ts +569 -0
- package/src/services/cloudzero.ts +297 -0
- package/src/services/cohere_pass_through.ts +227 -0
- package/src/services/completions.ts +194 -0
- package/src/services/compliance.ts +175 -0
- package/src/services/config_overrides.ts +466 -0
- package/src/services/config_yaml.ts +1537 -0
- package/src/services/containers.ts +848 -0
- package/src/services/coordination_redis_settings.ts +251 -0
- package/src/services/cost_tracking.ts +407 -0
- package/src/services/credential_management.ts +436 -0
- package/src/services/cursor_pass_through.ts +227 -0
- package/src/services/customer_management.ts +1475 -0
- package/src/services/email_management.ts +171 -0
- package/src/services/embeddings.ts +424 -0
- package/src/services/evals.ts +672 -0
- package/src/services/experimental.ts +572 -0
- package/src/services/fallback_management.ts +224 -0
- package/src/services/files.ts +732 -0
- package/src/services/fine_tuning.ts +547 -0
- package/src/services/gemini_agents.ts +227 -0
- package/src/services/google_ai_studio_pass_through.ts +227 -0
- package/src/services/google_genai_endpoints.ts +688 -0
- package/src/services/guardrails.ts +3006 -0
- package/src/services/health.ts +713 -0
- package/src/services/images.ts +430 -0
- package/src/services/index.ts +106 -0
- package/src/services/internal_user_management.ts +2574 -0
- package/src/services/invite_links.ts +167 -0
- package/src/services/jwt_mappings.ts +238 -0
- package/src/services/key_management.ts +4162 -0
- package/src/services/langfuse_passthrough.ts +231 -0
- package/src/services/llm_utils.ts +429 -0
- package/src/services/logging_callbacks.ts +104 -0
- package/src/services/mcp_byok_oauth.ts +468 -0
- package/src/services/mcp_discoverable.ts +626 -0
- package/src/services/mcp_management.ts +2915 -0
- package/src/services/mcp_rest.ts +779 -0
- package/src/services/memory_management.ts +248 -0
- package/src/services/milvus_pass_through.ts +227 -0
- package/src/services/misc.ts +2128 -0
- package/src/services/mistral_pass_through.ts +229 -0
- package/src/services/model_management.ts +4501 -0
- package/src/services/moderations.ts +80 -0
- package/src/services/ocr.ts +78 -0
- package/src/services/open_ai_pass_through.ts +462 -0
- package/src/services/organization_management.ts +1749 -0
- package/src/services/plugins.ts +367 -0
- package/src/services/policies.ts +1676 -0
- package/src/services/policy_engine.ts +1318 -0
- package/src/services/project_management.ts +938 -0
- package/src/services/prompts.ts +592 -0
- package/src/services/public.ts +880 -0
- package/src/services/rag.ts +148 -0
- package/src/services/realtime.ts +350 -0
- package/src/services/rerank.ts +111 -0
- package/src/services/responses.ts +909 -0
- package/src/services/router_settings.ts +168 -0
- package/src/services/rust_control_plane.ts +123 -0
- package/src/services/scim.ts +1243 -0
- package/src/services/search.ts +260 -0
- package/src/services/search_tools.ts +439 -0
- package/src/services/settings.ts +146 -0
- package/src/services/sso_settings.ts +626 -0
- package/src/services/tag_management.ts +1004 -0
- package/src/services/team_management.ts +3990 -0
- package/src/services/tools.ts +628 -0
- package/src/services/ui_settings.ts +237 -0
- package/src/services/ui_theme_settings.ts +173 -0
- package/src/services/usage_ai.ts +86 -0
- package/src/services/vantage.ts +283 -0
- package/src/services/vector_store_management.ts +454 -0
- package/src/services/vector_stores.ts +1321 -0
- package/src/services/vertex_ai_pass_through.ts +684 -0
- package/src/services/videos.ts +762 -0
- package/src/services/vllm_pass_through.ts +227 -0
- package/src/services/watsonx_pass_through.ts +229 -0
- package/src/services/web_socket.ts +254 -0
- package/src/services/workflow_management.ts +482 -0
- package/src/traits.ts +44 -0
|
@@ -0,0 +1,3006 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (pinned litellm-openapi @ 1.100.0 — see README). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
5
|
+
import * as T from "../traits.ts";
|
|
6
|
+
import {
|
|
7
|
+
LitellmProtocol,
|
|
8
|
+
type LitellmOpError,
|
|
9
|
+
type LitellmOpContext,
|
|
10
|
+
} from "../protocol.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { LitellmOpError, LitellmOpContext };
|
|
14
|
+
|
|
15
|
+
export class UnprocessableEntity
|
|
16
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
17
|
+
/*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
|
|
18
|
+
code: S.Number,
|
|
19
|
+
message: S.String,
|
|
20
|
+
}).pipe(C.withBadRequestError),
|
|
21
|
+
[{ status: 422 }],
|
|
22
|
+
) {}
|
|
23
|
+
|
|
24
|
+
export type PiiEntityType =
|
|
25
|
+
| "CREDIT_CARD"
|
|
26
|
+
| "CRYPTO"
|
|
27
|
+
| "DATE_TIME"
|
|
28
|
+
| "EMAIL_ADDRESS"
|
|
29
|
+
| "IBAN_CODE"
|
|
30
|
+
| "IP_ADDRESS"
|
|
31
|
+
| "NRP"
|
|
32
|
+
| "LOCATION"
|
|
33
|
+
| "PERSON"
|
|
34
|
+
| "PHONE_NUMBER"
|
|
35
|
+
| "MEDICAL_LICENSE"
|
|
36
|
+
| "URL"
|
|
37
|
+
| "US_BANK_NUMBER"
|
|
38
|
+
| "US_DRIVER_LICENSE"
|
|
39
|
+
| "US_ITIN"
|
|
40
|
+
| "US_PASSPORT"
|
|
41
|
+
| "US_SSN"
|
|
42
|
+
| "UK_NHS"
|
|
43
|
+
| "UK_NINO"
|
|
44
|
+
| "UK_PASSPORT"
|
|
45
|
+
| "UK_POSTCODE"
|
|
46
|
+
| "UK_VEHICLE_REGISTRATION"
|
|
47
|
+
| "ES_NIF"
|
|
48
|
+
| "ES_NIE"
|
|
49
|
+
| "IT_FISCAL_CODE"
|
|
50
|
+
| "IT_DRIVER_LICENSE"
|
|
51
|
+
| "IT_VAT_CODE"
|
|
52
|
+
| "IT_PASSPORT"
|
|
53
|
+
| "IT_IDENTITY_CARD"
|
|
54
|
+
| "PL_PESEL"
|
|
55
|
+
| "SG_NRIC_FIN"
|
|
56
|
+
| "SG_UEN"
|
|
57
|
+
| "AU_ABN"
|
|
58
|
+
| "AU_ACN"
|
|
59
|
+
| "AU_TFN"
|
|
60
|
+
| "AU_MEDICARE"
|
|
61
|
+
| "IN_PAN"
|
|
62
|
+
| "IN_AADHAAR"
|
|
63
|
+
| "IN_VEHICLE_REGISTRATION"
|
|
64
|
+
| "IN_VOTER"
|
|
65
|
+
| "IN_PASSPORT"
|
|
66
|
+
| "FI_PERSONAL_IDENTITY_CODE";
|
|
67
|
+
export const PiiEntityType = S.String;
|
|
68
|
+
|
|
69
|
+
export type ApplyGuardrailApplyGuardrailPostRequestEntitiesList = Array<
|
|
70
|
+
PiiEntityType | (string & {})
|
|
71
|
+
>;
|
|
72
|
+
export const ApplyGuardrailApplyGuardrailPostRequestEntitiesList =
|
|
73
|
+
/*@__PURE__*/ S.Array(
|
|
74
|
+
PiiEntityType,
|
|
75
|
+
) as any as S.Schema<ApplyGuardrailApplyGuardrailPostRequestEntitiesList>;
|
|
76
|
+
|
|
77
|
+
export type ApplyGuardrailApplyGuardrailPostRequestMessagesItemMap = {
|
|
78
|
+
[key: string]: unknown | undefined;
|
|
79
|
+
};
|
|
80
|
+
export const ApplyGuardrailApplyGuardrailPostRequestMessagesItemMap =
|
|
81
|
+
/*@__PURE__*/ S.Record(
|
|
82
|
+
S.String,
|
|
83
|
+
S.Unknown,
|
|
84
|
+
) as any as S.Schema<ApplyGuardrailApplyGuardrailPostRequestMessagesItemMap>;
|
|
85
|
+
|
|
86
|
+
export type ApplyGuardrailApplyGuardrailPostRequestMessagesList =
|
|
87
|
+
Array<ApplyGuardrailApplyGuardrailPostRequestMessagesItemMap>;
|
|
88
|
+
export const ApplyGuardrailApplyGuardrailPostRequestMessagesList =
|
|
89
|
+
/*@__PURE__*/ S.Array(
|
|
90
|
+
ApplyGuardrailApplyGuardrailPostRequestMessagesItemMap,
|
|
91
|
+
) as any as S.Schema<ApplyGuardrailApplyGuardrailPostRequestMessagesList>;
|
|
92
|
+
|
|
93
|
+
export type ApplyGuardrailApplyGuardrailPostRequestMetadataMap = {
|
|
94
|
+
[key: string]: unknown | undefined;
|
|
95
|
+
};
|
|
96
|
+
export const ApplyGuardrailApplyGuardrailPostRequestMetadataMap =
|
|
97
|
+
/*@__PURE__*/ S.Record(
|
|
98
|
+
S.String,
|
|
99
|
+
S.Unknown,
|
|
100
|
+
) as any as S.Schema<ApplyGuardrailApplyGuardrailPostRequestMetadataMap>;
|
|
101
|
+
|
|
102
|
+
export interface ApplyGuardrailApplyGuardrailPostRequest {
|
|
103
|
+
entities?: ApplyGuardrailApplyGuardrailPostRequestEntitiesList | null;
|
|
104
|
+
guardrail_name: string;
|
|
105
|
+
input_type?: string;
|
|
106
|
+
language?: string | null;
|
|
107
|
+
messages?: ApplyGuardrailApplyGuardrailPostRequestMessagesList | null;
|
|
108
|
+
metadata?: ApplyGuardrailApplyGuardrailPostRequestMetadataMap | null;
|
|
109
|
+
text: string;
|
|
110
|
+
}
|
|
111
|
+
export const ApplyGuardrailApplyGuardrailPostRequest = /*@__PURE__*/ S.suspend(
|
|
112
|
+
() =>
|
|
113
|
+
S.Struct({
|
|
114
|
+
entities: S.optional(
|
|
115
|
+
S.NullOr(ApplyGuardrailApplyGuardrailPostRequestEntitiesList),
|
|
116
|
+
),
|
|
117
|
+
guardrail_name: S.String,
|
|
118
|
+
input_type: S.optional(S.String),
|
|
119
|
+
language: S.optional(S.NullOr(S.String)),
|
|
120
|
+
messages: S.optional(
|
|
121
|
+
S.NullOr(ApplyGuardrailApplyGuardrailPostRequestMessagesList),
|
|
122
|
+
),
|
|
123
|
+
metadata: S.optional(
|
|
124
|
+
S.NullOr(ApplyGuardrailApplyGuardrailPostRequestMetadataMap),
|
|
125
|
+
),
|
|
126
|
+
text: S.String,
|
|
127
|
+
}).pipe(T.Http({ method: "POST", uri: "/apply_guardrail", code: 200 })),
|
|
128
|
+
).annotate({
|
|
129
|
+
identifier: "ApplyGuardrailApplyGuardrailPostRequest",
|
|
130
|
+
}) as any as S.Schema<ApplyGuardrailApplyGuardrailPostRequest>;
|
|
131
|
+
|
|
132
|
+
export interface ApplyGuardrailResponse {
|
|
133
|
+
response_text: string;
|
|
134
|
+
}
|
|
135
|
+
export const ApplyGuardrailResponse = /*@__PURE__*/ S.suspend(() =>
|
|
136
|
+
S.Struct({
|
|
137
|
+
response_text: S.String,
|
|
138
|
+
}),
|
|
139
|
+
).annotate({
|
|
140
|
+
identifier: "ApplyGuardrailResponse",
|
|
141
|
+
}) as any as S.Schema<ApplyGuardrailResponse>;
|
|
142
|
+
|
|
143
|
+
export type ApplyGuardrailGuardrailsApplyGuardrailPostRequestEntitiesList =
|
|
144
|
+
Array<PiiEntityType | (string & {})>;
|
|
145
|
+
export const ApplyGuardrailGuardrailsApplyGuardrailPostRequestEntitiesList =
|
|
146
|
+
/*@__PURE__*/ S.Array(
|
|
147
|
+
PiiEntityType,
|
|
148
|
+
) as any as S.Schema<ApplyGuardrailGuardrailsApplyGuardrailPostRequestEntitiesList>;
|
|
149
|
+
|
|
150
|
+
export type ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesItemMap = {
|
|
151
|
+
[key: string]: unknown | undefined;
|
|
152
|
+
};
|
|
153
|
+
export const ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesItemMap =
|
|
154
|
+
/*@__PURE__*/ S.Record(
|
|
155
|
+
S.String,
|
|
156
|
+
S.Unknown,
|
|
157
|
+
) as any as S.Schema<ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesItemMap>;
|
|
158
|
+
|
|
159
|
+
export type ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesList =
|
|
160
|
+
Array<ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesItemMap>;
|
|
161
|
+
export const ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesList =
|
|
162
|
+
/*@__PURE__*/ S.Array(
|
|
163
|
+
ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesItemMap,
|
|
164
|
+
) as any as S.Schema<ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesList>;
|
|
165
|
+
|
|
166
|
+
export type ApplyGuardrailGuardrailsApplyGuardrailPostRequestMetadataMap = {
|
|
167
|
+
[key: string]: unknown | undefined;
|
|
168
|
+
};
|
|
169
|
+
export const ApplyGuardrailGuardrailsApplyGuardrailPostRequestMetadataMap =
|
|
170
|
+
/*@__PURE__*/ S.Record(
|
|
171
|
+
S.String,
|
|
172
|
+
S.Unknown,
|
|
173
|
+
) as any as S.Schema<ApplyGuardrailGuardrailsApplyGuardrailPostRequestMetadataMap>;
|
|
174
|
+
|
|
175
|
+
export interface ApplyGuardrailGuardrailsApplyGuardrailPostRequest {
|
|
176
|
+
entities?: ApplyGuardrailGuardrailsApplyGuardrailPostRequestEntitiesList | null;
|
|
177
|
+
guardrail_name: string;
|
|
178
|
+
input_type?: string;
|
|
179
|
+
language?: string | null;
|
|
180
|
+
messages?: ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesList | null;
|
|
181
|
+
metadata?: ApplyGuardrailGuardrailsApplyGuardrailPostRequestMetadataMap | null;
|
|
182
|
+
text: string;
|
|
183
|
+
}
|
|
184
|
+
export const ApplyGuardrailGuardrailsApplyGuardrailPostRequest =
|
|
185
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
186
|
+
S.Struct({
|
|
187
|
+
entities: S.optional(
|
|
188
|
+
S.NullOr(ApplyGuardrailGuardrailsApplyGuardrailPostRequestEntitiesList),
|
|
189
|
+
),
|
|
190
|
+
guardrail_name: S.String,
|
|
191
|
+
input_type: S.optional(S.String),
|
|
192
|
+
language: S.optional(S.NullOr(S.String)),
|
|
193
|
+
messages: S.optional(
|
|
194
|
+
S.NullOr(ApplyGuardrailGuardrailsApplyGuardrailPostRequestMessagesList),
|
|
195
|
+
),
|
|
196
|
+
metadata: S.optional(
|
|
197
|
+
S.NullOr(ApplyGuardrailGuardrailsApplyGuardrailPostRequestMetadataMap),
|
|
198
|
+
),
|
|
199
|
+
text: S.String,
|
|
200
|
+
}).pipe(
|
|
201
|
+
T.Http({ method: "POST", uri: "/guardrails/apply_guardrail", code: 200 }),
|
|
202
|
+
),
|
|
203
|
+
).annotate({
|
|
204
|
+
identifier: "ApplyGuardrailGuardrailsApplyGuardrailPostRequest",
|
|
205
|
+
}) as any as S.Schema<ApplyGuardrailGuardrailsApplyGuardrailPostRequest>;
|
|
206
|
+
|
|
207
|
+
export interface ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostRequest {
|
|
208
|
+
guardrail_id: string;
|
|
209
|
+
}
|
|
210
|
+
export const ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostRequest =
|
|
211
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
212
|
+
S.Struct({
|
|
213
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
214
|
+
}).pipe(
|
|
215
|
+
T.Http({
|
|
216
|
+
method: "POST",
|
|
217
|
+
uri: "/guardrails/submissions/{guardrail_id}/approve",
|
|
218
|
+
code: 200,
|
|
219
|
+
}),
|
|
220
|
+
),
|
|
221
|
+
).annotate({
|
|
222
|
+
identifier:
|
|
223
|
+
"ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostRequest",
|
|
224
|
+
}) as any as S.Schema<ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostRequest>;
|
|
225
|
+
|
|
226
|
+
export interface ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostResponse {
|
|
227
|
+
body: unknown;
|
|
228
|
+
}
|
|
229
|
+
export const ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostResponse =
|
|
230
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
231
|
+
S.Struct({
|
|
232
|
+
body: S.Unknown,
|
|
233
|
+
}),
|
|
234
|
+
).annotate({
|
|
235
|
+
identifier:
|
|
236
|
+
"ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostResponse",
|
|
237
|
+
}) as any as S.Schema<ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostResponse>;
|
|
238
|
+
|
|
239
|
+
export type GuardrailGuardrailInfoMap = { [key: string]: unknown | undefined };
|
|
240
|
+
export const GuardrailGuardrailInfoMap = /*@__PURE__*/ S.Record(
|
|
241
|
+
S.String,
|
|
242
|
+
S.Unknown,
|
|
243
|
+
) as any as S.Schema<GuardrailGuardrailInfoMap>;
|
|
244
|
+
|
|
245
|
+
/** 'block' raises an error; 'mask' replaces the code block with a placeholder. */
|
|
246
|
+
export type LitellmParamsAction = "block" | "mask";
|
|
247
|
+
export const LitellmParamsAction = S.String;
|
|
248
|
+
|
|
249
|
+
export type LitellmParamsAdditionalProviderSpecificParamsMap = {
|
|
250
|
+
[key: string]: unknown | undefined;
|
|
251
|
+
};
|
|
252
|
+
export const LitellmParamsAdditionalProviderSpecificParamsMap =
|
|
253
|
+
/*@__PURE__*/ S.Record(
|
|
254
|
+
S.String,
|
|
255
|
+
S.Unknown,
|
|
256
|
+
) as any as S.Schema<LitellmParamsAdditionalProviderSpecificParamsMap>;
|
|
257
|
+
|
|
258
|
+
export type LitellmParamsAssertionsList = Array<string>;
|
|
259
|
+
export const LitellmParamsAssertionsList = /*@__PURE__*/ S.Array(
|
|
260
|
+
S.String,
|
|
261
|
+
) as any as S.Schema<LitellmParamsAssertionsList>;
|
|
262
|
+
|
|
263
|
+
export type LitellmParamsBlockedLanguagesList = Array<string>;
|
|
264
|
+
export const LitellmParamsBlockedLanguagesList = /*@__PURE__*/ S.Array(
|
|
265
|
+
S.String,
|
|
266
|
+
) as any as S.Schema<LitellmParamsBlockedLanguagesList>;
|
|
267
|
+
|
|
268
|
+
/** Action to take when content filter detects a match */
|
|
269
|
+
export type ContentFilterAction = "BLOCK" | "MASK";
|
|
270
|
+
export const ContentFilterAction = S.String;
|
|
271
|
+
|
|
272
|
+
/** Represents a blocked word with its action and optional description */
|
|
273
|
+
export interface BlockedWord {
|
|
274
|
+
/** Action to take when keyword is detected (BLOCK or MASK) */
|
|
275
|
+
action: ContentFilterAction | (string & {});
|
|
276
|
+
/** Optional description explaining why this keyword is sensitive */
|
|
277
|
+
description?: string | null;
|
|
278
|
+
/** The keyword to block or mask */
|
|
279
|
+
keyword: string;
|
|
280
|
+
}
|
|
281
|
+
export const BlockedWord = /*@__PURE__*/ S.suspend(() =>
|
|
282
|
+
S.Struct({
|
|
283
|
+
action: ContentFilterAction,
|
|
284
|
+
description: S.optional(S.NullOr(S.String)),
|
|
285
|
+
keyword: S.String,
|
|
286
|
+
}),
|
|
287
|
+
).annotate({ identifier: "BlockedWord" }) as any as S.Schema<BlockedWord>;
|
|
288
|
+
|
|
289
|
+
export type LitellmParamsBlockedWordsList = Array<BlockedWord>;
|
|
290
|
+
export const LitellmParamsBlockedWordsList = /*@__PURE__*/ S.Array(
|
|
291
|
+
BlockedWord,
|
|
292
|
+
) as any as S.Schema<LitellmParamsBlockedWordsList>;
|
|
293
|
+
|
|
294
|
+
/** The action to take when the category is detected */
|
|
295
|
+
export type ContentFilterCategoryConfigAction = "BLOCK" | "MASK";
|
|
296
|
+
export const ContentFilterCategoryConfigAction = S.String;
|
|
297
|
+
|
|
298
|
+
/** The severity threshold to detect the category */
|
|
299
|
+
export type ContentFilterCategoryConfigSeverityThreshold =
|
|
300
|
+
| "high"
|
|
301
|
+
| "medium"
|
|
302
|
+
| "low";
|
|
303
|
+
export const ContentFilterCategoryConfigSeverityThreshold = S.String;
|
|
304
|
+
|
|
305
|
+
/** category: "harmful_self_harm" enabled: true action: "BLOCK" severity_threshold: "medium" category_file: "/path/to/custom_file.yaml" # optional override */
|
|
306
|
+
export interface ContentFilterCategoryConfig {
|
|
307
|
+
/** The action to take when the category is detected */
|
|
308
|
+
action: ContentFilterCategoryConfigAction | (string & {});
|
|
309
|
+
/** The category to detect */
|
|
310
|
+
category: string;
|
|
311
|
+
/** Optional override. Use your own category file instead of the default one. */
|
|
312
|
+
category_file?: string | null;
|
|
313
|
+
/** Whether the category is enabled */
|
|
314
|
+
enabled?: boolean;
|
|
315
|
+
/** The severity threshold to detect the category */
|
|
316
|
+
severity_threshold?:
|
|
317
|
+
| ContentFilterCategoryConfigSeverityThreshold
|
|
318
|
+
| (string & {});
|
|
319
|
+
}
|
|
320
|
+
export const ContentFilterCategoryConfig = /*@__PURE__*/ S.suspend(() =>
|
|
321
|
+
S.Struct({
|
|
322
|
+
action: ContentFilterCategoryConfigAction,
|
|
323
|
+
category: S.String,
|
|
324
|
+
category_file: S.optional(S.NullOr(S.String)),
|
|
325
|
+
enabled: S.optional(S.Boolean),
|
|
326
|
+
severity_threshold: S.optional(
|
|
327
|
+
ContentFilterCategoryConfigSeverityThreshold,
|
|
328
|
+
),
|
|
329
|
+
}),
|
|
330
|
+
).annotate({
|
|
331
|
+
identifier: "ContentFilterCategoryConfig",
|
|
332
|
+
}) as any as S.Schema<ContentFilterCategoryConfig>;
|
|
333
|
+
|
|
334
|
+
export type LitellmParamsCategoriesList = Array<ContentFilterCategoryConfig>;
|
|
335
|
+
export const LitellmParamsCategoriesList = /*@__PURE__*/ S.Array(
|
|
336
|
+
ContentFilterCategoryConfig,
|
|
337
|
+
) as any as S.Schema<LitellmParamsCategoriesList>;
|
|
338
|
+
|
|
339
|
+
export interface LakeraCategoryThresholds {
|
|
340
|
+
jailbreak?: number;
|
|
341
|
+
prompt_injection?: number;
|
|
342
|
+
}
|
|
343
|
+
export const LakeraCategoryThresholds = /*@__PURE__*/ S.suspend(() =>
|
|
344
|
+
S.Struct({
|
|
345
|
+
jailbreak: S.optional(S.Number),
|
|
346
|
+
prompt_injection: S.optional(S.Number),
|
|
347
|
+
}),
|
|
348
|
+
).annotate({
|
|
349
|
+
identifier: "LakeraCategoryThresholds",
|
|
350
|
+
}) as any as S.Schema<LakeraCategoryThresholds>;
|
|
351
|
+
|
|
352
|
+
export type BedrockChecksContentFilterCategoryItemCategory =
|
|
353
|
+
| "VIOLENCE"
|
|
354
|
+
| "HATE"
|
|
355
|
+
| "SEXUAL"
|
|
356
|
+
| "MISCONDUCT"
|
|
357
|
+
| "INSULTS";
|
|
358
|
+
export const BedrockChecksContentFilterCategoryItemCategory = S.String;
|
|
359
|
+
|
|
360
|
+
export interface BedrockChecksContentFilterCategoryItem {
|
|
361
|
+
category: BedrockChecksContentFilterCategoryItemCategory | (string & {});
|
|
362
|
+
}
|
|
363
|
+
export const BedrockChecksContentFilterCategoryItem = /*@__PURE__*/ S.suspend(
|
|
364
|
+
() =>
|
|
365
|
+
S.Struct({
|
|
366
|
+
category: BedrockChecksContentFilterCategoryItemCategory,
|
|
367
|
+
}),
|
|
368
|
+
).annotate({
|
|
369
|
+
identifier: "BedrockChecksContentFilterCategoryItem",
|
|
370
|
+
}) as any as S.Schema<BedrockChecksContentFilterCategoryItem>;
|
|
371
|
+
|
|
372
|
+
export type BedrockChecksContentFilterModelCategoriesList =
|
|
373
|
+
Array<BedrockChecksContentFilterCategoryItem>;
|
|
374
|
+
export const BedrockChecksContentFilterModelCategoriesList =
|
|
375
|
+
/*@__PURE__*/ S.Array(
|
|
376
|
+
BedrockChecksContentFilterCategoryItem,
|
|
377
|
+
) as any as S.Schema<BedrockChecksContentFilterModelCategoriesList>;
|
|
378
|
+
|
|
379
|
+
export interface BedrockChecksContentFilterModel {
|
|
380
|
+
categories: BedrockChecksContentFilterModelCategoriesList;
|
|
381
|
+
}
|
|
382
|
+
export const BedrockChecksContentFilterModel = /*@__PURE__*/ S.suspend(() =>
|
|
383
|
+
S.Struct({
|
|
384
|
+
categories: BedrockChecksContentFilterModelCategoriesList,
|
|
385
|
+
}),
|
|
386
|
+
).annotate({
|
|
387
|
+
identifier: "BedrockChecksContentFilterModel",
|
|
388
|
+
}) as any as S.Schema<BedrockChecksContentFilterModel>;
|
|
389
|
+
|
|
390
|
+
export type BedrockChecksPromptAttackCategoryItemCategory =
|
|
391
|
+
| "JAILBREAK"
|
|
392
|
+
| "PROMPT_INJECTION"
|
|
393
|
+
| "PROMPT_LEAKAGE";
|
|
394
|
+
export const BedrockChecksPromptAttackCategoryItemCategory = S.String;
|
|
395
|
+
|
|
396
|
+
export interface BedrockChecksPromptAttackCategoryItem {
|
|
397
|
+
category: BedrockChecksPromptAttackCategoryItemCategory | (string & {});
|
|
398
|
+
}
|
|
399
|
+
export const BedrockChecksPromptAttackCategoryItem = /*@__PURE__*/ S.suspend(
|
|
400
|
+
() =>
|
|
401
|
+
S.Struct({
|
|
402
|
+
category: BedrockChecksPromptAttackCategoryItemCategory,
|
|
403
|
+
}),
|
|
404
|
+
).annotate({
|
|
405
|
+
identifier: "BedrockChecksPromptAttackCategoryItem",
|
|
406
|
+
}) as any as S.Schema<BedrockChecksPromptAttackCategoryItem>;
|
|
407
|
+
|
|
408
|
+
export type BedrockChecksPromptAttackModelCategoriesList =
|
|
409
|
+
Array<BedrockChecksPromptAttackCategoryItem>;
|
|
410
|
+
export const BedrockChecksPromptAttackModelCategoriesList =
|
|
411
|
+
/*@__PURE__*/ S.Array(
|
|
412
|
+
BedrockChecksPromptAttackCategoryItem,
|
|
413
|
+
) as any as S.Schema<BedrockChecksPromptAttackModelCategoriesList>;
|
|
414
|
+
|
|
415
|
+
export interface BedrockChecksPromptAttackModel {
|
|
416
|
+
categories: BedrockChecksPromptAttackModelCategoriesList;
|
|
417
|
+
}
|
|
418
|
+
export const BedrockChecksPromptAttackModel = /*@__PURE__*/ S.suspend(() =>
|
|
419
|
+
S.Struct({
|
|
420
|
+
categories: BedrockChecksPromptAttackModelCategoriesList,
|
|
421
|
+
}),
|
|
422
|
+
).annotate({
|
|
423
|
+
identifier: "BedrockChecksPromptAttackModel",
|
|
424
|
+
}) as any as S.Schema<BedrockChecksPromptAttackModel>;
|
|
425
|
+
|
|
426
|
+
export type BedrockChecksSensitiveInformationEntityItemType =
|
|
427
|
+
| "ADDRESS"
|
|
428
|
+
| "AGE"
|
|
429
|
+
| "AWS_ACCESS_KEY"
|
|
430
|
+
| "AWS_SECRET_KEY"
|
|
431
|
+
| "CA_HEALTH_NUMBER"
|
|
432
|
+
| "CA_SOCIAL_INSURANCE_NUMBER"
|
|
433
|
+
| "CREDIT_DEBIT_CARD_CVV"
|
|
434
|
+
| "CREDIT_DEBIT_CARD_EXPIRY"
|
|
435
|
+
| "CREDIT_DEBIT_CARD_NUMBER"
|
|
436
|
+
| "DRIVER_ID"
|
|
437
|
+
| "EMAIL"
|
|
438
|
+
| "INTERNATIONAL_BANK_ACCOUNT_NUMBER"
|
|
439
|
+
| "IP_ADDRESS"
|
|
440
|
+
| "LICENSE_PLATE"
|
|
441
|
+
| "MAC_ADDRESS"
|
|
442
|
+
| "NAME"
|
|
443
|
+
| "PASSWORD"
|
|
444
|
+
| "PHONE"
|
|
445
|
+
| "PIN"
|
|
446
|
+
| "SWIFT_CODE"
|
|
447
|
+
| "UK_NATIONAL_HEALTH_SERVICE_NUMBER"
|
|
448
|
+
| "UK_NATIONAL_INSURANCE_NUMBER"
|
|
449
|
+
| "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"
|
|
450
|
+
| "URL"
|
|
451
|
+
| "USERNAME"
|
|
452
|
+
| "US_BANK_ACCOUNT_NUMBER"
|
|
453
|
+
| "US_BANK_ROUTING_NUMBER"
|
|
454
|
+
| "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"
|
|
455
|
+
| "US_PASSPORT_NUMBER"
|
|
456
|
+
| "US_SOCIAL_SECURITY_NUMBER"
|
|
457
|
+
| "VEHICLE_IDENTIFICATION_NUMBER";
|
|
458
|
+
export const BedrockChecksSensitiveInformationEntityItemType = S.String;
|
|
459
|
+
|
|
460
|
+
export interface BedrockChecksSensitiveInformationEntityItem {
|
|
461
|
+
type: BedrockChecksSensitiveInformationEntityItemType | (string & {});
|
|
462
|
+
}
|
|
463
|
+
export const BedrockChecksSensitiveInformationEntityItem =
|
|
464
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
465
|
+
S.Struct({
|
|
466
|
+
type: BedrockChecksSensitiveInformationEntityItemType,
|
|
467
|
+
}),
|
|
468
|
+
).annotate({
|
|
469
|
+
identifier: "BedrockChecksSensitiveInformationEntityItem",
|
|
470
|
+
}) as any as S.Schema<BedrockChecksSensitiveInformationEntityItem>;
|
|
471
|
+
|
|
472
|
+
export type BedrockChecksSensitiveInformationModelEntitiesList =
|
|
473
|
+
Array<BedrockChecksSensitiveInformationEntityItem>;
|
|
474
|
+
export const BedrockChecksSensitiveInformationModelEntitiesList =
|
|
475
|
+
/*@__PURE__*/ S.Array(
|
|
476
|
+
BedrockChecksSensitiveInformationEntityItem,
|
|
477
|
+
) as any as S.Schema<BedrockChecksSensitiveInformationModelEntitiesList>;
|
|
478
|
+
|
|
479
|
+
export interface BedrockChecksSensitiveInformationModel {
|
|
480
|
+
entities: BedrockChecksSensitiveInformationModelEntitiesList;
|
|
481
|
+
}
|
|
482
|
+
export const BedrockChecksSensitiveInformationModel = /*@__PURE__*/ S.suspend(
|
|
483
|
+
() =>
|
|
484
|
+
S.Struct({
|
|
485
|
+
entities: BedrockChecksSensitiveInformationModelEntitiesList,
|
|
486
|
+
}),
|
|
487
|
+
).annotate({
|
|
488
|
+
identifier: "BedrockChecksSensitiveInformationModel",
|
|
489
|
+
}) as any as S.Schema<BedrockChecksSensitiveInformationModel>;
|
|
490
|
+
|
|
491
|
+
/** Inline `checks` config for the resource-less Bedrock InvokeGuardrailChecks API. Include only the checks you want to run; at least one must be set. */
|
|
492
|
+
export interface BedrockChecksConfigModel {
|
|
493
|
+
contentFilter?: BedrockChecksContentFilterModel | null;
|
|
494
|
+
promptAttack?: BedrockChecksPromptAttackModel | null;
|
|
495
|
+
sensitiveInformation?: BedrockChecksSensitiveInformationModel | null;
|
|
496
|
+
}
|
|
497
|
+
export const BedrockChecksConfigModel = /*@__PURE__*/ S.suspend(() =>
|
|
498
|
+
S.Struct({
|
|
499
|
+
contentFilter: S.optional(S.NullOr(BedrockChecksContentFilterModel)),
|
|
500
|
+
promptAttack: S.optional(S.NullOr(BedrockChecksPromptAttackModel)),
|
|
501
|
+
sensitiveInformation: S.optional(
|
|
502
|
+
S.NullOr(BedrockChecksSensitiveInformationModel),
|
|
503
|
+
),
|
|
504
|
+
}),
|
|
505
|
+
).annotate({
|
|
506
|
+
identifier: "BedrockChecksConfigModel",
|
|
507
|
+
}) as any as S.Schema<BedrockChecksConfigModel>;
|
|
508
|
+
|
|
509
|
+
export type LitellmParamsConfigMap = { [key: string]: unknown | undefined };
|
|
510
|
+
export const LitellmParamsConfigMap = /*@__PURE__*/ S.Record(
|
|
511
|
+
S.String,
|
|
512
|
+
S.Unknown,
|
|
513
|
+
) as any as S.Schema<LitellmParamsConfigMap>;
|
|
514
|
+
|
|
515
|
+
/** Fallback decision when no rule matches */
|
|
516
|
+
export type LitellmParamsDefaultAction = "allow" | "deny";
|
|
517
|
+
export const LitellmParamsDefaultAction = S.String;
|
|
518
|
+
|
|
519
|
+
export type LitellmParamsDetectSecretsConfigMap = {
|
|
520
|
+
[key: string]: unknown | undefined;
|
|
521
|
+
};
|
|
522
|
+
export const LitellmParamsDetectSecretsConfigMap = /*@__PURE__*/ S.Record(
|
|
523
|
+
S.String,
|
|
524
|
+
S.Unknown,
|
|
525
|
+
) as any as S.Schema<LitellmParamsDetectSecretsConfigMap>;
|
|
526
|
+
|
|
527
|
+
export type LitellmParamsDetectorsMap = { [key: string]: unknown | undefined };
|
|
528
|
+
export const LitellmParamsDetectorsMap = /*@__PURE__*/ S.Record(
|
|
529
|
+
S.String,
|
|
530
|
+
S.Unknown,
|
|
531
|
+
) as any as S.Schema<LitellmParamsDetectorsMap>;
|
|
532
|
+
|
|
533
|
+
export type LitellmParamsExtraHeadersList = Array<string>;
|
|
534
|
+
export const LitellmParamsExtraHeadersList = /*@__PURE__*/ S.Array(
|
|
535
|
+
S.String,
|
|
536
|
+
) as any as S.Schema<LitellmParamsExtraHeadersList>;
|
|
537
|
+
|
|
538
|
+
export type LitellmParamsGroundingStrictness = "BALANCED" | "STRICT";
|
|
539
|
+
export const LitellmParamsGroundingStrictness = S.String;
|
|
540
|
+
|
|
541
|
+
export type LitellmParamsMetadataMap = { [key: string]: unknown | undefined };
|
|
542
|
+
export const LitellmParamsMetadataMap = /*@__PURE__*/ S.Record(
|
|
543
|
+
S.String,
|
|
544
|
+
S.Unknown,
|
|
545
|
+
) as any as S.Schema<LitellmParamsMetadataMap>;
|
|
546
|
+
|
|
547
|
+
export type LitellmParamsMockRedactedTextMap = {
|
|
548
|
+
[key: string]: unknown | undefined;
|
|
549
|
+
};
|
|
550
|
+
export const LitellmParamsMockRedactedTextMap = /*@__PURE__*/ S.Record(
|
|
551
|
+
S.String,
|
|
552
|
+
S.Unknown,
|
|
553
|
+
) as any as S.Schema<LitellmParamsMockRedactedTextMap>;
|
|
554
|
+
|
|
555
|
+
export type LitellmParamsModeCase1List = Array<string>;
|
|
556
|
+
export const LitellmParamsModeCase1List = /*@__PURE__*/ S.Array(
|
|
557
|
+
S.String,
|
|
558
|
+
) as any as S.Schema<LitellmParamsModeCase1List>;
|
|
559
|
+
|
|
560
|
+
export type ModeDefaultCase1List = Array<string>;
|
|
561
|
+
export const ModeDefaultCase1List = /*@__PURE__*/ S.Array(
|
|
562
|
+
S.String,
|
|
563
|
+
) as any as S.Schema<ModeDefaultCase1List>;
|
|
564
|
+
|
|
565
|
+
/** Default mode when no tags match */
|
|
566
|
+
export type ModeDefault = string | ModeDefaultCase1List;
|
|
567
|
+
export const ModeDefault = S.Unknown as any as S.Schema<ModeDefault>;
|
|
568
|
+
|
|
569
|
+
export type ModeTagsValueCase1List = Array<string>;
|
|
570
|
+
export const ModeTagsValueCase1List = /*@__PURE__*/ S.Array(
|
|
571
|
+
S.String,
|
|
572
|
+
) as any as S.Schema<ModeTagsValueCase1List>;
|
|
573
|
+
|
|
574
|
+
export type ModeTagsValue = string | ModeTagsValueCase1List;
|
|
575
|
+
export const ModeTagsValue = S.Unknown as any as S.Schema<ModeTagsValue>;
|
|
576
|
+
|
|
577
|
+
/** Tags for the guardrail mode */
|
|
578
|
+
export type ModeTagsMap = { [key: string]: ModeTagsValue | undefined };
|
|
579
|
+
export const ModeTagsMap = /*@__PURE__*/ S.Record(
|
|
580
|
+
S.String,
|
|
581
|
+
ModeTagsValue,
|
|
582
|
+
) as any as S.Schema<ModeTagsMap>;
|
|
583
|
+
|
|
584
|
+
export interface Mode {
|
|
585
|
+
/** Default mode when no tags match */
|
|
586
|
+
default?: ModeDefault | null;
|
|
587
|
+
/** Tags for the guardrail mode */
|
|
588
|
+
tags: ModeTagsMap;
|
|
589
|
+
}
|
|
590
|
+
export const Mode = /*@__PURE__*/ S.suspend(() =>
|
|
591
|
+
S.Struct({
|
|
592
|
+
default: S.optional(S.NullOr(ModeDefault)),
|
|
593
|
+
tags: ModeTagsMap,
|
|
594
|
+
}),
|
|
595
|
+
).annotate({ identifier: "Mode" }) as any as S.Schema<Mode>;
|
|
596
|
+
|
|
597
|
+
/** When to apply the guardrail (pre_call, post_call, during_call, logging_only) */
|
|
598
|
+
export type LitellmParamsMode = string | LitellmParamsModeCase1List | Mode;
|
|
599
|
+
export const LitellmParamsMode =
|
|
600
|
+
S.Unknown as any as S.Schema<LitellmParamsMode>;
|
|
601
|
+
|
|
602
|
+
/** Choose whether disallowed tools block the request or get rewritten out of the payload */
|
|
603
|
+
export type LitellmParamsOnDisallowedAction = "block" | "rewrite";
|
|
604
|
+
export const LitellmParamsOnDisallowedAction = S.String;
|
|
605
|
+
|
|
606
|
+
export type LitellmParamsOnFlagged =
|
|
607
|
+
| "block"
|
|
608
|
+
| "monitor"
|
|
609
|
+
| "inject_system_message";
|
|
610
|
+
export const LitellmParamsOnFlagged = S.String;
|
|
611
|
+
|
|
612
|
+
export type LitellmParamsOnSensitiveData = "block" | "route";
|
|
613
|
+
export const LitellmParamsOnSensitiveData = S.String;
|
|
614
|
+
|
|
615
|
+
export type LitellmParamsOnViolation = "warn" | "end_session";
|
|
616
|
+
export const LitellmParamsOnViolation = S.String;
|
|
617
|
+
|
|
618
|
+
export type CiscoAIDefenseRuleEntityTypesList = Array<string>;
|
|
619
|
+
export const CiscoAIDefenseRuleEntityTypesList = /*@__PURE__*/ S.Array(
|
|
620
|
+
S.String,
|
|
621
|
+
) as any as S.Schema<CiscoAIDefenseRuleEntityTypesList>;
|
|
622
|
+
|
|
623
|
+
/** The canonical Cisco AI Defense rule name to evaluate. */
|
|
624
|
+
export type CiscoAIDefenseRuleRuleName =
|
|
625
|
+
| "Code Detection"
|
|
626
|
+
| "Harassment"
|
|
627
|
+
| "Hate Speech"
|
|
628
|
+
| "PCI"
|
|
629
|
+
| "PHI"
|
|
630
|
+
| "PII"
|
|
631
|
+
| "Prompt Injection"
|
|
632
|
+
| "Profanity"
|
|
633
|
+
| "Sexual Content & Exploitation"
|
|
634
|
+
| "Social Division & Polarization"
|
|
635
|
+
| "Violence & Public Safety Threats";
|
|
636
|
+
export const CiscoAIDefenseRuleRuleName = S.String;
|
|
637
|
+
|
|
638
|
+
/** A single rule to enable for Cisco AI Defense inspection. */
|
|
639
|
+
export interface CiscoAIDefenseRule {
|
|
640
|
+
/** Optional list of entity types for the rule (e.g. 'Email Address', 'Phone Number'). Applies to rules such as PII, PCI, and PHI. */
|
|
641
|
+
entity_types?: CiscoAIDefenseRuleEntityTypesList | null;
|
|
642
|
+
/** The canonical Cisco AI Defense rule name to evaluate. */
|
|
643
|
+
rule_name: CiscoAIDefenseRuleRuleName | (string & {});
|
|
644
|
+
}
|
|
645
|
+
export const CiscoAIDefenseRule = /*@__PURE__*/ S.suspend(() =>
|
|
646
|
+
S.Struct({
|
|
647
|
+
entity_types: S.optional(S.NullOr(CiscoAIDefenseRuleEntityTypesList)),
|
|
648
|
+
rule_name: CiscoAIDefenseRuleRuleName,
|
|
649
|
+
}),
|
|
650
|
+
).annotate({
|
|
651
|
+
identifier: "CiscoAIDefenseRule",
|
|
652
|
+
}) as any as S.Schema<CiscoAIDefenseRule>;
|
|
653
|
+
|
|
654
|
+
export type CiscoAIDefenseGuardrailConfigModelOptionalParamsEnabledRulesList =
|
|
655
|
+
Array<CiscoAIDefenseRule>;
|
|
656
|
+
export const CiscoAIDefenseGuardrailConfigModelOptionalParamsEnabledRulesList =
|
|
657
|
+
/*@__PURE__*/ S.Array(
|
|
658
|
+
CiscoAIDefenseRule,
|
|
659
|
+
) as any as S.Schema<CiscoAIDefenseGuardrailConfigModelOptionalParamsEnabledRulesList>;
|
|
660
|
+
|
|
661
|
+
export type CiscoAIDefenseGuardrailConfigModelOptionalParamsFallbackOnError =
|
|
662
|
+
| "allow"
|
|
663
|
+
| "block";
|
|
664
|
+
export const CiscoAIDefenseGuardrailConfigModelOptionalParamsFallbackOnError =
|
|
665
|
+
S.String;
|
|
666
|
+
|
|
667
|
+
/** Which Cisco AI Defense inspection surface to use. 'chat' scans LLM model conversations via /api/v1/inspect/chat. 'mcp' scans MCP tool calls via /api/v1/inspect/mcp. Each guardrail instance targets exactly one surface; configure two guardrails to scan both chat and MCP traffic. */
|
|
668
|
+
export type CiscoAIDefenseGuardrailConfigModelOptionalParamsInspectionType =
|
|
669
|
+
| "chat"
|
|
670
|
+
| "mcp";
|
|
671
|
+
export const CiscoAIDefenseGuardrailConfigModelOptionalParamsInspectionType =
|
|
672
|
+
S.String;
|
|
673
|
+
|
|
674
|
+
/** Optional parameters for the Cisco AI Defense guardrail. */
|
|
675
|
+
export interface CiscoAIDefenseGuardrailConfigModelOptionalParams {
|
|
676
|
+
/** Explicit list of Cisco AI Defense rules to evaluate. If omitted, the policies configured for the API key in the Cisco AI Defense UI are used. */
|
|
677
|
+
enabled_rules?: CiscoAIDefenseGuardrailConfigModelOptionalParamsEnabledRulesList | null;
|
|
678
|
+
/** Behaviour when the Cisco AI Defense API is unavailable: 'allow' proceeds without scanning (high availability), 'block' rejects the request (maximum security). */
|
|
679
|
+
fallback_on_error?:
|
|
680
|
+
| CiscoAIDefenseGuardrailConfigModelOptionalParamsFallbackOnError
|
|
681
|
+
| (string & {})
|
|
682
|
+
| null;
|
|
683
|
+
/** Override for the inspection endpoint path. Defaults to /api/v1/inspect/chat when inspection_type='chat' and /api/v1/inspect/mcp when inspection_type='mcp'. */
|
|
684
|
+
inspect_path?: string | null;
|
|
685
|
+
/** Which Cisco AI Defense inspection surface to use. 'chat' scans LLM model conversations via /api/v1/inspect/chat. 'mcp' scans MCP tool calls via /api/v1/inspect/mcp. Each guardrail instance targets exactly one surface; configure two guardrails to scan both chat and MCP traffic. */
|
|
686
|
+
inspection_type?:
|
|
687
|
+
| CiscoAIDefenseGuardrailConfigModelOptionalParamsInspectionType
|
|
688
|
+
| (string & {});
|
|
689
|
+
/** Integration profile id to apply (advanced). */
|
|
690
|
+
integration_profile_id?: string | null;
|
|
691
|
+
/** Integration profile version to apply (advanced). */
|
|
692
|
+
integration_profile_version?: string | null;
|
|
693
|
+
/** Integration tenant id to apply (advanced). */
|
|
694
|
+
integration_tenant_id?: string | null;
|
|
695
|
+
/** Integration type to apply (advanced). */
|
|
696
|
+
integration_type?: string | null;
|
|
697
|
+
/** Action to take when Cisco AI Defense flags content. 'block' raises an HTTPException; 'monitor' logs the detection and lets the request continue. */
|
|
698
|
+
on_flagged_action?: string | null;
|
|
699
|
+
/** Timeout (seconds) for Cisco AI Defense API calls (1-60). */
|
|
700
|
+
timeout?: number | null;
|
|
701
|
+
}
|
|
702
|
+
export const CiscoAIDefenseGuardrailConfigModelOptionalParams =
|
|
703
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
704
|
+
S.Struct({
|
|
705
|
+
enabled_rules: S.optional(
|
|
706
|
+
S.NullOr(
|
|
707
|
+
CiscoAIDefenseGuardrailConfigModelOptionalParamsEnabledRulesList,
|
|
708
|
+
),
|
|
709
|
+
),
|
|
710
|
+
fallback_on_error: S.optional(
|
|
711
|
+
S.NullOr(
|
|
712
|
+
CiscoAIDefenseGuardrailConfigModelOptionalParamsFallbackOnError,
|
|
713
|
+
),
|
|
714
|
+
),
|
|
715
|
+
inspect_path: S.optional(S.NullOr(S.String)),
|
|
716
|
+
inspection_type: S.optional(
|
|
717
|
+
CiscoAIDefenseGuardrailConfigModelOptionalParamsInspectionType,
|
|
718
|
+
),
|
|
719
|
+
integration_profile_id: S.optional(S.NullOr(S.String)),
|
|
720
|
+
integration_profile_version: S.optional(S.NullOr(S.String)),
|
|
721
|
+
integration_tenant_id: S.optional(S.NullOr(S.String)),
|
|
722
|
+
integration_type: S.optional(S.NullOr(S.String)),
|
|
723
|
+
on_flagged_action: S.optional(S.NullOr(S.String)),
|
|
724
|
+
timeout: S.optional(S.NullOr(S.Number)),
|
|
725
|
+
}),
|
|
726
|
+
).annotate({
|
|
727
|
+
identifier: "CiscoAIDefenseGuardrailConfigModelOptionalParams",
|
|
728
|
+
}) as any as S.Schema<CiscoAIDefenseGuardrailConfigModelOptionalParams>;
|
|
729
|
+
|
|
730
|
+
/** Type of pattern: 'prebuilt' for predefined patterns or 'regex' for custom */
|
|
731
|
+
export type ContentFilterPatternPatternType = "prebuilt" | "regex";
|
|
732
|
+
export const ContentFilterPatternPatternType = S.String;
|
|
733
|
+
|
|
734
|
+
/** Represents a content filter pattern (prebuilt or custom regex) */
|
|
735
|
+
export interface ContentFilterPattern {
|
|
736
|
+
/** Action to take when pattern matches (BLOCK or MASK) */
|
|
737
|
+
action: ContentFilterAction | (string & {});
|
|
738
|
+
/** Name for this pattern (used in logging and error messages) */
|
|
739
|
+
name?: string | null;
|
|
740
|
+
/** Custom regex pattern. Required if pattern_type is 'regex' */
|
|
741
|
+
pattern?: string | null;
|
|
742
|
+
/** Name of prebuilt pattern (e.g., 'us_ssn', 'credit_card'). Required if pattern_type is 'prebuilt' */
|
|
743
|
+
pattern_name?: string | null;
|
|
744
|
+
/** Type of pattern: 'prebuilt' for predefined patterns or 'regex' for custom */
|
|
745
|
+
pattern_type: ContentFilterPatternPatternType | (string & {});
|
|
746
|
+
}
|
|
747
|
+
export const ContentFilterPattern = /*@__PURE__*/ S.suspend(() =>
|
|
748
|
+
S.Struct({
|
|
749
|
+
action: ContentFilterAction,
|
|
750
|
+
name: S.optional(S.NullOr(S.String)),
|
|
751
|
+
pattern: S.optional(S.NullOr(S.String)),
|
|
752
|
+
pattern_name: S.optional(S.NullOr(S.String)),
|
|
753
|
+
pattern_type: ContentFilterPatternPatternType,
|
|
754
|
+
}),
|
|
755
|
+
).annotate({
|
|
756
|
+
identifier: "ContentFilterPattern",
|
|
757
|
+
}) as any as S.Schema<ContentFilterPattern>;
|
|
758
|
+
|
|
759
|
+
export type LitellmParamsPatternsList = Array<ContentFilterPattern>;
|
|
760
|
+
export const LitellmParamsPatternsList = /*@__PURE__*/ S.Array(
|
|
761
|
+
ContentFilterPattern,
|
|
762
|
+
) as any as S.Schema<LitellmParamsPatternsList>;
|
|
763
|
+
|
|
764
|
+
export type PiiAction = "BLOCK" | "MASK";
|
|
765
|
+
export const PiiAction = S.String;
|
|
766
|
+
|
|
767
|
+
export type LitellmParamsPiiEntitiesConfigMap = {
|
|
768
|
+
[key: string]: PiiAction | (string & {}) | undefined;
|
|
769
|
+
};
|
|
770
|
+
export const LitellmParamsPiiEntitiesConfigMap = /*@__PURE__*/ S.Record(
|
|
771
|
+
S.String,
|
|
772
|
+
PiiAction,
|
|
773
|
+
) as any as S.Schema<LitellmParamsPiiEntitiesConfigMap>;
|
|
774
|
+
|
|
775
|
+
export type LitellmParamsPolicyNamesList = Array<string>;
|
|
776
|
+
export const LitellmParamsPolicyNamesList = /*@__PURE__*/ S.Array(
|
|
777
|
+
S.String,
|
|
778
|
+
) as any as S.Schema<LitellmParamsPolicyNamesList>;
|
|
779
|
+
|
|
780
|
+
export type LitellmParamsPresidioEntitiesDenyListItem = PiiEntityType | string;
|
|
781
|
+
export const LitellmParamsPresidioEntitiesDenyListItem =
|
|
782
|
+
S.Unknown as any as S.Schema<LitellmParamsPresidioEntitiesDenyListItem>;
|
|
783
|
+
|
|
784
|
+
export type LitellmParamsPresidioEntitiesDenyListList =
|
|
785
|
+
Array<LitellmParamsPresidioEntitiesDenyListItem>;
|
|
786
|
+
export const LitellmParamsPresidioEntitiesDenyListList = /*@__PURE__*/ S.Array(
|
|
787
|
+
LitellmParamsPresidioEntitiesDenyListItem,
|
|
788
|
+
) as any as S.Schema<LitellmParamsPresidioEntitiesDenyListList>;
|
|
789
|
+
|
|
790
|
+
export type LitellmParamsPresidioFilterScope = "input" | "output" | "both";
|
|
791
|
+
export const LitellmParamsPresidioFilterScope = S.String;
|
|
792
|
+
|
|
793
|
+
export type LitellmParamsPresidioRunOn = "input" | "output" | "both";
|
|
794
|
+
export const LitellmParamsPresidioRunOn = S.String;
|
|
795
|
+
|
|
796
|
+
export type LitellmParamsPresidioScoreThresholdsMap = {
|
|
797
|
+
[key: string]: number | undefined;
|
|
798
|
+
};
|
|
799
|
+
export const LitellmParamsPresidioScoreThresholdsMap = /*@__PURE__*/ S.Record(
|
|
800
|
+
S.String,
|
|
801
|
+
S.Number,
|
|
802
|
+
) as any as S.Schema<LitellmParamsPresidioScoreThresholdsMap>;
|
|
803
|
+
|
|
804
|
+
export type ToolPermissionRuleAllowedParamPatternsMap = {
|
|
805
|
+
[key: string]: string | undefined;
|
|
806
|
+
};
|
|
807
|
+
export const ToolPermissionRuleAllowedParamPatternsMap = /*@__PURE__*/ S.Record(
|
|
808
|
+
S.String,
|
|
809
|
+
S.String,
|
|
810
|
+
) as any as S.Schema<ToolPermissionRuleAllowedParamPatternsMap>;
|
|
811
|
+
|
|
812
|
+
/** Whether to allow or deny this tool usage */
|
|
813
|
+
export type ToolPermissionRuleDecision = "allow" | "deny";
|
|
814
|
+
export const ToolPermissionRuleDecision = S.String;
|
|
815
|
+
|
|
816
|
+
/** A rule defining permission for a specific tool or tool pattern */
|
|
817
|
+
export interface ToolPermissionRule {
|
|
818
|
+
/** Optional regex map enforcing nested parameter values using dot/[] paths */
|
|
819
|
+
allowed_param_patterns?: ToolPermissionRuleAllowedParamPatternsMap | null;
|
|
820
|
+
/** Whether to allow or deny this tool usage */
|
|
821
|
+
decision: ToolPermissionRuleDecision | (string & {});
|
|
822
|
+
/** Unique identifier for the rule */
|
|
823
|
+
id: string;
|
|
824
|
+
/** Regex pattern applied to the tool's function name */
|
|
825
|
+
tool_name?: string | null;
|
|
826
|
+
/** Regex pattern applied to the tool type (e.g., function) */
|
|
827
|
+
tool_type?: string | null;
|
|
828
|
+
}
|
|
829
|
+
export const ToolPermissionRule = /*@__PURE__*/ S.suspend(() =>
|
|
830
|
+
S.Struct({
|
|
831
|
+
allowed_param_patterns: S.optional(
|
|
832
|
+
S.NullOr(ToolPermissionRuleAllowedParamPatternsMap),
|
|
833
|
+
),
|
|
834
|
+
decision: ToolPermissionRuleDecision,
|
|
835
|
+
id: S.String,
|
|
836
|
+
tool_name: S.optional(S.NullOr(S.String)),
|
|
837
|
+
tool_type: S.optional(S.NullOr(S.String)),
|
|
838
|
+
}),
|
|
839
|
+
).annotate({
|
|
840
|
+
identifier: "ToolPermissionRule",
|
|
841
|
+
}) as any as S.Schema<ToolPermissionRule>;
|
|
842
|
+
|
|
843
|
+
export type LitellmParamsRulesList = Array<ToolPermissionRule>;
|
|
844
|
+
export const LitellmParamsRulesList = /*@__PURE__*/ S.Array(
|
|
845
|
+
ToolPermissionRule,
|
|
846
|
+
) as any as S.Schema<LitellmParamsRulesList>;
|
|
847
|
+
|
|
848
|
+
/** Behavior when the headroom compression service is unreachable or errors. 'fail_closed' raises an error (default). 'fail_open' logs a critical error and forwards the request uncompressed instead of blocking it. */
|
|
849
|
+
export type LitellmParamsUnreachableFallback = "fail_closed" | "fail_open";
|
|
850
|
+
export const LitellmParamsUnreachableFallback = S.String;
|
|
851
|
+
|
|
852
|
+
export interface LitellmParams {
|
|
853
|
+
/** 'block' raises an error; 'mask' replaces the code block with a placeholder. */
|
|
854
|
+
action?: LitellmParamsAction | (string & {});
|
|
855
|
+
/** Additional provider-specific parameters for generic guardrail APIs */
|
|
856
|
+
additional_provider_specific_params?: LitellmParamsAdditionalProviderSpecificParamsMap | null;
|
|
857
|
+
/** Custom advisory message template used when on_flagged='inject_system_message'. Must contain a {reason} placeholder. Defaults to a generic advisory message if unset. */
|
|
858
|
+
advisory_system_message?: string | null;
|
|
859
|
+
/** Akto account ID for multi-tenant deployments. Env: AKTO_ACCOUNT_ID. Default: '1000000'. */
|
|
860
|
+
akto_account_id?: string | null;
|
|
861
|
+
/** API key for Akto. Env: AKTO_API_KEY. */
|
|
862
|
+
akto_api_key?: string | null;
|
|
863
|
+
/** Akto Guardrail API Base URL. Env: AKTO_GUARDRAIL_API_BASE. */
|
|
864
|
+
akto_base_url?: string | null;
|
|
865
|
+
/** Akto VXLAN ID. Env: AKTO_VXLAN_ID. Default: '0'. */
|
|
866
|
+
akto_vxlan_id?: string | null;
|
|
867
|
+
/** If True, replaces sensitive content with anonymized version when only PII/PCI/secrets are detected. Only applies in blocking mode. Defaults to False if not provided */
|
|
868
|
+
anonymize_input?: boolean | null;
|
|
869
|
+
/** Regional base URL for the Cisco AI Defense Inspection API. Defaults to https://us.api.inspect.aidefense.security.cisco.com. Supported regions: us (us-west-2), ap (ap-ne-1), eu (eu-central-1). The environment variable `CISCO_AI_DEFENSE_API_BASE` is consulted as a fallback. The endpoint path is derived from inspection_type (/api/v1/inspect/chat for 'chat', /api/v1/inspect/mcp for 'mcp'). */
|
|
870
|
+
api_base?: string | null;
|
|
871
|
+
/** Optional custom API endpoint for Model Armor */
|
|
872
|
+
api_endpoint?: string | null;
|
|
873
|
+
/** The Hiddenlayer API Id for the Hiddenlayer API. If not provided, the `HIDDENLAYER_CLIENT_ID` environment variable is checked or https://api.hiddenlayer.ai is used. */
|
|
874
|
+
api_id?: string | null;
|
|
875
|
+
/** API key for the Cisco AI Defense inspection endpoint. If not provided, the `CISCO_AI_DEFENSE_API_KEY` environment variable is used. Sent in the `X-Cisco-AI-Defense-API-Key` header. Both the chat and MCP endpoints use this key. */
|
|
876
|
+
api_key?: string | null;
|
|
877
|
+
/** API version for Javelin service */
|
|
878
|
+
api_version?: string | null;
|
|
879
|
+
/** Application name for Javelin service */
|
|
880
|
+
application?: string | null;
|
|
881
|
+
/** Application ID for Noma Security. Defaults to 'litellm' if not provided */
|
|
882
|
+
application_id?: string | null;
|
|
883
|
+
/** Custom assertions to validate against the output. Each assertion is a string describing a condition. */
|
|
884
|
+
assertions?: LitellmParamsAssertionsList | null;
|
|
885
|
+
/** Repello asset ID whose dashboard policies are enforced. Required; the guardrail raises at init if it is missing. */
|
|
886
|
+
asset_id?: string | null;
|
|
887
|
+
/** Set to True to request asynchronous analysis (sets `plr_async` header). Defaults to provider behaviour when omitted. */
|
|
888
|
+
async_mode?: boolean | null;
|
|
889
|
+
/** Authorization bearer token for IBM Guardrails API. Reads from IBM_GUARDRAILS_AUTH_TOKEN env var if None. */
|
|
890
|
+
auth_token?: string | null;
|
|
891
|
+
/** AWS access key ID for authentication */
|
|
892
|
+
aws_access_key_id?: string | null;
|
|
893
|
+
/** AWS Bedrock runtime endpoint URL */
|
|
894
|
+
aws_bedrock_runtime_endpoint?: string | null;
|
|
895
|
+
/** External ID required by the target role's trust policy on sts:AssumeRole */
|
|
896
|
+
aws_external_id?: string | null;
|
|
897
|
+
/** AWS profile name for credential retrieval */
|
|
898
|
+
aws_profile_name?: string | null;
|
|
899
|
+
/** AWS region where your guardrail is deployed */
|
|
900
|
+
aws_region_name?: string | null;
|
|
901
|
+
/** AWS role name for assuming roles */
|
|
902
|
+
aws_role_name?: string | null;
|
|
903
|
+
/** AWS secret access key for authentication */
|
|
904
|
+
aws_secret_access_key?: string | null;
|
|
905
|
+
/** Name of the AWS session */
|
|
906
|
+
aws_session_name?: string | null;
|
|
907
|
+
/** AWS session token for temporary credentials */
|
|
908
|
+
aws_session_token?: string | null;
|
|
909
|
+
/** AWS STS endpoint URL */
|
|
910
|
+
aws_sts_endpoint?: string | null;
|
|
911
|
+
/** Web identity token for AWS role assumption */
|
|
912
|
+
aws_web_identity_token?: string | null;
|
|
913
|
+
/** Base URL for the IBM Guardrails server */
|
|
914
|
+
base_url?: string | null;
|
|
915
|
+
/** If True, blocks requests on API failures. Defaults to True if not provided */
|
|
916
|
+
block_failures?: boolean | null;
|
|
917
|
+
/** Whether to block the request when the PromptGuard API is unreachable. Defaults to true (fail-closed). Set to false for fail-open behaviour. */
|
|
918
|
+
block_on_error?: boolean | null;
|
|
919
|
+
/** Whether to block requests when violations are detected. Defaults to True. */
|
|
920
|
+
block_on_violation?: boolean | null;
|
|
921
|
+
/** Language tags to block (e.g. python, javascript, bash). Empty or None = block all fenced code blocks. */
|
|
922
|
+
blocked_languages?: LitellmParamsBlockedLanguagesList | null;
|
|
923
|
+
/** List of blocked words with individual actions */
|
|
924
|
+
blocked_words?: LitellmParamsBlockedWordsList | null;
|
|
925
|
+
/** Path to YAML file containing blocked_words list */
|
|
926
|
+
blocked_words_file?: string | null;
|
|
927
|
+
/** Whether to include breakdown in the response */
|
|
928
|
+
breakdown?: boolean | null;
|
|
929
|
+
/** List of prebuilt categories to enable (harmful_*, bias_*) */
|
|
930
|
+
categories?: LitellmParamsCategoriesList | null;
|
|
931
|
+
/** Threshold configuration for Lakera guardrail categories */
|
|
932
|
+
category_thresholds?: LakeraCategoryThresholds | null;
|
|
933
|
+
/** Inline safeguards for the resource-less InvokeGuardrailChecks API (contentFilter / promptAttack / sensitiveInformation). When set, the guardrail calls InvokeGuardrailChecks instead of ApplyGuardrail and no guardrailIdentifier is required. Mutually exclusive with guardrailIdentifier. */
|
|
934
|
+
checks?: BedrockChecksConfigModel | null;
|
|
935
|
+
/** ApplyGuardrail: batch size, in characters, used to re-send content after AWS has rejected a request as too large. Requests AWS accepts are always sent in a single call, so this has no effect until a rejection happens. Defaults to 25,000; a batch AWS still rejects is bisected automatically, so this value only trades round trips against batch size and cannot fail a request on its own. */
|
|
936
|
+
chunk_budget_chars?: number;
|
|
937
|
+
/** Only block or mask when detection confidence >= this value; below threshold, allow or log_only. */
|
|
938
|
+
confidence_threshold?: number;
|
|
939
|
+
/** Additional configuration for the guardrail */
|
|
940
|
+
config?: LitellmParamsConfigMap | null;
|
|
941
|
+
/** InvokeGuardrailChecks: block when any contentFilter severityScore >= this value (scores are in [0,1]). Set to null to make the content filter detect-only (logged, never blocks). */
|
|
942
|
+
content_filter_threshold?: number | null;
|
|
943
|
+
/** Enable content moderation to check for harmful content (harassment, hate speech, etc.). */
|
|
944
|
+
content_moderation_check?: boolean | null;
|
|
945
|
+
/** Path to Google Cloud credentials JSON file or JSON string */
|
|
946
|
+
credentials?: string | null;
|
|
947
|
+
/** Python-like code containing the apply_guardrail function for custom guardrail logic */
|
|
948
|
+
custom_code?: string | null;
|
|
949
|
+
/** The DeepKeep Firewall ID to use for guardrail evaluation. If not provided, the `DEEPKEEP_FIREWALL_ID` environment variable is checked. */
|
|
950
|
+
deepkeep_firewall_id?: string | null;
|
|
951
|
+
/** Fallback decision when no rule matches */
|
|
952
|
+
default_action?: LitellmParamsDefaultAction | (string & {});
|
|
953
|
+
/** Whether the guardrail is enabled by default */
|
|
954
|
+
default_on?: boolean | null;
|
|
955
|
+
/** The EnkryptAI deployment name to use. Sent via X-Enkrypt-Deployment header. */
|
|
956
|
+
deployment_name?: string | null;
|
|
957
|
+
/** When True, block only when user intent is to run/execute; allow when intent is explain/refactor/don't run. Also block text-only execution requests (e.g. 'run `ls`', 'read /etc/passwd'). */
|
|
958
|
+
detect_execution_intent?: boolean;
|
|
959
|
+
/** Configuration for detect-secrets guardrail */
|
|
960
|
+
detect_secrets_config?: LitellmParamsDetectSecretsConfigMap | null;
|
|
961
|
+
/** Name of the detector inside the server (e.g., 'jailbreak-detector') */
|
|
962
|
+
detector_id?: string | null;
|
|
963
|
+
/** Dictionary of detector configurations (e.g., {'nsfw': {'enabled': True}, 'toxicity': {'enabled': True}}). */
|
|
964
|
+
detectors?: LitellmParamsDetectorsMap | null;
|
|
965
|
+
/** Whether to include developer information in the response */
|
|
966
|
+
dev_info?: boolean | null;
|
|
967
|
+
/** If True, will not raise an exception when the guardrail is blocked. Useful for OpenWebUI where exceptions can end the chat flow. */
|
|
968
|
+
disable_exception_on_block?: boolean | null;
|
|
969
|
+
/** For /v1/realtime sessions: automatically close the session after this many guardrail violations. */
|
|
970
|
+
end_session_after_n_fails?: number | null;
|
|
971
|
+
/** Pre-configured evaluation ID from Qualifire dashboard. When provided, uses invoke_evaluation() instead of evaluate(). */
|
|
972
|
+
evaluation_id?: string | null;
|
|
973
|
+
/** When True, guardrails only receive the latest message for the relevant role (e.g., newest user input pre-call, newest assistant output post-call) */
|
|
974
|
+
experimental_use_latest_role_message_only?: boolean | null;
|
|
975
|
+
/** Header names to forward from the client request to the guardrail (e.g. x-request-id). Only these headers' values are sent; others may be omitted or sent as [present]. Used by generic_guardrail_api (similar to MCP extra_headers). */
|
|
976
|
+
extra_headers?: LitellmParamsExtraHeadersList | null;
|
|
977
|
+
/** Whether to fail the request if the guardrail encounters an error. Implemented by guardrail='model_armor', 'generic_guardrail_api' and 'crowdstrike_aidr'. True (default) raises the error. False logs a critical error and lets the request proceed, so only a valid guardrail response can block or modify it. */
|
|
978
|
+
fail_on_error?: boolean | null;
|
|
979
|
+
/** Enable grounding verification to ensure output is grounded in provided context. */
|
|
980
|
+
grounding_check?: boolean | null;
|
|
981
|
+
/** Strictness level for XecGuard context-grounding validation. 'BALANCED' (default) treats INCOMPLETE answers as SAFE; 'STRICT' flags them as UNSAFE. Grounding only runs in post_call when `metadata.xecguard_grounding_documents` is provided. */
|
|
982
|
+
grounding_strictness?:
|
|
983
|
+
| LitellmParamsGroundingStrictness
|
|
984
|
+
| (string & {})
|
|
985
|
+
| null;
|
|
986
|
+
/** Name of the Javelin guard to use */
|
|
987
|
+
guard_name?: string | null;
|
|
988
|
+
/** The type of guardrail integration to use */
|
|
989
|
+
guardrail: string;
|
|
990
|
+
/** The ID of your guardrail on Bedrock */
|
|
991
|
+
guardrailIdentifier?: string | null;
|
|
992
|
+
/** The version of your Bedrock guardrail (e.g., DRAFT or version number) */
|
|
993
|
+
guardrailVersion?: string | null;
|
|
994
|
+
/** HTTP timeout in seconds. Default: 5. */
|
|
995
|
+
guardrail_timeout?: number | null;
|
|
996
|
+
/** Enable hallucination detection to detect factual inaccuracies. */
|
|
997
|
+
hallucinations_check?: boolean | null;
|
|
998
|
+
/** Include detailed evidence payloads in responses (sets `plr_evidence` header). */
|
|
999
|
+
include_evidence?: boolean | null;
|
|
1000
|
+
/** Include scanner category summaries in responses (sets `plr_scanners` header). */
|
|
1001
|
+
include_scanners?: boolean | null;
|
|
1002
|
+
/** Boolean flag to determine if calling a detector server (True) or the FMS Orchestrator (False). Defaults to True. */
|
|
1003
|
+
is_detector_server?: boolean | null;
|
|
1004
|
+
/** Tag to use for keyword redaction */
|
|
1005
|
+
keyword_redaction_tag?: string | null;
|
|
1006
|
+
/** Conversation ID for the Lasso guardrail */
|
|
1007
|
+
lasso_conversation_id?: string | null;
|
|
1008
|
+
/** User ID for the Lasso guardrail */
|
|
1009
|
+
lasso_user_id?: string | null;
|
|
1010
|
+
/** Google Cloud location/region (e.g., us-central1) */
|
|
1011
|
+
location?: string | null;
|
|
1012
|
+
/** Enable content masking using Lasso classifix API */
|
|
1013
|
+
mask?: boolean | null;
|
|
1014
|
+
/** Will mask request content if guardrail makes any changes */
|
|
1015
|
+
mask_request_content?: boolean | null;
|
|
1016
|
+
/** Will mask response content if guardrail makes any changes */
|
|
1017
|
+
mask_response_content?: boolean | null;
|
|
1018
|
+
/** Additional metadata to include in the request */
|
|
1019
|
+
metadata?: LitellmParamsMetadataMap | null;
|
|
1020
|
+
/** Mock redacted text for testing */
|
|
1021
|
+
mock_redacted_text?: LitellmParamsMockRedactedTextMap | null;
|
|
1022
|
+
/** When to apply the guardrail (pre_call, post_call, during_call, logging_only) */
|
|
1023
|
+
mode: LitellmParamsMode;
|
|
1024
|
+
/** Model name forwarded to the headroom /v1/compress endpoint. */
|
|
1025
|
+
model?: string | null;
|
|
1026
|
+
/** If True, logs violations without blocking. Defaults to False if not provided */
|
|
1027
|
+
monitor_mode?: boolean | null;
|
|
1028
|
+
/** Choose whether disallowed tools block the request or get rewritten out of the payload */
|
|
1029
|
+
on_disallowed_action?: LitellmParamsOnDisallowedAction | (string & {});
|
|
1030
|
+
/** Action to take when content is flagged: 'block' (raise exception), 'monitor' (log only), or 'inject_system_message' (append an advisory system message and let the LLM decide) */
|
|
1031
|
+
on_flagged?: LitellmParamsOnFlagged | (string & {}) | null;
|
|
1032
|
+
/** Action to take when content is flagged: 'block' (raise exception) or 'monitor' (log only) */
|
|
1033
|
+
on_flagged_action?: string | null;
|
|
1034
|
+
/** Action to take when sensitive data is detected. 'block' raises an exception (default behavior). 'route' reroutes the request to the model specified in sensitive_data_route_to_model. */
|
|
1035
|
+
on_sensitive_data?: LitellmParamsOnSensitiveData | (string & {}) | null;
|
|
1036
|
+
/** For /v1/realtime sessions: 'warn' speaks the violation message and continues; 'end_session' speaks the message and closes the connection. */
|
|
1037
|
+
on_violation?: LitellmParamsOnViolation | (string & {}) | null;
|
|
1038
|
+
/** When True, the guardrail only scans messages that have not already been scanned earlier in the same session (identified by litellm_session_id / session_id). Message content is hashed per session and cached; only the diff (new or edited messages) is sent to the guardrail provider on follow-up calls. Falls back to a full scan when the request has no session id or the cache is unavailable. Intended for blocking/detection guardrails; not applied when mask_request_content is set. */
|
|
1039
|
+
only_scan_new_messages?: boolean | null;
|
|
1040
|
+
/** Optional parameters for the guardrail */
|
|
1041
|
+
optional_params?: CiscoAIDefenseGuardrailConfigModelOptionalParams | null;
|
|
1042
|
+
/** When True, LiteLLM will replace the masked text with the original text in the response */
|
|
1043
|
+
output_parse_pii?: boolean | null;
|
|
1044
|
+
/** Recipe for input (LLM request) */
|
|
1045
|
+
pangea_input_recipe?: string | null;
|
|
1046
|
+
/** Recipe for output (LLM response) */
|
|
1047
|
+
pangea_output_recipe?: string | null;
|
|
1048
|
+
/** Format string for pattern redaction (use {pattern_name} placeholder) */
|
|
1049
|
+
pattern_redaction_format?: string | null;
|
|
1050
|
+
/** List of patterns (prebuilt or custom regex) to detect */
|
|
1051
|
+
patterns?: LitellmParamsPatternsList | null;
|
|
1052
|
+
/** Whether to include payload in the response */
|
|
1053
|
+
payload?: boolean | null;
|
|
1054
|
+
/** Controls Pillar session persistence (sets `plr_persist` header). Set to False to disable persistence. */
|
|
1055
|
+
persist_session?: boolean | null;
|
|
1056
|
+
/** Enable PII (Personally Identifiable Information) detection. */
|
|
1057
|
+
pii_check?: boolean | null;
|
|
1058
|
+
/** InvokeGuardrailChecks: block when any sensitiveInformation confidenceScore >= this value (scores are in [0,1]). Set to null to make PII detection detect-only. */
|
|
1059
|
+
pii_confidence_threshold?: number | null;
|
|
1060
|
+
/** Configuration for PII entity types and actions */
|
|
1061
|
+
pii_entities_config?: LitellmParamsPiiEntitiesConfigMap | null;
|
|
1062
|
+
/** Policy ID for Zscaler AI Guard. Can also be set via ZSCALER_AI_GUARD_POLICY_ID environment variable */
|
|
1063
|
+
policy_id?: number | null;
|
|
1064
|
+
/** The EnkryptAI policy name to use. Sent via x-enkrypt-policy header. */
|
|
1065
|
+
policy_name?: string | null;
|
|
1066
|
+
/** XecGuard policies to apply on each scan. Select one or more of the built-in default policies; if none are selected, the guardrail defaults to System Prompt Enforcement + Harmful Content Protection. */
|
|
1067
|
+
policy_names?: LitellmParamsPolicyNamesList | null;
|
|
1068
|
+
/** Post-checkpoint ID for the Ovalix Tracker service. */
|
|
1069
|
+
post_checkpoint_id?: string | null;
|
|
1070
|
+
/** Pre-checkpoint ID for the Ovalix Tracker service. */
|
|
1071
|
+
pre_checkpoint_id?: string | null;
|
|
1072
|
+
/** Path to a JSON file containing ad-hoc recognizers for Presidio */
|
|
1073
|
+
presidio_ad_hoc_recognizers?: string | null;
|
|
1074
|
+
/** Maximum UTF-8 bytes of text sent in a single Presidio /analyze call. Longer texts are split into overlapping chunks of at most this size and the merged results are remapped onto the original text. Defaults to 500000; set it below your analyzer deployment's request body limit, leaving headroom for the rest of the analyze payload. */
|
|
1075
|
+
presidio_analyze_chunk_size_bytes?: number | null;
|
|
1076
|
+
/** Base URL for the Presidio analyzer API */
|
|
1077
|
+
presidio_analyzer_api_base?: string | null;
|
|
1078
|
+
/** Base URL for the Presidio anonymizer API */
|
|
1079
|
+
presidio_anonymizer_api_base?: string | null;
|
|
1080
|
+
/** List of entity types to exclude from Presidio detection results. Detections of these types will be silently dropped. Useful for suppressing false positives (e.g., US_DRIVER_LICENSE on coding routes). */
|
|
1081
|
+
presidio_entities_deny_list?: LitellmParamsPresidioEntitiesDenyListList | null;
|
|
1082
|
+
/** Where to apply Presidio checks: 'input' (user -> model), 'output' (model -> user), or 'both' (default). */
|
|
1083
|
+
presidio_filter_scope?:
|
|
1084
|
+
| LitellmParamsPresidioFilterScope
|
|
1085
|
+
| (string & {})
|
|
1086
|
+
| null;
|
|
1087
|
+
/** Language code for Presidio PII analysis (e.g., 'en', 'de', 'es', 'fr') */
|
|
1088
|
+
presidio_language?: string | null;
|
|
1089
|
+
/** Where to apply Presidio checks: input, output, or both (default). */
|
|
1090
|
+
presidio_run_on?: LitellmParamsPresidioRunOn | (string & {}) | null;
|
|
1091
|
+
/** Optional per-entity minimum confidence scores for Presidio detections. Entities below the threshold are ignored. */
|
|
1092
|
+
presidio_score_thresholds?: LitellmParamsPresidioScoreThresholdsMap | null;
|
|
1093
|
+
/** Project ID for the Lakera AI project */
|
|
1094
|
+
project_id?: string | null;
|
|
1095
|
+
/** InvokeGuardrailChecks: block when any promptAttack severityScore >= this value (scores are in [0,1]). Set to null to make prompt-attack detection detect-only. */
|
|
1096
|
+
prompt_attack_threshold?: number | null;
|
|
1097
|
+
/** Enable prompt injection detection. Default check if no evaluation_id and no other checks are specified. */
|
|
1098
|
+
prompt_injections?: boolean | null;
|
|
1099
|
+
/** The message the bot speaks aloud when a /v1/realtime guardrail fires. Falls back to violation_message_template if not set. */
|
|
1100
|
+
realtime_violation_message?: string | null;
|
|
1101
|
+
/** Ordered allow/deny rules. Patterns use regex for tool names/types and optional regex constraints on tool arguments. */
|
|
1102
|
+
rules?: LitellmParamsRulesList | null;
|
|
1103
|
+
/** When True, this pre_call or post_call guardrail runs concurrently with other opted-in guardrails of the same hook, after the sequential guardrails have run. Use only for block-only guardrails that inspect and reject; do not enable it for guardrails that modify the request or response (e.g. PII masking or sensitive-data routing), since parallel runs share one snapshot and their mutations would race. */
|
|
1104
|
+
run_in_parallel?: boolean | null;
|
|
1105
|
+
/** For guardrail='model_armor': omit the raw Model Armor response from caller-facing errors and logs by default. Set False to restore verbose output. */
|
|
1106
|
+
sanitize_error_detail?: boolean | null;
|
|
1107
|
+
/** When True, unified guardrails only evaluate tool results, the untrusted data an agent feeds back into the model, and skip system, user, and assistant content. Intended for agent harnesses whose own prompt scaffolding is trusted but often trips prompt-attack detectors. */
|
|
1108
|
+
scan_only_tool_results?: boolean | null;
|
|
1109
|
+
/** When True, this pre_call guardrail always evaluates the request as it was before any guardrail in this hook ran, regardless of its position in the guardrails list -- so the YAML order of guardrails can never change whether this one blocks. Use only for block-only guardrails: any data this guardrail returns is discarded, same contract as run_in_parallel, since an earlier guardrail's masking must not be undone by this one. */
|
|
1110
|
+
scan_raw_request?: boolean | null;
|
|
1111
|
+
/** Whether to send user_API_key_alias in headers */
|
|
1112
|
+
send_user_api_key_alias?: boolean | null;
|
|
1113
|
+
/** Whether to send user_API_key_team_id in headers */
|
|
1114
|
+
send_user_api_key_team_id?: boolean | null;
|
|
1115
|
+
/** Whether to send user_API_key_user_id in headers */
|
|
1116
|
+
send_user_api_key_user_id?: boolean | null;
|
|
1117
|
+
/** Model to route requests to when sensitive data is detected and on_sensitive_data='route'. This is typically an on-premise model for data privacy. The routing decision persists for the entire session. */
|
|
1118
|
+
sensitive_data_route_to_model?: string | null;
|
|
1119
|
+
/** Minimum severity to block (high, medium, low) */
|
|
1120
|
+
severity_threshold?: string | null;
|
|
1121
|
+
/** The Singulr API base URL. Get base URL from Singulr Platform. */
|
|
1122
|
+
singulr_api_base?: string | null;
|
|
1123
|
+
/** The Singulr API key. Generate API key from Singulr Platform. */
|
|
1124
|
+
singulr_api_key?: string | null;
|
|
1125
|
+
/** The Singulr application ID. Get application ID from Singulr Platform. */
|
|
1126
|
+
singulr_application_id?: string | null;
|
|
1127
|
+
/** The Singulr Guardrail ID. Get guardrail ID from Singulr Platform. */
|
|
1128
|
+
singulr_guardrail_id?: string | null;
|
|
1129
|
+
/** When True, unified guardrails skip system-role messages when building evaluation inputs (texts and structured_messages). When False, system messages are included even if litellm_settings sets a global skip. When None, use the global litellm.skip_system_message_in_guardrail setting. For Anthropic /v1/messages, the flag applies only to the trusted top-level system prompt. In-sequence system entries are untrusted client input and remain in texts and structured_messages. */
|
|
1130
|
+
skip_system_message_in_guardrail?: boolean | null;
|
|
1131
|
+
/** When True, unified guardrails skip tool-role messages when building evaluation inputs (texts and structured_messages). When False, tool messages are included even if litellm_settings sets a global skip. When None, use the global litellm.skip_tool_message_in_guardrail setting. */
|
|
1132
|
+
skip_tool_message_in_guardrail?: boolean | null;
|
|
1133
|
+
/** Implemented by guardrail='model_armor'. When True, attachment references that carry no inline bytes (file_id, gs://, or http(s) URLs) pass through unscanned instead of blocking, while fail_on_error still governs real Model Armor API errors. Default False blocks them. */
|
|
1134
|
+
skip_unscannable_attachments?: boolean | null;
|
|
1135
|
+
/** When True (default), after sensitive data is detected and routed, all subsequent requests in the same session will continue routing to the same model. */
|
|
1136
|
+
sticky_session_routing?: boolean | null;
|
|
1137
|
+
/** The ID of your Model Armor template */
|
|
1138
|
+
template_id?: string | null;
|
|
1139
|
+
/** Per-request timeout for the guardrail provider API call (seconds). Accepts int, float, or numeric string; coerced to float on load. Each guardrail handler chooses its own default when unset. */
|
|
1140
|
+
timeout?: number | null;
|
|
1141
|
+
/** Enable tool selection quality check to evaluate quality of tool/function calls. */
|
|
1142
|
+
tool_selection_quality_check?: boolean | null;
|
|
1143
|
+
/** Base URL for the Ovalix Tracker service. */
|
|
1144
|
+
tracker_api_base?: string | null;
|
|
1145
|
+
/** API key for the Ovalix Tracker service. */
|
|
1146
|
+
tracker_api_key?: string | null;
|
|
1147
|
+
/** Behavior when the headroom compression service is unreachable or errors. 'fail_closed' raises an error (default). 'fail_open' logs a critical error and forwards the request uncompressed instead of blocking it. */
|
|
1148
|
+
unreachable_fallback?: LitellmParamsUnreachableFallback | (string & {});
|
|
1149
|
+
/** If True and guardrail='noma', route to the new Noma v2 implementation instead of the legacy implementation. */
|
|
1150
|
+
use_v2?: boolean | null;
|
|
1151
|
+
/** Whether to verify SSL certificates. Defaults to True. */
|
|
1152
|
+
verify_ssl?: boolean | null;
|
|
1153
|
+
/** Hiddenlayer guardrail version to use. */
|
|
1154
|
+
version?: number | null;
|
|
1155
|
+
/** Custom message when a guardrail blocks an action. Supports placeholders like {tool_name}, {rule_id}, and {default_message}. */
|
|
1156
|
+
violation_message_template?: string | null;
|
|
1157
|
+
/** XecGuard scanning model identifier. Defaults to 'xecguard_v2'. */
|
|
1158
|
+
xecguard_model?: string | null;
|
|
1159
|
+
}
|
|
1160
|
+
export const LitellmParams = /*@__PURE__*/ S.suspend(() =>
|
|
1161
|
+
S.Struct({
|
|
1162
|
+
action: S.optional(LitellmParamsAction),
|
|
1163
|
+
additional_provider_specific_params: S.optional(
|
|
1164
|
+
S.NullOr(LitellmParamsAdditionalProviderSpecificParamsMap),
|
|
1165
|
+
),
|
|
1166
|
+
advisory_system_message: S.optional(S.NullOr(S.String)),
|
|
1167
|
+
akto_account_id: S.optional(S.NullOr(S.String)),
|
|
1168
|
+
akto_api_key: S.optional(S.NullOr(S.String)),
|
|
1169
|
+
akto_base_url: S.optional(S.NullOr(S.String)),
|
|
1170
|
+
akto_vxlan_id: S.optional(S.NullOr(S.String)),
|
|
1171
|
+
anonymize_input: S.optional(S.NullOr(S.Boolean)),
|
|
1172
|
+
api_base: S.optional(S.NullOr(S.String)),
|
|
1173
|
+
api_endpoint: S.optional(S.NullOr(S.String)),
|
|
1174
|
+
api_id: S.optional(S.NullOr(S.String)),
|
|
1175
|
+
api_key: S.optional(S.NullOr(S.String)),
|
|
1176
|
+
api_version: S.optional(S.NullOr(S.String)),
|
|
1177
|
+
application: S.optional(S.NullOr(S.String)),
|
|
1178
|
+
application_id: S.optional(S.NullOr(S.String)),
|
|
1179
|
+
assertions: S.optional(S.NullOr(LitellmParamsAssertionsList)),
|
|
1180
|
+
asset_id: S.optional(S.NullOr(S.String)),
|
|
1181
|
+
async_mode: S.optional(S.NullOr(S.Boolean)),
|
|
1182
|
+
auth_token: S.optional(S.NullOr(S.String)),
|
|
1183
|
+
aws_access_key_id: S.optional(S.NullOr(S.String)),
|
|
1184
|
+
aws_bedrock_runtime_endpoint: S.optional(S.NullOr(S.String)),
|
|
1185
|
+
aws_external_id: S.optional(S.NullOr(S.String)),
|
|
1186
|
+
aws_profile_name: S.optional(S.NullOr(S.String)),
|
|
1187
|
+
aws_region_name: S.optional(S.NullOr(S.String)),
|
|
1188
|
+
aws_role_name: S.optional(S.NullOr(S.String)),
|
|
1189
|
+
aws_secret_access_key: S.optional(S.NullOr(S.String)),
|
|
1190
|
+
aws_session_name: S.optional(S.NullOr(S.String)),
|
|
1191
|
+
aws_session_token: S.optional(S.NullOr(S.String)),
|
|
1192
|
+
aws_sts_endpoint: S.optional(S.NullOr(S.String)),
|
|
1193
|
+
aws_web_identity_token: S.optional(S.NullOr(S.String)),
|
|
1194
|
+
base_url: S.optional(S.NullOr(S.String)),
|
|
1195
|
+
block_failures: S.optional(S.NullOr(S.Boolean)),
|
|
1196
|
+
block_on_error: S.optional(S.NullOr(S.Boolean)),
|
|
1197
|
+
block_on_violation: S.optional(S.NullOr(S.Boolean)),
|
|
1198
|
+
blocked_languages: S.optional(S.NullOr(LitellmParamsBlockedLanguagesList)),
|
|
1199
|
+
blocked_words: S.optional(S.NullOr(LitellmParamsBlockedWordsList)),
|
|
1200
|
+
blocked_words_file: S.optional(S.NullOr(S.String)),
|
|
1201
|
+
breakdown: S.optional(S.NullOr(S.Boolean)),
|
|
1202
|
+
categories: S.optional(S.NullOr(LitellmParamsCategoriesList)),
|
|
1203
|
+
category_thresholds: S.optional(S.NullOr(LakeraCategoryThresholds)),
|
|
1204
|
+
checks: S.optional(S.NullOr(BedrockChecksConfigModel)),
|
|
1205
|
+
chunk_budget_chars: S.optional(S.Number),
|
|
1206
|
+
confidence_threshold: S.optional(S.Number),
|
|
1207
|
+
config: S.optional(S.NullOr(LitellmParamsConfigMap)),
|
|
1208
|
+
content_filter_threshold: S.optional(S.NullOr(S.Number)),
|
|
1209
|
+
content_moderation_check: S.optional(S.NullOr(S.Boolean)),
|
|
1210
|
+
credentials: S.optional(S.NullOr(S.String)),
|
|
1211
|
+
custom_code: S.optional(S.NullOr(S.String)),
|
|
1212
|
+
deepkeep_firewall_id: S.optional(S.NullOr(S.String)),
|
|
1213
|
+
default_action: S.optional(LitellmParamsDefaultAction),
|
|
1214
|
+
default_on: S.optional(S.NullOr(S.Boolean)),
|
|
1215
|
+
deployment_name: S.optional(S.NullOr(S.String)),
|
|
1216
|
+
detect_execution_intent: S.optional(S.Boolean),
|
|
1217
|
+
detect_secrets_config: S.optional(
|
|
1218
|
+
S.NullOr(LitellmParamsDetectSecretsConfigMap),
|
|
1219
|
+
),
|
|
1220
|
+
detector_id: S.optional(S.NullOr(S.String)),
|
|
1221
|
+
detectors: S.optional(S.NullOr(LitellmParamsDetectorsMap)),
|
|
1222
|
+
dev_info: S.optional(S.NullOr(S.Boolean)),
|
|
1223
|
+
disable_exception_on_block: S.optional(S.NullOr(S.Boolean)),
|
|
1224
|
+
end_session_after_n_fails: S.optional(S.NullOr(S.Number)),
|
|
1225
|
+
evaluation_id: S.optional(S.NullOr(S.String)),
|
|
1226
|
+
experimental_use_latest_role_message_only: S.optional(S.NullOr(S.Boolean)),
|
|
1227
|
+
extra_headers: S.optional(S.NullOr(LitellmParamsExtraHeadersList)),
|
|
1228
|
+
fail_on_error: S.optional(S.NullOr(S.Boolean)),
|
|
1229
|
+
grounding_check: S.optional(S.NullOr(S.Boolean)),
|
|
1230
|
+
grounding_strictness: S.optional(
|
|
1231
|
+
S.NullOr(LitellmParamsGroundingStrictness),
|
|
1232
|
+
),
|
|
1233
|
+
guard_name: S.optional(S.NullOr(S.String)),
|
|
1234
|
+
guardrail: S.String,
|
|
1235
|
+
guardrailIdentifier: S.optional(S.NullOr(S.String)),
|
|
1236
|
+
guardrailVersion: S.optional(S.NullOr(S.String)),
|
|
1237
|
+
guardrail_timeout: S.optional(S.NullOr(S.Number)),
|
|
1238
|
+
hallucinations_check: S.optional(S.NullOr(S.Boolean)),
|
|
1239
|
+
include_evidence: S.optional(S.NullOr(S.Boolean)),
|
|
1240
|
+
include_scanners: S.optional(S.NullOr(S.Boolean)),
|
|
1241
|
+
is_detector_server: S.optional(S.NullOr(S.Boolean)),
|
|
1242
|
+
keyword_redaction_tag: S.optional(S.NullOr(S.String)),
|
|
1243
|
+
lasso_conversation_id: S.optional(S.NullOr(S.String)),
|
|
1244
|
+
lasso_user_id: S.optional(S.NullOr(S.String)),
|
|
1245
|
+
location: S.optional(S.NullOr(S.String)),
|
|
1246
|
+
mask: S.optional(S.NullOr(S.Boolean)),
|
|
1247
|
+
mask_request_content: S.optional(S.NullOr(S.Boolean)),
|
|
1248
|
+
mask_response_content: S.optional(S.NullOr(S.Boolean)),
|
|
1249
|
+
metadata: S.optional(S.NullOr(LitellmParamsMetadataMap)),
|
|
1250
|
+
mock_redacted_text: S.optional(S.NullOr(LitellmParamsMockRedactedTextMap)),
|
|
1251
|
+
mode: LitellmParamsMode,
|
|
1252
|
+
model: S.optional(S.NullOr(S.String)),
|
|
1253
|
+
monitor_mode: S.optional(S.NullOr(S.Boolean)),
|
|
1254
|
+
on_disallowed_action: S.optional(LitellmParamsOnDisallowedAction),
|
|
1255
|
+
on_flagged: S.optional(S.NullOr(LitellmParamsOnFlagged)),
|
|
1256
|
+
on_flagged_action: S.optional(S.NullOr(S.String)),
|
|
1257
|
+
on_sensitive_data: S.optional(S.NullOr(LitellmParamsOnSensitiveData)),
|
|
1258
|
+
on_violation: S.optional(S.NullOr(LitellmParamsOnViolation)),
|
|
1259
|
+
only_scan_new_messages: S.optional(S.NullOr(S.Boolean)),
|
|
1260
|
+
optional_params: S.optional(
|
|
1261
|
+
S.NullOr(CiscoAIDefenseGuardrailConfigModelOptionalParams),
|
|
1262
|
+
),
|
|
1263
|
+
output_parse_pii: S.optional(S.NullOr(S.Boolean)),
|
|
1264
|
+
pangea_input_recipe: S.optional(S.NullOr(S.String)),
|
|
1265
|
+
pangea_output_recipe: S.optional(S.NullOr(S.String)),
|
|
1266
|
+
pattern_redaction_format: S.optional(S.NullOr(S.String)),
|
|
1267
|
+
patterns: S.optional(S.NullOr(LitellmParamsPatternsList)),
|
|
1268
|
+
payload: S.optional(S.NullOr(S.Boolean)),
|
|
1269
|
+
persist_session: S.optional(S.NullOr(S.Boolean)),
|
|
1270
|
+
pii_check: S.optional(S.NullOr(S.Boolean)),
|
|
1271
|
+
pii_confidence_threshold: S.optional(S.NullOr(S.Number)),
|
|
1272
|
+
pii_entities_config: S.optional(
|
|
1273
|
+
S.NullOr(LitellmParamsPiiEntitiesConfigMap),
|
|
1274
|
+
),
|
|
1275
|
+
policy_id: S.optional(S.NullOr(S.Number)),
|
|
1276
|
+
policy_name: S.optional(S.NullOr(S.String)),
|
|
1277
|
+
policy_names: S.optional(S.NullOr(LitellmParamsPolicyNamesList)),
|
|
1278
|
+
post_checkpoint_id: S.optional(S.NullOr(S.String)),
|
|
1279
|
+
pre_checkpoint_id: S.optional(S.NullOr(S.String)),
|
|
1280
|
+
presidio_ad_hoc_recognizers: S.optional(S.NullOr(S.String)),
|
|
1281
|
+
presidio_analyze_chunk_size_bytes: S.optional(S.NullOr(S.Number)),
|
|
1282
|
+
presidio_analyzer_api_base: S.optional(S.NullOr(S.String)),
|
|
1283
|
+
presidio_anonymizer_api_base: S.optional(S.NullOr(S.String)),
|
|
1284
|
+
presidio_entities_deny_list: S.optional(
|
|
1285
|
+
S.NullOr(LitellmParamsPresidioEntitiesDenyListList),
|
|
1286
|
+
),
|
|
1287
|
+
presidio_filter_scope: S.optional(
|
|
1288
|
+
S.NullOr(LitellmParamsPresidioFilterScope),
|
|
1289
|
+
),
|
|
1290
|
+
presidio_language: S.optional(S.NullOr(S.String)),
|
|
1291
|
+
presidio_run_on: S.optional(S.NullOr(LitellmParamsPresidioRunOn)),
|
|
1292
|
+
presidio_score_thresholds: S.optional(
|
|
1293
|
+
S.NullOr(LitellmParamsPresidioScoreThresholdsMap),
|
|
1294
|
+
),
|
|
1295
|
+
project_id: S.optional(S.NullOr(S.String)),
|
|
1296
|
+
prompt_attack_threshold: S.optional(S.NullOr(S.Number)),
|
|
1297
|
+
prompt_injections: S.optional(S.NullOr(S.Boolean)),
|
|
1298
|
+
realtime_violation_message: S.optional(S.NullOr(S.String)),
|
|
1299
|
+
rules: S.optional(S.NullOr(LitellmParamsRulesList)),
|
|
1300
|
+
run_in_parallel: S.optional(S.NullOr(S.Boolean)),
|
|
1301
|
+
sanitize_error_detail: S.optional(S.NullOr(S.Boolean)),
|
|
1302
|
+
scan_only_tool_results: S.optional(S.NullOr(S.Boolean)),
|
|
1303
|
+
scan_raw_request: S.optional(S.NullOr(S.Boolean)),
|
|
1304
|
+
send_user_api_key_alias: S.optional(S.NullOr(S.Boolean)),
|
|
1305
|
+
send_user_api_key_team_id: S.optional(S.NullOr(S.Boolean)),
|
|
1306
|
+
send_user_api_key_user_id: S.optional(S.NullOr(S.Boolean)),
|
|
1307
|
+
sensitive_data_route_to_model: S.optional(S.NullOr(S.String)),
|
|
1308
|
+
severity_threshold: S.optional(S.NullOr(S.String)),
|
|
1309
|
+
singulr_api_base: S.optional(S.NullOr(S.String)),
|
|
1310
|
+
singulr_api_key: S.optional(S.NullOr(S.String)),
|
|
1311
|
+
singulr_application_id: S.optional(S.NullOr(S.String)),
|
|
1312
|
+
singulr_guardrail_id: S.optional(S.NullOr(S.String)),
|
|
1313
|
+
skip_system_message_in_guardrail: S.optional(S.NullOr(S.Boolean)),
|
|
1314
|
+
skip_tool_message_in_guardrail: S.optional(S.NullOr(S.Boolean)),
|
|
1315
|
+
skip_unscannable_attachments: S.optional(S.NullOr(S.Boolean)),
|
|
1316
|
+
sticky_session_routing: S.optional(S.NullOr(S.Boolean)),
|
|
1317
|
+
template_id: S.optional(S.NullOr(S.String)),
|
|
1318
|
+
timeout: S.optional(S.NullOr(S.Number)),
|
|
1319
|
+
tool_selection_quality_check: S.optional(S.NullOr(S.Boolean)),
|
|
1320
|
+
tracker_api_base: S.optional(S.NullOr(S.String)),
|
|
1321
|
+
tracker_api_key: S.optional(S.NullOr(S.String)),
|
|
1322
|
+
unreachable_fallback: S.optional(LitellmParamsUnreachableFallback),
|
|
1323
|
+
use_v2: S.optional(S.NullOr(S.Boolean)),
|
|
1324
|
+
verify_ssl: S.optional(S.NullOr(S.Boolean)),
|
|
1325
|
+
version: S.optional(S.NullOr(S.Number)),
|
|
1326
|
+
violation_message_template: S.optional(S.NullOr(S.String)),
|
|
1327
|
+
xecguard_model: S.optional(S.NullOr(S.String)),
|
|
1328
|
+
}),
|
|
1329
|
+
).annotate({ identifier: "LitellmParams" }) as any as S.Schema<LitellmParams>;
|
|
1330
|
+
|
|
1331
|
+
export interface Guardrail {
|
|
1332
|
+
created_at?: string | null;
|
|
1333
|
+
guardrail_id?: string | null;
|
|
1334
|
+
guardrail_info?: GuardrailGuardrailInfoMap | null;
|
|
1335
|
+
guardrail_name: string;
|
|
1336
|
+
litellm_params: LitellmParams;
|
|
1337
|
+
policy_template?: string | null;
|
|
1338
|
+
updated_at?: string | null;
|
|
1339
|
+
}
|
|
1340
|
+
export const Guardrail = /*@__PURE__*/ S.suspend(() =>
|
|
1341
|
+
S.Struct({
|
|
1342
|
+
created_at: S.optional(S.NullOr(S.String)),
|
|
1343
|
+
guardrail_id: S.optional(S.NullOr(S.String)),
|
|
1344
|
+
guardrail_info: S.optional(S.NullOr(GuardrailGuardrailInfoMap)),
|
|
1345
|
+
guardrail_name: S.String,
|
|
1346
|
+
litellm_params: LitellmParams,
|
|
1347
|
+
policy_template: S.optional(S.NullOr(S.String)),
|
|
1348
|
+
updated_at: S.optional(S.NullOr(S.String)),
|
|
1349
|
+
}),
|
|
1350
|
+
).annotate({ identifier: "Guardrail" }) as any as S.Schema<Guardrail>;
|
|
1351
|
+
|
|
1352
|
+
export interface CreateGuardrailGuardrailsPostRequest {
|
|
1353
|
+
guardrail: Guardrail;
|
|
1354
|
+
}
|
|
1355
|
+
export const CreateGuardrailGuardrailsPostRequest = /*@__PURE__*/ S.suspend(
|
|
1356
|
+
() =>
|
|
1357
|
+
S.Struct({
|
|
1358
|
+
guardrail: Guardrail,
|
|
1359
|
+
}).pipe(T.Http({ method: "POST", uri: "/guardrails", code: 200 })),
|
|
1360
|
+
).annotate({
|
|
1361
|
+
identifier: "CreateGuardrailGuardrailsPostRequest",
|
|
1362
|
+
}) as any as S.Schema<CreateGuardrailGuardrailsPostRequest>;
|
|
1363
|
+
|
|
1364
|
+
export interface CreateGuardrailGuardrailsPostResponse {
|
|
1365
|
+
body: unknown;
|
|
1366
|
+
}
|
|
1367
|
+
export const CreateGuardrailGuardrailsPostResponse = /*@__PURE__*/ S.suspend(
|
|
1368
|
+
() =>
|
|
1369
|
+
S.Struct({
|
|
1370
|
+
body: S.Unknown,
|
|
1371
|
+
}),
|
|
1372
|
+
).annotate({
|
|
1373
|
+
identifier: "CreateGuardrailGuardrailsPostResponse",
|
|
1374
|
+
}) as any as S.Schema<CreateGuardrailGuardrailsPostResponse>;
|
|
1375
|
+
|
|
1376
|
+
export interface DeleteGuardrailGuardrailsGuardrailIdDeleteRequest {
|
|
1377
|
+
guardrail_id: string;
|
|
1378
|
+
}
|
|
1379
|
+
export const DeleteGuardrailGuardrailsGuardrailIdDeleteRequest =
|
|
1380
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1381
|
+
S.Struct({
|
|
1382
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
1383
|
+
}).pipe(
|
|
1384
|
+
T.Http({
|
|
1385
|
+
method: "DELETE",
|
|
1386
|
+
uri: "/guardrails/{guardrail_id}",
|
|
1387
|
+
code: 200,
|
|
1388
|
+
}),
|
|
1389
|
+
),
|
|
1390
|
+
).annotate({
|
|
1391
|
+
identifier: "DeleteGuardrailGuardrailsGuardrailIdDeleteRequest",
|
|
1392
|
+
}) as any as S.Schema<DeleteGuardrailGuardrailsGuardrailIdDeleteRequest>;
|
|
1393
|
+
|
|
1394
|
+
export interface DeleteGuardrailGuardrailsGuardrailIdDeleteResponse {
|
|
1395
|
+
body: unknown;
|
|
1396
|
+
}
|
|
1397
|
+
export const DeleteGuardrailGuardrailsGuardrailIdDeleteResponse =
|
|
1398
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1399
|
+
S.Struct({
|
|
1400
|
+
body: S.Unknown,
|
|
1401
|
+
}),
|
|
1402
|
+
).annotate({
|
|
1403
|
+
identifier: "DeleteGuardrailGuardrailsGuardrailIdDeleteResponse",
|
|
1404
|
+
}) as any as S.Schema<DeleteGuardrailGuardrailsGuardrailIdDeleteResponse>;
|
|
1405
|
+
|
|
1406
|
+
export interface GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetRequest {
|
|
1407
|
+
category_name: string;
|
|
1408
|
+
}
|
|
1409
|
+
export const GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetRequest =
|
|
1410
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1411
|
+
S.Struct({
|
|
1412
|
+
category_name: S.String.pipe(T.Label()),
|
|
1413
|
+
}).pipe(
|
|
1414
|
+
T.Http({
|
|
1415
|
+
method: "GET",
|
|
1416
|
+
uri: "/guardrails/ui/category_yaml/{category_name}",
|
|
1417
|
+
code: 200,
|
|
1418
|
+
}),
|
|
1419
|
+
),
|
|
1420
|
+
).annotate({
|
|
1421
|
+
identifier: "GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetRequest",
|
|
1422
|
+
}) as any as S.Schema<GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetRequest>;
|
|
1423
|
+
|
|
1424
|
+
export interface GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetResponse {
|
|
1425
|
+
body: unknown;
|
|
1426
|
+
}
|
|
1427
|
+
export const GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetResponse =
|
|
1428
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1429
|
+
S.Struct({
|
|
1430
|
+
body: S.Unknown,
|
|
1431
|
+
}),
|
|
1432
|
+
).annotate({
|
|
1433
|
+
identifier:
|
|
1434
|
+
"GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetResponse",
|
|
1435
|
+
}) as any as S.Schema<GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetResponse>;
|
|
1436
|
+
|
|
1437
|
+
export interface GetGuardrailInfoGuardrailsGuardrailIdGetRequest {
|
|
1438
|
+
guardrail_id: string;
|
|
1439
|
+
}
|
|
1440
|
+
export const GetGuardrailInfoGuardrailsGuardrailIdGetRequest =
|
|
1441
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1442
|
+
S.Struct({
|
|
1443
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
1444
|
+
}).pipe(
|
|
1445
|
+
T.Http({ method: "GET", uri: "/guardrails/{guardrail_id}", code: 200 }),
|
|
1446
|
+
),
|
|
1447
|
+
).annotate({
|
|
1448
|
+
identifier: "GetGuardrailInfoGuardrailsGuardrailIdGetRequest",
|
|
1449
|
+
}) as any as S.Schema<GetGuardrailInfoGuardrailsGuardrailIdGetRequest>;
|
|
1450
|
+
|
|
1451
|
+
export interface GetGuardrailInfoGuardrailsGuardrailIdGetResponse {
|
|
1452
|
+
body: unknown;
|
|
1453
|
+
}
|
|
1454
|
+
export const GetGuardrailInfoGuardrailsGuardrailIdGetResponse =
|
|
1455
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1456
|
+
S.Struct({
|
|
1457
|
+
body: S.Unknown,
|
|
1458
|
+
}),
|
|
1459
|
+
).annotate({
|
|
1460
|
+
identifier: "GetGuardrailInfoGuardrailsGuardrailIdGetResponse",
|
|
1461
|
+
}) as any as S.Schema<GetGuardrailInfoGuardrailsGuardrailIdGetResponse>;
|
|
1462
|
+
|
|
1463
|
+
export interface GetGuardrailInfoGuardrailsGuardrailIdInfoGetRequest {
|
|
1464
|
+
guardrail_id: string;
|
|
1465
|
+
}
|
|
1466
|
+
export const GetGuardrailInfoGuardrailsGuardrailIdInfoGetRequest =
|
|
1467
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1468
|
+
S.Struct({
|
|
1469
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
1470
|
+
}).pipe(
|
|
1471
|
+
T.Http({
|
|
1472
|
+
method: "GET",
|
|
1473
|
+
uri: "/guardrails/{guardrail_id}/info",
|
|
1474
|
+
code: 200,
|
|
1475
|
+
}),
|
|
1476
|
+
),
|
|
1477
|
+
).annotate({
|
|
1478
|
+
identifier: "GetGuardrailInfoGuardrailsGuardrailIdInfoGetRequest",
|
|
1479
|
+
}) as any as S.Schema<GetGuardrailInfoGuardrailsGuardrailIdInfoGetRequest>;
|
|
1480
|
+
|
|
1481
|
+
export interface GetGuardrailInfoGuardrailsGuardrailIdInfoGetResponse {
|
|
1482
|
+
body: unknown;
|
|
1483
|
+
}
|
|
1484
|
+
export const GetGuardrailInfoGuardrailsGuardrailIdInfoGetResponse =
|
|
1485
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1486
|
+
S.Struct({
|
|
1487
|
+
body: S.Unknown,
|
|
1488
|
+
}),
|
|
1489
|
+
).annotate({
|
|
1490
|
+
identifier: "GetGuardrailInfoGuardrailsGuardrailIdInfoGetResponse",
|
|
1491
|
+
}) as any as S.Schema<GetGuardrailInfoGuardrailsGuardrailIdInfoGetResponse>;
|
|
1492
|
+
|
|
1493
|
+
export interface GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetRequest {
|
|
1494
|
+
guardrail_id: string;
|
|
1495
|
+
}
|
|
1496
|
+
export const GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetRequest =
|
|
1497
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1498
|
+
S.Struct({
|
|
1499
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
1500
|
+
}).pipe(
|
|
1501
|
+
T.Http({
|
|
1502
|
+
method: "GET",
|
|
1503
|
+
uri: "/guardrails/submissions/{guardrail_id}",
|
|
1504
|
+
code: 200,
|
|
1505
|
+
}),
|
|
1506
|
+
),
|
|
1507
|
+
).annotate({
|
|
1508
|
+
identifier:
|
|
1509
|
+
"GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetRequest",
|
|
1510
|
+
}) as any as S.Schema<GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetRequest>;
|
|
1511
|
+
|
|
1512
|
+
export type GuardrailSubmissionItemGuardrailInfoMap = {
|
|
1513
|
+
[key: string]: unknown | undefined;
|
|
1514
|
+
};
|
|
1515
|
+
export const GuardrailSubmissionItemGuardrailInfoMap = /*@__PURE__*/ S.Record(
|
|
1516
|
+
S.String,
|
|
1517
|
+
S.Unknown,
|
|
1518
|
+
) as any as S.Schema<GuardrailSubmissionItemGuardrailInfoMap>;
|
|
1519
|
+
|
|
1520
|
+
export type GuardrailSubmissionItemLitellmParamsMap = {
|
|
1521
|
+
[key: string]: unknown | undefined;
|
|
1522
|
+
};
|
|
1523
|
+
export const GuardrailSubmissionItemLitellmParamsMap = /*@__PURE__*/ S.Record(
|
|
1524
|
+
S.String,
|
|
1525
|
+
S.Unknown,
|
|
1526
|
+
) as any as S.Schema<GuardrailSubmissionItemLitellmParamsMap>;
|
|
1527
|
+
|
|
1528
|
+
export interface GuardrailSubmissionItem {
|
|
1529
|
+
created_at?: string | null;
|
|
1530
|
+
guardrail_id: string;
|
|
1531
|
+
guardrail_info?: GuardrailSubmissionItemGuardrailInfoMap | null;
|
|
1532
|
+
guardrail_name: string;
|
|
1533
|
+
litellm_params?: GuardrailSubmissionItemLitellmParamsMap | null;
|
|
1534
|
+
reviewed_at?: string | null;
|
|
1535
|
+
status: string;
|
|
1536
|
+
submitted_at?: string | null;
|
|
1537
|
+
submitted_by_email?: string | null;
|
|
1538
|
+
submitted_by_user_id?: string | null;
|
|
1539
|
+
team_guardrail?: boolean;
|
|
1540
|
+
team_id?: string | null;
|
|
1541
|
+
updated_at?: string | null;
|
|
1542
|
+
}
|
|
1543
|
+
export const GuardrailSubmissionItem = /*@__PURE__*/ S.suspend(() =>
|
|
1544
|
+
S.Struct({
|
|
1545
|
+
created_at: S.optional(S.NullOr(S.String)),
|
|
1546
|
+
guardrail_id: S.String,
|
|
1547
|
+
guardrail_info: S.optional(
|
|
1548
|
+
S.NullOr(GuardrailSubmissionItemGuardrailInfoMap),
|
|
1549
|
+
),
|
|
1550
|
+
guardrail_name: S.String,
|
|
1551
|
+
litellm_params: S.optional(
|
|
1552
|
+
S.NullOr(GuardrailSubmissionItemLitellmParamsMap),
|
|
1553
|
+
),
|
|
1554
|
+
reviewed_at: S.optional(S.NullOr(S.String)),
|
|
1555
|
+
status: S.String,
|
|
1556
|
+
submitted_at: S.optional(S.NullOr(S.String)),
|
|
1557
|
+
submitted_by_email: S.optional(S.NullOr(S.String)),
|
|
1558
|
+
submitted_by_user_id: S.optional(S.NullOr(S.String)),
|
|
1559
|
+
team_guardrail: S.optional(S.Boolean),
|
|
1560
|
+
team_id: S.optional(S.NullOr(S.String)),
|
|
1561
|
+
updated_at: S.optional(S.NullOr(S.String)),
|
|
1562
|
+
}),
|
|
1563
|
+
).annotate({
|
|
1564
|
+
identifier: "GuardrailSubmissionItem",
|
|
1565
|
+
}) as any as S.Schema<GuardrailSubmissionItem>;
|
|
1566
|
+
|
|
1567
|
+
export interface GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdRequest {
|
|
1568
|
+
guardrail_id: string;
|
|
1569
|
+
start_date?: string;
|
|
1570
|
+
end_date?: string;
|
|
1571
|
+
}
|
|
1572
|
+
export const GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdRequest =
|
|
1573
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1574
|
+
S.Struct({
|
|
1575
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
1576
|
+
start_date: S.optional(S.String.pipe(T.Query())),
|
|
1577
|
+
end_date: S.optional(S.String.pipe(T.Query())),
|
|
1578
|
+
}).pipe(
|
|
1579
|
+
T.Http({
|
|
1580
|
+
method: "GET",
|
|
1581
|
+
uri: "/guardrails/usage/detail/{guardrail_id}",
|
|
1582
|
+
code: 200,
|
|
1583
|
+
}),
|
|
1584
|
+
),
|
|
1585
|
+
).annotate({
|
|
1586
|
+
identifier:
|
|
1587
|
+
"GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdRequest",
|
|
1588
|
+
}) as any as S.Schema<GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdRequest>;
|
|
1589
|
+
|
|
1590
|
+
export interface UsageChartPoint {
|
|
1591
|
+
blocked: number;
|
|
1592
|
+
date: string;
|
|
1593
|
+
passed: number;
|
|
1594
|
+
score?: number | null;
|
|
1595
|
+
}
|
|
1596
|
+
export const UsageChartPoint = /*@__PURE__*/ S.suspend(() =>
|
|
1597
|
+
S.Struct({
|
|
1598
|
+
blocked: S.Number,
|
|
1599
|
+
date: S.String,
|
|
1600
|
+
passed: S.Number,
|
|
1601
|
+
score: S.optional(S.NullOr(S.Number)),
|
|
1602
|
+
}),
|
|
1603
|
+
).annotate({
|
|
1604
|
+
identifier: "UsageChartPoint",
|
|
1605
|
+
}) as any as S.Schema<UsageChartPoint>;
|
|
1606
|
+
|
|
1607
|
+
export type UsageDetailResponseTimeSeriesList = Array<UsageChartPoint>;
|
|
1608
|
+
export const UsageDetailResponseTimeSeriesList = /*@__PURE__*/ S.Array(
|
|
1609
|
+
UsageChartPoint,
|
|
1610
|
+
) as any as S.Schema<UsageDetailResponseTimeSeriesList>;
|
|
1611
|
+
|
|
1612
|
+
export type UsageDetailResponseUsageUnitsMap = {
|
|
1613
|
+
[key: string]: number | undefined;
|
|
1614
|
+
};
|
|
1615
|
+
export const UsageDetailResponseUsageUnitsMap = /*@__PURE__*/ S.Record(
|
|
1616
|
+
S.String,
|
|
1617
|
+
S.Number,
|
|
1618
|
+
) as any as S.Schema<UsageDetailResponseUsageUnitsMap>;
|
|
1619
|
+
|
|
1620
|
+
export type UsageDetailResponseUsageUnitsByKeyValueMap = {
|
|
1621
|
+
[key: string]: number | undefined;
|
|
1622
|
+
};
|
|
1623
|
+
export const UsageDetailResponseUsageUnitsByKeyValueMap =
|
|
1624
|
+
/*@__PURE__*/ S.Record(
|
|
1625
|
+
S.String,
|
|
1626
|
+
S.Number,
|
|
1627
|
+
) as any as S.Schema<UsageDetailResponseUsageUnitsByKeyValueMap>;
|
|
1628
|
+
|
|
1629
|
+
export type UsageDetailResponseUsageUnitsByKeyMap = {
|
|
1630
|
+
[key: string]: UsageDetailResponseUsageUnitsByKeyValueMap | undefined;
|
|
1631
|
+
};
|
|
1632
|
+
export const UsageDetailResponseUsageUnitsByKeyMap = /*@__PURE__*/ S.Record(
|
|
1633
|
+
S.String,
|
|
1634
|
+
UsageDetailResponseUsageUnitsByKeyValueMap,
|
|
1635
|
+
) as any as S.Schema<UsageDetailResponseUsageUnitsByKeyMap>;
|
|
1636
|
+
|
|
1637
|
+
export type UsageDetailResponseUsageUnitsByTeamValueMap = {
|
|
1638
|
+
[key: string]: number | undefined;
|
|
1639
|
+
};
|
|
1640
|
+
export const UsageDetailResponseUsageUnitsByTeamValueMap =
|
|
1641
|
+
/*@__PURE__*/ S.Record(
|
|
1642
|
+
S.String,
|
|
1643
|
+
S.Number,
|
|
1644
|
+
) as any as S.Schema<UsageDetailResponseUsageUnitsByTeamValueMap>;
|
|
1645
|
+
|
|
1646
|
+
export type UsageDetailResponseUsageUnitsByTeamMap = {
|
|
1647
|
+
[key: string]: UsageDetailResponseUsageUnitsByTeamValueMap | undefined;
|
|
1648
|
+
};
|
|
1649
|
+
export const UsageDetailResponseUsageUnitsByTeamMap = /*@__PURE__*/ S.Record(
|
|
1650
|
+
S.String,
|
|
1651
|
+
UsageDetailResponseUsageUnitsByTeamValueMap,
|
|
1652
|
+
) as any as S.Schema<UsageDetailResponseUsageUnitsByTeamMap>;
|
|
1653
|
+
|
|
1654
|
+
export type UsageUnitsDailyPointUnitsMap = {
|
|
1655
|
+
[key: string]: number | undefined;
|
|
1656
|
+
};
|
|
1657
|
+
export const UsageUnitsDailyPointUnitsMap = /*@__PURE__*/ S.Record(
|
|
1658
|
+
S.String,
|
|
1659
|
+
S.Number,
|
|
1660
|
+
) as any as S.Schema<UsageUnitsDailyPointUnitsMap>;
|
|
1661
|
+
|
|
1662
|
+
export interface UsageUnitsDailyPoint {
|
|
1663
|
+
date: string;
|
|
1664
|
+
units: UsageUnitsDailyPointUnitsMap;
|
|
1665
|
+
}
|
|
1666
|
+
export const UsageUnitsDailyPoint = /*@__PURE__*/ S.suspend(() =>
|
|
1667
|
+
S.Struct({
|
|
1668
|
+
date: S.String,
|
|
1669
|
+
units: UsageUnitsDailyPointUnitsMap,
|
|
1670
|
+
}),
|
|
1671
|
+
).annotate({
|
|
1672
|
+
identifier: "UsageUnitsDailyPoint",
|
|
1673
|
+
}) as any as S.Schema<UsageUnitsDailyPoint>;
|
|
1674
|
+
|
|
1675
|
+
export type UsageDetailResponseUsageUnitsDailyList =
|
|
1676
|
+
Array<UsageUnitsDailyPoint>;
|
|
1677
|
+
export const UsageDetailResponseUsageUnitsDailyList = /*@__PURE__*/ S.Array(
|
|
1678
|
+
UsageUnitsDailyPoint,
|
|
1679
|
+
) as any as S.Schema<UsageDetailResponseUsageUnitsDailyList>;
|
|
1680
|
+
|
|
1681
|
+
export interface UsageDetailResponse {
|
|
1682
|
+
avgLatency: number | null;
|
|
1683
|
+
avgScore: number | null;
|
|
1684
|
+
description: string | null;
|
|
1685
|
+
failRate: number;
|
|
1686
|
+
guardrail_id: string;
|
|
1687
|
+
guardrail_name: string;
|
|
1688
|
+
provider: string;
|
|
1689
|
+
requestsEvaluated: number;
|
|
1690
|
+
status: string;
|
|
1691
|
+
time_series: UsageDetailResponseTimeSeriesList;
|
|
1692
|
+
trend: string;
|
|
1693
|
+
type: string;
|
|
1694
|
+
usage_units: UsageDetailResponseUsageUnitsMap;
|
|
1695
|
+
usage_units_by_key: UsageDetailResponseUsageUnitsByKeyMap;
|
|
1696
|
+
usage_units_by_team: UsageDetailResponseUsageUnitsByTeamMap;
|
|
1697
|
+
usage_units_daily: UsageDetailResponseUsageUnitsDailyList;
|
|
1698
|
+
}
|
|
1699
|
+
export const UsageDetailResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1700
|
+
S.Struct({
|
|
1701
|
+
avgLatency: S.NullOr(S.Number),
|
|
1702
|
+
avgScore: S.NullOr(S.Number),
|
|
1703
|
+
description: S.NullOr(S.String),
|
|
1704
|
+
failRate: S.Number,
|
|
1705
|
+
guardrail_id: S.String,
|
|
1706
|
+
guardrail_name: S.String,
|
|
1707
|
+
provider: S.String,
|
|
1708
|
+
requestsEvaluated: S.Number,
|
|
1709
|
+
status: S.String,
|
|
1710
|
+
time_series: UsageDetailResponseTimeSeriesList,
|
|
1711
|
+
trend: S.String,
|
|
1712
|
+
type: S.String,
|
|
1713
|
+
usage_units: UsageDetailResponseUsageUnitsMap,
|
|
1714
|
+
usage_units_by_key: UsageDetailResponseUsageUnitsByKeyMap,
|
|
1715
|
+
usage_units_by_team: UsageDetailResponseUsageUnitsByTeamMap,
|
|
1716
|
+
usage_units_daily: UsageDetailResponseUsageUnitsDailyList,
|
|
1717
|
+
}),
|
|
1718
|
+
).annotate({
|
|
1719
|
+
identifier: "UsageDetailResponse",
|
|
1720
|
+
}) as any as S.Schema<UsageDetailResponse>;
|
|
1721
|
+
|
|
1722
|
+
export interface GetGuardrailsUsageLogsGuardrailsUsageLogRequest {
|
|
1723
|
+
guardrail_id?: string;
|
|
1724
|
+
policy_id?: string;
|
|
1725
|
+
page?: number;
|
|
1726
|
+
page_size?: number;
|
|
1727
|
+
action?: string;
|
|
1728
|
+
start_date?: string;
|
|
1729
|
+
end_date?: string;
|
|
1730
|
+
}
|
|
1731
|
+
export const GetGuardrailsUsageLogsGuardrailsUsageLogRequest =
|
|
1732
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1733
|
+
S.Struct({
|
|
1734
|
+
guardrail_id: S.optional(S.String.pipe(T.Query())),
|
|
1735
|
+
policy_id: S.optional(S.String.pipe(T.Query())),
|
|
1736
|
+
page: S.optional(S.Number.pipe(T.Query())),
|
|
1737
|
+
page_size: S.optional(S.Number.pipe(T.Query())),
|
|
1738
|
+
action: S.optional(S.String.pipe(T.Query())),
|
|
1739
|
+
start_date: S.optional(S.String.pipe(T.Query())),
|
|
1740
|
+
end_date: S.optional(S.String.pipe(T.Query())),
|
|
1741
|
+
}).pipe(
|
|
1742
|
+
T.Http({ method: "GET", uri: "/guardrails/usage/logs", code: 200 }),
|
|
1743
|
+
),
|
|
1744
|
+
).annotate({
|
|
1745
|
+
identifier: "GetGuardrailsUsageLogsGuardrailsUsageLogRequest",
|
|
1746
|
+
}) as any as S.Schema<GetGuardrailsUsageLogsGuardrailsUsageLogRequest>;
|
|
1747
|
+
|
|
1748
|
+
export interface UsageLogEntry {
|
|
1749
|
+
action: string;
|
|
1750
|
+
id: string;
|
|
1751
|
+
input_snippet: string | null;
|
|
1752
|
+
latency_ms: number | null;
|
|
1753
|
+
model: string | null;
|
|
1754
|
+
output_snippet: string | null;
|
|
1755
|
+
reason: string | null;
|
|
1756
|
+
score: number | null;
|
|
1757
|
+
timestamp: string;
|
|
1758
|
+
}
|
|
1759
|
+
export const UsageLogEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1760
|
+
S.Struct({
|
|
1761
|
+
action: S.String,
|
|
1762
|
+
id: S.String,
|
|
1763
|
+
input_snippet: S.NullOr(S.String),
|
|
1764
|
+
latency_ms: S.NullOr(S.Number),
|
|
1765
|
+
model: S.NullOr(S.String),
|
|
1766
|
+
output_snippet: S.NullOr(S.String),
|
|
1767
|
+
reason: S.NullOr(S.String),
|
|
1768
|
+
score: S.NullOr(S.Number),
|
|
1769
|
+
timestamp: S.String,
|
|
1770
|
+
}),
|
|
1771
|
+
).annotate({ identifier: "UsageLogEntry" }) as any as S.Schema<UsageLogEntry>;
|
|
1772
|
+
|
|
1773
|
+
export type UsageLogsResponseLogsList = Array<UsageLogEntry>;
|
|
1774
|
+
export const UsageLogsResponseLogsList = /*@__PURE__*/ S.Array(
|
|
1775
|
+
UsageLogEntry,
|
|
1776
|
+
) as any as S.Schema<UsageLogsResponseLogsList>;
|
|
1777
|
+
|
|
1778
|
+
export interface UsageLogsResponse {
|
|
1779
|
+
logs: UsageLogsResponseLogsList;
|
|
1780
|
+
page: number;
|
|
1781
|
+
page_size: number;
|
|
1782
|
+
total: number;
|
|
1783
|
+
}
|
|
1784
|
+
export const UsageLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1785
|
+
S.Struct({
|
|
1786
|
+
logs: UsageLogsResponseLogsList,
|
|
1787
|
+
page: S.Number,
|
|
1788
|
+
page_size: S.Number,
|
|
1789
|
+
total: S.Number,
|
|
1790
|
+
}),
|
|
1791
|
+
).annotate({
|
|
1792
|
+
identifier: "UsageLogsResponse",
|
|
1793
|
+
}) as any as S.Schema<UsageLogsResponse>;
|
|
1794
|
+
|
|
1795
|
+
export interface GetGuardrailsUsageOverviewGuardrailsUsageOverviewRequest {
|
|
1796
|
+
/** YYYY-MM-DD */
|
|
1797
|
+
start_date?: string;
|
|
1798
|
+
/** YYYY-MM-DD */
|
|
1799
|
+
end_date?: string;
|
|
1800
|
+
}
|
|
1801
|
+
export const GetGuardrailsUsageOverviewGuardrailsUsageOverviewRequest =
|
|
1802
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1803
|
+
S.Struct({
|
|
1804
|
+
start_date: S.optional(S.String.pipe(T.Query())),
|
|
1805
|
+
end_date: S.optional(S.String.pipe(T.Query())),
|
|
1806
|
+
}).pipe(
|
|
1807
|
+
T.Http({ method: "GET", uri: "/guardrails/usage/overview", code: 200 }),
|
|
1808
|
+
),
|
|
1809
|
+
).annotate({
|
|
1810
|
+
identifier: "GetGuardrailsUsageOverviewGuardrailsUsageOverviewRequest",
|
|
1811
|
+
}) as any as S.Schema<GetGuardrailsUsageOverviewGuardrailsUsageOverviewRequest>;
|
|
1812
|
+
|
|
1813
|
+
export type UsageOverviewResponseChartList = Array<UsageChartPoint>;
|
|
1814
|
+
export const UsageOverviewResponseChartList = /*@__PURE__*/ S.Array(
|
|
1815
|
+
UsageChartPoint,
|
|
1816
|
+
) as any as S.Schema<UsageOverviewResponseChartList>;
|
|
1817
|
+
|
|
1818
|
+
export type UsageOverviewRowUsageUnitsMap = {
|
|
1819
|
+
[key: string]: number | undefined;
|
|
1820
|
+
};
|
|
1821
|
+
export const UsageOverviewRowUsageUnitsMap = /*@__PURE__*/ S.Record(
|
|
1822
|
+
S.String,
|
|
1823
|
+
S.Number,
|
|
1824
|
+
) as any as S.Schema<UsageOverviewRowUsageUnitsMap>;
|
|
1825
|
+
|
|
1826
|
+
export interface UsageOverviewRow {
|
|
1827
|
+
avgLatency: number | null;
|
|
1828
|
+
avgScore: number | null;
|
|
1829
|
+
failRate: number;
|
|
1830
|
+
id: string;
|
|
1831
|
+
name: string;
|
|
1832
|
+
provider: string;
|
|
1833
|
+
requestsEvaluated: number;
|
|
1834
|
+
status: string;
|
|
1835
|
+
trend: string;
|
|
1836
|
+
type: string;
|
|
1837
|
+
usageUnits: UsageOverviewRowUsageUnitsMap;
|
|
1838
|
+
}
|
|
1839
|
+
export const UsageOverviewRow = /*@__PURE__*/ S.suspend(() =>
|
|
1840
|
+
S.Struct({
|
|
1841
|
+
avgLatency: S.NullOr(S.Number),
|
|
1842
|
+
avgScore: S.NullOr(S.Number),
|
|
1843
|
+
failRate: S.Number,
|
|
1844
|
+
id: S.String,
|
|
1845
|
+
name: S.String,
|
|
1846
|
+
provider: S.String,
|
|
1847
|
+
requestsEvaluated: S.Number,
|
|
1848
|
+
status: S.String,
|
|
1849
|
+
trend: S.String,
|
|
1850
|
+
type: S.String,
|
|
1851
|
+
usageUnits: UsageOverviewRowUsageUnitsMap,
|
|
1852
|
+
}),
|
|
1853
|
+
).annotate({
|
|
1854
|
+
identifier: "UsageOverviewRow",
|
|
1855
|
+
}) as any as S.Schema<UsageOverviewRow>;
|
|
1856
|
+
|
|
1857
|
+
export type UsageOverviewResponseRowsList = Array<UsageOverviewRow>;
|
|
1858
|
+
export const UsageOverviewResponseRowsList = /*@__PURE__*/ S.Array(
|
|
1859
|
+
UsageOverviewRow,
|
|
1860
|
+
) as any as S.Schema<UsageOverviewResponseRowsList>;
|
|
1861
|
+
|
|
1862
|
+
export type UsageOverviewResponseTotalUsageUnitsMap = {
|
|
1863
|
+
[key: string]: number | undefined;
|
|
1864
|
+
};
|
|
1865
|
+
export const UsageOverviewResponseTotalUsageUnitsMap = /*@__PURE__*/ S.Record(
|
|
1866
|
+
S.String,
|
|
1867
|
+
S.Number,
|
|
1868
|
+
) as any as S.Schema<UsageOverviewResponseTotalUsageUnitsMap>;
|
|
1869
|
+
|
|
1870
|
+
export interface UsageOverviewResponse {
|
|
1871
|
+
chart: UsageOverviewResponseChartList;
|
|
1872
|
+
passRate: number;
|
|
1873
|
+
rows: UsageOverviewResponseRowsList;
|
|
1874
|
+
totalBlocked: number;
|
|
1875
|
+
totalRequests: number;
|
|
1876
|
+
totalUsageUnits: UsageOverviewResponseTotalUsageUnitsMap;
|
|
1877
|
+
}
|
|
1878
|
+
export const UsageOverviewResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1879
|
+
S.Struct({
|
|
1880
|
+
chart: UsageOverviewResponseChartList,
|
|
1881
|
+
passRate: S.Number,
|
|
1882
|
+
rows: UsageOverviewResponseRowsList,
|
|
1883
|
+
totalBlocked: S.Number,
|
|
1884
|
+
totalRequests: S.Number,
|
|
1885
|
+
totalUsageUnits: UsageOverviewResponseTotalUsageUnitsMap,
|
|
1886
|
+
}),
|
|
1887
|
+
).annotate({
|
|
1888
|
+
identifier: "UsageOverviewResponse",
|
|
1889
|
+
}) as any as S.Schema<UsageOverviewResponse>;
|
|
1890
|
+
|
|
1891
|
+
export interface GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetRequest {}
|
|
1892
|
+
export const GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetRequest =
|
|
1893
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1894
|
+
S.Struct({}).pipe(
|
|
1895
|
+
T.Http({
|
|
1896
|
+
method: "GET",
|
|
1897
|
+
uri: "/guardrails/ui/add_guardrail_settings",
|
|
1898
|
+
code: 200,
|
|
1899
|
+
}),
|
|
1900
|
+
),
|
|
1901
|
+
).annotate({
|
|
1902
|
+
identifier:
|
|
1903
|
+
"GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetRequest",
|
|
1904
|
+
}) as any as S.Schema<GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetRequest>;
|
|
1905
|
+
|
|
1906
|
+
export interface GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetResponse {
|
|
1907
|
+
body: unknown;
|
|
1908
|
+
}
|
|
1909
|
+
export const GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetResponse =
|
|
1910
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1911
|
+
S.Struct({
|
|
1912
|
+
body: S.Unknown,
|
|
1913
|
+
}),
|
|
1914
|
+
).annotate({
|
|
1915
|
+
identifier:
|
|
1916
|
+
"GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetResponse",
|
|
1917
|
+
}) as any as S.Schema<GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetResponse>;
|
|
1918
|
+
|
|
1919
|
+
export interface GetMajorAirlinesGuardrailsUiMajorAirlinesGetRequest {}
|
|
1920
|
+
export const GetMajorAirlinesGuardrailsUiMajorAirlinesGetRequest =
|
|
1921
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1922
|
+
S.Struct({}).pipe(
|
|
1923
|
+
T.Http({
|
|
1924
|
+
method: "GET",
|
|
1925
|
+
uri: "/guardrails/ui/major_airlines",
|
|
1926
|
+
code: 200,
|
|
1927
|
+
}),
|
|
1928
|
+
),
|
|
1929
|
+
).annotate({
|
|
1930
|
+
identifier: "GetMajorAirlinesGuardrailsUiMajorAirlinesGetRequest",
|
|
1931
|
+
}) as any as S.Schema<GetMajorAirlinesGuardrailsUiMajorAirlinesGetRequest>;
|
|
1932
|
+
|
|
1933
|
+
export interface GetMajorAirlinesGuardrailsUiMajorAirlinesGetResponse {
|
|
1934
|
+
body: unknown;
|
|
1935
|
+
}
|
|
1936
|
+
export const GetMajorAirlinesGuardrailsUiMajorAirlinesGetResponse =
|
|
1937
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1938
|
+
S.Struct({
|
|
1939
|
+
body: S.Unknown,
|
|
1940
|
+
}),
|
|
1941
|
+
).annotate({
|
|
1942
|
+
identifier: "GetMajorAirlinesGuardrailsUiMajorAirlinesGetResponse",
|
|
1943
|
+
}) as any as S.Schema<GetMajorAirlinesGuardrailsUiMajorAirlinesGetResponse>;
|
|
1944
|
+
|
|
1945
|
+
export interface GetPoliciesUsageOverviewPoliciesUsageOverviewRequest {
|
|
1946
|
+
/** YYYY-MM-DD */
|
|
1947
|
+
start_date?: string;
|
|
1948
|
+
/** YYYY-MM-DD */
|
|
1949
|
+
end_date?: string;
|
|
1950
|
+
}
|
|
1951
|
+
export const GetPoliciesUsageOverviewPoliciesUsageOverviewRequest =
|
|
1952
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1953
|
+
S.Struct({
|
|
1954
|
+
start_date: S.optional(S.String.pipe(T.Query())),
|
|
1955
|
+
end_date: S.optional(S.String.pipe(T.Query())),
|
|
1956
|
+
}).pipe(
|
|
1957
|
+
T.Http({ method: "GET", uri: "/policies/usage/overview", code: 200 }),
|
|
1958
|
+
),
|
|
1959
|
+
).annotate({
|
|
1960
|
+
identifier: "GetPoliciesUsageOverviewPoliciesUsageOverviewRequest",
|
|
1961
|
+
}) as any as S.Schema<GetPoliciesUsageOverviewPoliciesUsageOverviewRequest>;
|
|
1962
|
+
|
|
1963
|
+
export interface GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetRequest {}
|
|
1964
|
+
export const GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetRequest =
|
|
1965
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1966
|
+
S.Struct({}).pipe(
|
|
1967
|
+
T.Http({
|
|
1968
|
+
method: "GET",
|
|
1969
|
+
uri: "/guardrails/ui/provider_specific_params",
|
|
1970
|
+
code: 200,
|
|
1971
|
+
}),
|
|
1972
|
+
),
|
|
1973
|
+
).annotate({
|
|
1974
|
+
identifier:
|
|
1975
|
+
"GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetRequest",
|
|
1976
|
+
}) as any as S.Schema<GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetRequest>;
|
|
1977
|
+
|
|
1978
|
+
export interface GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetResponse {
|
|
1979
|
+
body: unknown;
|
|
1980
|
+
}
|
|
1981
|
+
export const GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetResponse =
|
|
1982
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1983
|
+
S.Struct({
|
|
1984
|
+
body: S.Unknown,
|
|
1985
|
+
}),
|
|
1986
|
+
).annotate({
|
|
1987
|
+
identifier:
|
|
1988
|
+
"GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetResponse",
|
|
1989
|
+
}) as any as S.Schema<GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetResponse>;
|
|
1990
|
+
|
|
1991
|
+
export interface ListGuardrailsGuardrailsListGetRequest {}
|
|
1992
|
+
export const ListGuardrailsGuardrailsListGetRequest = /*@__PURE__*/ S.suspend(
|
|
1993
|
+
() =>
|
|
1994
|
+
S.Struct({}).pipe(
|
|
1995
|
+
T.Http({ method: "GET", uri: "/guardrails/list", code: 200 }),
|
|
1996
|
+
),
|
|
1997
|
+
).annotate({
|
|
1998
|
+
identifier: "ListGuardrailsGuardrailsListGetRequest",
|
|
1999
|
+
}) as any as S.Schema<ListGuardrailsGuardrailsListGetRequest>;
|
|
2000
|
+
|
|
2001
|
+
export type GUARDRAILDEFINITIONLOCATION = "db" | "config";
|
|
2002
|
+
export const GUARDRAILDEFINITIONLOCATION = S.String;
|
|
2003
|
+
|
|
2004
|
+
export type GuardrailInfoResponseGuardrailInfoMap = {
|
|
2005
|
+
[key: string]: unknown | undefined;
|
|
2006
|
+
};
|
|
2007
|
+
export const GuardrailInfoResponseGuardrailInfoMap = /*@__PURE__*/ S.Record(
|
|
2008
|
+
S.String,
|
|
2009
|
+
S.Unknown,
|
|
2010
|
+
) as any as S.Schema<GuardrailInfoResponseGuardrailInfoMap>;
|
|
2011
|
+
|
|
2012
|
+
export type BaseLitellmParamsAdditionalProviderSpecificParamsMap = {
|
|
2013
|
+
[key: string]: unknown | undefined;
|
|
2014
|
+
};
|
|
2015
|
+
export const BaseLitellmParamsAdditionalProviderSpecificParamsMap =
|
|
2016
|
+
/*@__PURE__*/ S.Record(
|
|
2017
|
+
S.String,
|
|
2018
|
+
S.Unknown,
|
|
2019
|
+
) as any as S.Schema<BaseLitellmParamsAdditionalProviderSpecificParamsMap>;
|
|
2020
|
+
|
|
2021
|
+
export type BaseLitellmParamsBlockedWordsList = Array<BlockedWord>;
|
|
2022
|
+
export const BaseLitellmParamsBlockedWordsList = /*@__PURE__*/ S.Array(
|
|
2023
|
+
BlockedWord,
|
|
2024
|
+
) as any as S.Schema<BaseLitellmParamsBlockedWordsList>;
|
|
2025
|
+
|
|
2026
|
+
export type BaseLitellmParamsCategoriesList =
|
|
2027
|
+
Array<ContentFilterCategoryConfig>;
|
|
2028
|
+
export const BaseLitellmParamsCategoriesList = /*@__PURE__*/ S.Array(
|
|
2029
|
+
ContentFilterCategoryConfig,
|
|
2030
|
+
) as any as S.Schema<BaseLitellmParamsCategoriesList>;
|
|
2031
|
+
|
|
2032
|
+
export type BaseLitellmParamsDetectSecretsConfigMap = {
|
|
2033
|
+
[key: string]: unknown | undefined;
|
|
2034
|
+
};
|
|
2035
|
+
export const BaseLitellmParamsDetectSecretsConfigMap = /*@__PURE__*/ S.Record(
|
|
2036
|
+
S.String,
|
|
2037
|
+
S.Unknown,
|
|
2038
|
+
) as any as S.Schema<BaseLitellmParamsDetectSecretsConfigMap>;
|
|
2039
|
+
|
|
2040
|
+
export type BaseLitellmParamsExtraHeadersList = Array<string>;
|
|
2041
|
+
export const BaseLitellmParamsExtraHeadersList = /*@__PURE__*/ S.Array(
|
|
2042
|
+
S.String,
|
|
2043
|
+
) as any as S.Schema<BaseLitellmParamsExtraHeadersList>;
|
|
2044
|
+
|
|
2045
|
+
export type BaseLitellmParamsOnSensitiveData = "block" | "route";
|
|
2046
|
+
export const BaseLitellmParamsOnSensitiveData = S.String;
|
|
2047
|
+
|
|
2048
|
+
export type BaseLitellmParamsOnViolation = "warn" | "end_session";
|
|
2049
|
+
export const BaseLitellmParamsOnViolation = S.String;
|
|
2050
|
+
|
|
2051
|
+
export type BaseLitellmParamsPatternsList = Array<ContentFilterPattern>;
|
|
2052
|
+
export const BaseLitellmParamsPatternsList = /*@__PURE__*/ S.Array(
|
|
2053
|
+
ContentFilterPattern,
|
|
2054
|
+
) as any as S.Schema<BaseLitellmParamsPatternsList>;
|
|
2055
|
+
|
|
2056
|
+
/** Behavior when a guardrail endpoint is unreachable due to network errors. Implemented by guardrail='generic_guardrail_api', 'akto', 'vigil_guard', 'repelloai', 'headroom', and 'compresr'. 'fail_closed' raises an error (default). 'fail_open' logs a critical error and allows the request to proceed. */
|
|
2057
|
+
export type BaseLitellmParamsUnreachableFallback = "fail_closed" | "fail_open";
|
|
2058
|
+
export const BaseLitellmParamsUnreachableFallback = S.String;
|
|
2059
|
+
|
|
2060
|
+
export interface BaseLitellmParams {
|
|
2061
|
+
/** Additional provider-specific parameters for generic guardrail APIs */
|
|
2062
|
+
additional_provider_specific_params?: BaseLitellmParamsAdditionalProviderSpecificParamsMap | null;
|
|
2063
|
+
/** Base URL for the guardrail service API */
|
|
2064
|
+
api_base?: string | null;
|
|
2065
|
+
/** Optional custom API endpoint for Model Armor */
|
|
2066
|
+
api_endpoint?: string | null;
|
|
2067
|
+
/** API key for the guardrail service */
|
|
2068
|
+
api_key?: string | null;
|
|
2069
|
+
/** List of blocked words with individual actions */
|
|
2070
|
+
blocked_words?: BaseLitellmParamsBlockedWordsList | null;
|
|
2071
|
+
/** Path to YAML file containing blocked_words list */
|
|
2072
|
+
blocked_words_file?: string | null;
|
|
2073
|
+
/** List of prebuilt categories to enable (harmful_*, bias_*) */
|
|
2074
|
+
categories?: BaseLitellmParamsCategoriesList | null;
|
|
2075
|
+
/** Threshold configuration for Lakera guardrail categories */
|
|
2076
|
+
category_thresholds?: LakeraCategoryThresholds | null;
|
|
2077
|
+
/** Path to Google Cloud credentials JSON file or JSON string */
|
|
2078
|
+
credentials?: string | null;
|
|
2079
|
+
/** Python-like code containing the apply_guardrail function for custom guardrail logic */
|
|
2080
|
+
custom_code?: string | null;
|
|
2081
|
+
/** Whether the guardrail is enabled by default */
|
|
2082
|
+
default_on?: boolean | null;
|
|
2083
|
+
/** Configuration for detect-secrets guardrail */
|
|
2084
|
+
detect_secrets_config?: BaseLitellmParamsDetectSecretsConfigMap | null;
|
|
2085
|
+
/** For /v1/realtime sessions: automatically close the session after this many guardrail violations. */
|
|
2086
|
+
end_session_after_n_fails?: number | null;
|
|
2087
|
+
/** When True, guardrails only receive the latest message for the relevant role (e.g., newest user input pre-call, newest assistant output post-call) */
|
|
2088
|
+
experimental_use_latest_role_message_only?: boolean | null;
|
|
2089
|
+
/** Header names to forward from the client request to the guardrail (e.g. x-request-id). Only these headers' values are sent; others may be omitted or sent as [present]. Used by generic_guardrail_api (similar to MCP extra_headers). */
|
|
2090
|
+
extra_headers?: BaseLitellmParamsExtraHeadersList | null;
|
|
2091
|
+
/** Whether to fail the request if the guardrail encounters an error. Implemented by guardrail='model_armor', 'generic_guardrail_api' and 'crowdstrike_aidr'. True (default) raises the error. False logs a critical error and lets the request proceed, so only a valid guardrail response can block or modify it. */
|
|
2092
|
+
fail_on_error?: boolean | null;
|
|
2093
|
+
/** Name of the guardrail in guardrails.ai */
|
|
2094
|
+
guard_name?: string | null;
|
|
2095
|
+
/** Tag to use for keyword redaction */
|
|
2096
|
+
keyword_redaction_tag?: string | null;
|
|
2097
|
+
/** Google Cloud location/region (e.g., us-central1) */
|
|
2098
|
+
location?: string | null;
|
|
2099
|
+
/** Will mask request content if guardrail makes any changes */
|
|
2100
|
+
mask_request_content?: boolean | null;
|
|
2101
|
+
/** Will mask response content if guardrail makes any changes */
|
|
2102
|
+
mask_response_content?: boolean | null;
|
|
2103
|
+
/** Optional field if guardrail requires a 'model' parameter */
|
|
2104
|
+
model?: string | null;
|
|
2105
|
+
/** Action to take when sensitive data is detected. 'block' raises an exception (default behavior). 'route' reroutes the request to the model specified in sensitive_data_route_to_model. */
|
|
2106
|
+
on_sensitive_data?: BaseLitellmParamsOnSensitiveData | (string & {}) | null;
|
|
2107
|
+
/** For /v1/realtime sessions: 'warn' speaks the violation message and continues; 'end_session' speaks the message and closes the connection. */
|
|
2108
|
+
on_violation?: BaseLitellmParamsOnViolation | (string & {}) | null;
|
|
2109
|
+
/** When True, the guardrail only scans messages that have not already been scanned earlier in the same session (identified by litellm_session_id / session_id). Message content is hashed per session and cached; only the diff (new or edited messages) is sent to the guardrail provider on follow-up calls. Falls back to a full scan when the request has no session id or the cache is unavailable. Intended for blocking/detection guardrails; not applied when mask_request_content is set. */
|
|
2110
|
+
only_scan_new_messages?: boolean | null;
|
|
2111
|
+
/** Recipe for input (LLM request) */
|
|
2112
|
+
pangea_input_recipe?: string | null;
|
|
2113
|
+
/** Recipe for output (LLM response) */
|
|
2114
|
+
pangea_output_recipe?: string | null;
|
|
2115
|
+
/** Format string for pattern redaction (use {pattern_name} placeholder) */
|
|
2116
|
+
pattern_redaction_format?: string | null;
|
|
2117
|
+
/** List of patterns (prebuilt or custom regex) to detect */
|
|
2118
|
+
patterns?: BaseLitellmParamsPatternsList | null;
|
|
2119
|
+
/** The message the bot speaks aloud when a /v1/realtime guardrail fires. Falls back to violation_message_template if not set. */
|
|
2120
|
+
realtime_violation_message?: string | null;
|
|
2121
|
+
/** When True, this pre_call or post_call guardrail runs concurrently with other opted-in guardrails of the same hook, after the sequential guardrails have run. Use only for block-only guardrails that inspect and reject; do not enable it for guardrails that modify the request or response (e.g. PII masking or sensitive-data routing), since parallel runs share one snapshot and their mutations would race. */
|
|
2122
|
+
run_in_parallel?: boolean | null;
|
|
2123
|
+
/** For guardrail='model_armor': omit the raw Model Armor response from caller-facing errors and logs by default. Set False to restore verbose output. */
|
|
2124
|
+
sanitize_error_detail?: boolean | null;
|
|
2125
|
+
/** When True, unified guardrails only evaluate tool results, the untrusted data an agent feeds back into the model, and skip system, user, and assistant content. Intended for agent harnesses whose own prompt scaffolding is trusted but often trips prompt-attack detectors. */
|
|
2126
|
+
scan_only_tool_results?: boolean | null;
|
|
2127
|
+
/** When True, this pre_call guardrail always evaluates the request as it was before any guardrail in this hook ran, regardless of its position in the guardrails list -- so the YAML order of guardrails can never change whether this one blocks. Use only for block-only guardrails: any data this guardrail returns is discarded, same contract as run_in_parallel, since an earlier guardrail's masking must not be undone by this one. */
|
|
2128
|
+
scan_raw_request?: boolean | null;
|
|
2129
|
+
/** Model to route requests to when sensitive data is detected and on_sensitive_data='route'. This is typically an on-premise model for data privacy. The routing decision persists for the entire session. */
|
|
2130
|
+
sensitive_data_route_to_model?: string | null;
|
|
2131
|
+
/** Minimum severity to block (high, medium, low) */
|
|
2132
|
+
severity_threshold?: string | null;
|
|
2133
|
+
/** When True, unified guardrails skip system-role messages when building evaluation inputs (texts and structured_messages). When False, system messages are included even if litellm_settings sets a global skip. When None, use the global litellm.skip_system_message_in_guardrail setting. For Anthropic /v1/messages, the flag applies only to the trusted top-level system prompt. In-sequence system entries are untrusted client input and remain in texts and structured_messages. */
|
|
2134
|
+
skip_system_message_in_guardrail?: boolean | null;
|
|
2135
|
+
/** When True, unified guardrails skip tool-role messages when building evaluation inputs (texts and structured_messages). When False, tool messages are included even if litellm_settings sets a global skip. When None, use the global litellm.skip_tool_message_in_guardrail setting. */
|
|
2136
|
+
skip_tool_message_in_guardrail?: boolean | null;
|
|
2137
|
+
/** Implemented by guardrail='model_armor'. When True, attachment references that carry no inline bytes (file_id, gs://, or http(s) URLs) pass through unscanned instead of blocking, while fail_on_error still governs real Model Armor API errors. Default False blocks them. */
|
|
2138
|
+
skip_unscannable_attachments?: boolean | null;
|
|
2139
|
+
/** When True (default), after sensitive data is detected and routed, all subsequent requests in the same session will continue routing to the same model. */
|
|
2140
|
+
sticky_session_routing?: boolean | null;
|
|
2141
|
+
/** The ID of your Model Armor template */
|
|
2142
|
+
template_id?: string | null;
|
|
2143
|
+
/** Per-request timeout for the guardrail provider API call (seconds). Accepts int, float, or numeric string; coerced to float on load. Each guardrail handler chooses its own default when unset. */
|
|
2144
|
+
timeout?: number | null;
|
|
2145
|
+
/** Behavior when a guardrail endpoint is unreachable due to network errors. Implemented by guardrail='generic_guardrail_api', 'akto', 'vigil_guard', 'repelloai', 'headroom', and 'compresr'. 'fail_closed' raises an error (default). 'fail_open' logs a critical error and allows the request to proceed. */
|
|
2146
|
+
unreachable_fallback?: BaseLitellmParamsUnreachableFallback | (string & {});
|
|
2147
|
+
/** Custom message when a guardrail blocks an action. Supports placeholders like {tool_name}, {rule_id}, and {default_message}. */
|
|
2148
|
+
violation_message_template?: string | null;
|
|
2149
|
+
}
|
|
2150
|
+
export const BaseLitellmParams = /*@__PURE__*/ S.suspend(() =>
|
|
2151
|
+
S.Struct({
|
|
2152
|
+
additional_provider_specific_params: S.optional(
|
|
2153
|
+
S.NullOr(BaseLitellmParamsAdditionalProviderSpecificParamsMap),
|
|
2154
|
+
),
|
|
2155
|
+
api_base: S.optional(S.NullOr(S.String)),
|
|
2156
|
+
api_endpoint: S.optional(S.NullOr(S.String)),
|
|
2157
|
+
api_key: S.optional(S.NullOr(S.String)),
|
|
2158
|
+
blocked_words: S.optional(S.NullOr(BaseLitellmParamsBlockedWordsList)),
|
|
2159
|
+
blocked_words_file: S.optional(S.NullOr(S.String)),
|
|
2160
|
+
categories: S.optional(S.NullOr(BaseLitellmParamsCategoriesList)),
|
|
2161
|
+
category_thresholds: S.optional(S.NullOr(LakeraCategoryThresholds)),
|
|
2162
|
+
credentials: S.optional(S.NullOr(S.String)),
|
|
2163
|
+
custom_code: S.optional(S.NullOr(S.String)),
|
|
2164
|
+
default_on: S.optional(S.NullOr(S.Boolean)),
|
|
2165
|
+
detect_secrets_config: S.optional(
|
|
2166
|
+
S.NullOr(BaseLitellmParamsDetectSecretsConfigMap),
|
|
2167
|
+
),
|
|
2168
|
+
end_session_after_n_fails: S.optional(S.NullOr(S.Number)),
|
|
2169
|
+
experimental_use_latest_role_message_only: S.optional(S.NullOr(S.Boolean)),
|
|
2170
|
+
extra_headers: S.optional(S.NullOr(BaseLitellmParamsExtraHeadersList)),
|
|
2171
|
+
fail_on_error: S.optional(S.NullOr(S.Boolean)),
|
|
2172
|
+
guard_name: S.optional(S.NullOr(S.String)),
|
|
2173
|
+
keyword_redaction_tag: S.optional(S.NullOr(S.String)),
|
|
2174
|
+
location: S.optional(S.NullOr(S.String)),
|
|
2175
|
+
mask_request_content: S.optional(S.NullOr(S.Boolean)),
|
|
2176
|
+
mask_response_content: S.optional(S.NullOr(S.Boolean)),
|
|
2177
|
+
model: S.optional(S.NullOr(S.String)),
|
|
2178
|
+
on_sensitive_data: S.optional(S.NullOr(BaseLitellmParamsOnSensitiveData)),
|
|
2179
|
+
on_violation: S.optional(S.NullOr(BaseLitellmParamsOnViolation)),
|
|
2180
|
+
only_scan_new_messages: S.optional(S.NullOr(S.Boolean)),
|
|
2181
|
+
pangea_input_recipe: S.optional(S.NullOr(S.String)),
|
|
2182
|
+
pangea_output_recipe: S.optional(S.NullOr(S.String)),
|
|
2183
|
+
pattern_redaction_format: S.optional(S.NullOr(S.String)),
|
|
2184
|
+
patterns: S.optional(S.NullOr(BaseLitellmParamsPatternsList)),
|
|
2185
|
+
realtime_violation_message: S.optional(S.NullOr(S.String)),
|
|
2186
|
+
run_in_parallel: S.optional(S.NullOr(S.Boolean)),
|
|
2187
|
+
sanitize_error_detail: S.optional(S.NullOr(S.Boolean)),
|
|
2188
|
+
scan_only_tool_results: S.optional(S.NullOr(S.Boolean)),
|
|
2189
|
+
scan_raw_request: S.optional(S.NullOr(S.Boolean)),
|
|
2190
|
+
sensitive_data_route_to_model: S.optional(S.NullOr(S.String)),
|
|
2191
|
+
severity_threshold: S.optional(S.NullOr(S.String)),
|
|
2192
|
+
skip_system_message_in_guardrail: S.optional(S.NullOr(S.Boolean)),
|
|
2193
|
+
skip_tool_message_in_guardrail: S.optional(S.NullOr(S.Boolean)),
|
|
2194
|
+
skip_unscannable_attachments: S.optional(S.NullOr(S.Boolean)),
|
|
2195
|
+
sticky_session_routing: S.optional(S.NullOr(S.Boolean)),
|
|
2196
|
+
template_id: S.optional(S.NullOr(S.String)),
|
|
2197
|
+
timeout: S.optional(S.NullOr(S.Number)),
|
|
2198
|
+
unreachable_fallback: S.optional(BaseLitellmParamsUnreachableFallback),
|
|
2199
|
+
violation_message_template: S.optional(S.NullOr(S.String)),
|
|
2200
|
+
}),
|
|
2201
|
+
).annotate({
|
|
2202
|
+
identifier: "BaseLitellmParams",
|
|
2203
|
+
}) as any as S.Schema<BaseLitellmParams>;
|
|
2204
|
+
|
|
2205
|
+
export interface GuardrailInfoResponse {
|
|
2206
|
+
created_at?: string | null;
|
|
2207
|
+
guardrail_definition_location?: GUARDRAILDEFINITIONLOCATION;
|
|
2208
|
+
guardrail_id?: string | null;
|
|
2209
|
+
guardrail_info?: GuardrailInfoResponseGuardrailInfoMap | null;
|
|
2210
|
+
guardrail_name: string;
|
|
2211
|
+
litellm_params?: BaseLitellmParams | null;
|
|
2212
|
+
updated_at?: string | null;
|
|
2213
|
+
}
|
|
2214
|
+
export const GuardrailInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2215
|
+
S.Struct({
|
|
2216
|
+
created_at: S.optional(S.NullOr(S.String)),
|
|
2217
|
+
guardrail_definition_location: S.optional(GUARDRAILDEFINITIONLOCATION),
|
|
2218
|
+
guardrail_id: S.optional(S.NullOr(S.String)),
|
|
2219
|
+
guardrail_info: S.optional(S.NullOr(GuardrailInfoResponseGuardrailInfoMap)),
|
|
2220
|
+
guardrail_name: S.String,
|
|
2221
|
+
litellm_params: S.optional(S.NullOr(BaseLitellmParams)),
|
|
2222
|
+
updated_at: S.optional(S.NullOr(S.String)),
|
|
2223
|
+
}),
|
|
2224
|
+
).annotate({
|
|
2225
|
+
identifier: "GuardrailInfoResponse",
|
|
2226
|
+
}) as any as S.Schema<GuardrailInfoResponse>;
|
|
2227
|
+
|
|
2228
|
+
export type ListGuardrailsResponseGuardrailsList = Array<GuardrailInfoResponse>;
|
|
2229
|
+
export const ListGuardrailsResponseGuardrailsList = /*@__PURE__*/ S.Array(
|
|
2230
|
+
GuardrailInfoResponse,
|
|
2231
|
+
) as any as S.Schema<ListGuardrailsResponseGuardrailsList>;
|
|
2232
|
+
|
|
2233
|
+
export interface ListGuardrailsResponse {
|
|
2234
|
+
guardrails: ListGuardrailsResponseGuardrailsList;
|
|
2235
|
+
}
|
|
2236
|
+
export const ListGuardrailsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2237
|
+
S.Struct({
|
|
2238
|
+
guardrails: ListGuardrailsResponseGuardrailsList,
|
|
2239
|
+
}),
|
|
2240
|
+
).annotate({
|
|
2241
|
+
identifier: "ListGuardrailsResponse",
|
|
2242
|
+
}) as any as S.Schema<ListGuardrailsResponse>;
|
|
2243
|
+
|
|
2244
|
+
export interface ListGuardrailSubmissionsGuardrailsSubmissionsGetRequest {
|
|
2245
|
+
status?: string;
|
|
2246
|
+
team_id?: string;
|
|
2247
|
+
search?: string;
|
|
2248
|
+
}
|
|
2249
|
+
export const ListGuardrailSubmissionsGuardrailsSubmissionsGetRequest =
|
|
2250
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2251
|
+
S.Struct({
|
|
2252
|
+
status: S.optional(S.String.pipe(T.Query())),
|
|
2253
|
+
team_id: S.optional(S.String.pipe(T.Query())),
|
|
2254
|
+
search: S.optional(S.String.pipe(T.Query())),
|
|
2255
|
+
}).pipe(
|
|
2256
|
+
T.Http({ method: "GET", uri: "/guardrails/submissions", code: 200 }),
|
|
2257
|
+
),
|
|
2258
|
+
).annotate({
|
|
2259
|
+
identifier: "ListGuardrailSubmissionsGuardrailsSubmissionsGetRequest",
|
|
2260
|
+
}) as any as S.Schema<ListGuardrailSubmissionsGuardrailsSubmissionsGetRequest>;
|
|
2261
|
+
|
|
2262
|
+
export type ListGuardrailSubmissionsResponseSubmissionsList =
|
|
2263
|
+
Array<GuardrailSubmissionItem>;
|
|
2264
|
+
export const ListGuardrailSubmissionsResponseSubmissionsList =
|
|
2265
|
+
/*@__PURE__*/ S.Array(
|
|
2266
|
+
GuardrailSubmissionItem,
|
|
2267
|
+
) as any as S.Schema<ListGuardrailSubmissionsResponseSubmissionsList>;
|
|
2268
|
+
|
|
2269
|
+
export interface GuardrailSubmissionSummary {
|
|
2270
|
+
active: number;
|
|
2271
|
+
pending_review: number;
|
|
2272
|
+
rejected: number;
|
|
2273
|
+
total: number;
|
|
2274
|
+
}
|
|
2275
|
+
export const GuardrailSubmissionSummary = /*@__PURE__*/ S.suspend(() =>
|
|
2276
|
+
S.Struct({
|
|
2277
|
+
active: S.Number,
|
|
2278
|
+
pending_review: S.Number,
|
|
2279
|
+
rejected: S.Number,
|
|
2280
|
+
total: S.Number,
|
|
2281
|
+
}),
|
|
2282
|
+
).annotate({
|
|
2283
|
+
identifier: "GuardrailSubmissionSummary",
|
|
2284
|
+
}) as any as S.Schema<GuardrailSubmissionSummary>;
|
|
2285
|
+
|
|
2286
|
+
export interface ListGuardrailSubmissionsResponse {
|
|
2287
|
+
submissions: ListGuardrailSubmissionsResponseSubmissionsList;
|
|
2288
|
+
summary: GuardrailSubmissionSummary;
|
|
2289
|
+
}
|
|
2290
|
+
export const ListGuardrailSubmissionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2291
|
+
S.Struct({
|
|
2292
|
+
submissions: ListGuardrailSubmissionsResponseSubmissionsList,
|
|
2293
|
+
summary: GuardrailSubmissionSummary,
|
|
2294
|
+
}),
|
|
2295
|
+
).annotate({
|
|
2296
|
+
identifier: "ListGuardrailSubmissionsResponse",
|
|
2297
|
+
}) as any as S.Schema<ListGuardrailSubmissionsResponse>;
|
|
2298
|
+
|
|
2299
|
+
export interface ListGuardrailsV2V2GuardrailsListGetRequest {}
|
|
2300
|
+
export const ListGuardrailsV2V2GuardrailsListGetRequest =
|
|
2301
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2302
|
+
S.Struct({}).pipe(
|
|
2303
|
+
T.Http({ method: "GET", uri: "/v2/guardrails/list", code: 200 }),
|
|
2304
|
+
),
|
|
2305
|
+
).annotate({
|
|
2306
|
+
identifier: "ListGuardrailsV2V2GuardrailsListGetRequest",
|
|
2307
|
+
}) as any as S.Schema<ListGuardrailsV2V2GuardrailsListGetRequest>;
|
|
2308
|
+
|
|
2309
|
+
export type PatchGuardrailGuardrailsGuardrailIdPatchRequestGuardrailInfoMap = {
|
|
2310
|
+
[key: string]: unknown | undefined;
|
|
2311
|
+
};
|
|
2312
|
+
export const PatchGuardrailGuardrailsGuardrailIdPatchRequestGuardrailInfoMap =
|
|
2313
|
+
/*@__PURE__*/ S.Record(
|
|
2314
|
+
S.String,
|
|
2315
|
+
S.Unknown,
|
|
2316
|
+
) as any as S.Schema<PatchGuardrailGuardrailsGuardrailIdPatchRequestGuardrailInfoMap>;
|
|
2317
|
+
|
|
2318
|
+
export interface PatchGuardrailGuardrailsGuardrailIdPatchRequest {
|
|
2319
|
+
guardrail_id: string;
|
|
2320
|
+
guardrail_info?: PatchGuardrailGuardrailsGuardrailIdPatchRequestGuardrailInfoMap | null;
|
|
2321
|
+
guardrail_name?: string | null;
|
|
2322
|
+
litellm_params?: BaseLitellmParams | null;
|
|
2323
|
+
}
|
|
2324
|
+
export const PatchGuardrailGuardrailsGuardrailIdPatchRequest =
|
|
2325
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2326
|
+
S.Struct({
|
|
2327
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
2328
|
+
guardrail_info: S.optional(
|
|
2329
|
+
S.NullOr(
|
|
2330
|
+
PatchGuardrailGuardrailsGuardrailIdPatchRequestGuardrailInfoMap,
|
|
2331
|
+
),
|
|
2332
|
+
),
|
|
2333
|
+
guardrail_name: S.optional(S.NullOr(S.String)),
|
|
2334
|
+
litellm_params: S.optional(S.NullOr(BaseLitellmParams)),
|
|
2335
|
+
}).pipe(
|
|
2336
|
+
T.Http({ method: "PATCH", uri: "/guardrails/{guardrail_id}", code: 200 }),
|
|
2337
|
+
),
|
|
2338
|
+
).annotate({
|
|
2339
|
+
identifier: "PatchGuardrailGuardrailsGuardrailIdPatchRequest",
|
|
2340
|
+
}) as any as S.Schema<PatchGuardrailGuardrailsGuardrailIdPatchRequest>;
|
|
2341
|
+
|
|
2342
|
+
export interface PatchGuardrailGuardrailsGuardrailIdPatchResponse {
|
|
2343
|
+
body: unknown;
|
|
2344
|
+
}
|
|
2345
|
+
export const PatchGuardrailGuardrailsGuardrailIdPatchResponse =
|
|
2346
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2347
|
+
S.Struct({
|
|
2348
|
+
body: S.Unknown,
|
|
2349
|
+
}),
|
|
2350
|
+
).annotate({
|
|
2351
|
+
identifier: "PatchGuardrailGuardrailsGuardrailIdPatchResponse",
|
|
2352
|
+
}) as any as S.Schema<PatchGuardrailGuardrailsGuardrailIdPatchResponse>;
|
|
2353
|
+
|
|
2354
|
+
export type PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestRequestDataMap =
|
|
2355
|
+
{ [key: string]: unknown | undefined };
|
|
2356
|
+
export const PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestRequestDataMap =
|
|
2357
|
+
/*@__PURE__*/ S.Record(
|
|
2358
|
+
S.String,
|
|
2359
|
+
S.Unknown,
|
|
2360
|
+
) as any as S.Schema<PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestRequestDataMap>;
|
|
2361
|
+
|
|
2362
|
+
export type PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestTestInputMap =
|
|
2363
|
+
{ [key: string]: unknown | undefined };
|
|
2364
|
+
export const PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestTestInputMap =
|
|
2365
|
+
/*@__PURE__*/ S.Record(
|
|
2366
|
+
S.String,
|
|
2367
|
+
S.Unknown,
|
|
2368
|
+
) as any as S.Schema<PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestTestInputMap>;
|
|
2369
|
+
|
|
2370
|
+
export interface PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequest {
|
|
2371
|
+
custom_code: string;
|
|
2372
|
+
input_type?: string;
|
|
2373
|
+
request_data?: PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestRequestDataMap | null;
|
|
2374
|
+
test_input: PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestTestInputMap;
|
|
2375
|
+
}
|
|
2376
|
+
export const PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequest =
|
|
2377
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2378
|
+
S.Struct({
|
|
2379
|
+
custom_code: S.String,
|
|
2380
|
+
input_type: S.optional(S.String),
|
|
2381
|
+
request_data: S.optional(
|
|
2382
|
+
S.NullOr(
|
|
2383
|
+
PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestRequestDataMap,
|
|
2384
|
+
),
|
|
2385
|
+
),
|
|
2386
|
+
test_input:
|
|
2387
|
+
PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequestTestInputMap,
|
|
2388
|
+
}).pipe(
|
|
2389
|
+
T.Http({
|
|
2390
|
+
method: "POST",
|
|
2391
|
+
uri: "/guardrails/test_custom_code",
|
|
2392
|
+
code: 200,
|
|
2393
|
+
}),
|
|
2394
|
+
),
|
|
2395
|
+
).annotate({
|
|
2396
|
+
identifier: "PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequest",
|
|
2397
|
+
}) as any as S.Schema<PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequest>;
|
|
2398
|
+
|
|
2399
|
+
export type TestCustomCodeGuardrailResponseResultMap = {
|
|
2400
|
+
[key: string]: unknown | undefined;
|
|
2401
|
+
};
|
|
2402
|
+
export const TestCustomCodeGuardrailResponseResultMap = /*@__PURE__*/ S.Record(
|
|
2403
|
+
S.String,
|
|
2404
|
+
S.Unknown,
|
|
2405
|
+
) as any as S.Schema<TestCustomCodeGuardrailResponseResultMap>;
|
|
2406
|
+
|
|
2407
|
+
/** Response model for testing custom code guardrails. */
|
|
2408
|
+
export interface TestCustomCodeGuardrailResponse {
|
|
2409
|
+
error?: string | null;
|
|
2410
|
+
error_type?: string | null;
|
|
2411
|
+
result?: TestCustomCodeGuardrailResponseResultMap | null;
|
|
2412
|
+
success: boolean;
|
|
2413
|
+
}
|
|
2414
|
+
export const TestCustomCodeGuardrailResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2415
|
+
S.Struct({
|
|
2416
|
+
error: S.optional(S.NullOr(S.String)),
|
|
2417
|
+
error_type: S.optional(S.NullOr(S.String)),
|
|
2418
|
+
result: S.optional(S.NullOr(TestCustomCodeGuardrailResponseResultMap)),
|
|
2419
|
+
success: S.Boolean,
|
|
2420
|
+
}),
|
|
2421
|
+
).annotate({
|
|
2422
|
+
identifier: "TestCustomCodeGuardrailResponse",
|
|
2423
|
+
}) as any as S.Schema<TestCustomCodeGuardrailResponse>;
|
|
2424
|
+
|
|
2425
|
+
export type RegisterGuardrailGuardrailsRegisterPostRequestGuardrailInfoMap = {
|
|
2426
|
+
[key: string]: unknown | undefined;
|
|
2427
|
+
};
|
|
2428
|
+
export const RegisterGuardrailGuardrailsRegisterPostRequestGuardrailInfoMap =
|
|
2429
|
+
/*@__PURE__*/ S.Record(
|
|
2430
|
+
S.String,
|
|
2431
|
+
S.Unknown,
|
|
2432
|
+
) as any as S.Schema<RegisterGuardrailGuardrailsRegisterPostRequestGuardrailInfoMap>;
|
|
2433
|
+
|
|
2434
|
+
export type RegisterGuardrailGuardrailsRegisterPostRequestLitellmParamsMap = {
|
|
2435
|
+
[key: string]: unknown | undefined;
|
|
2436
|
+
};
|
|
2437
|
+
export const RegisterGuardrailGuardrailsRegisterPostRequestLitellmParamsMap =
|
|
2438
|
+
/*@__PURE__*/ S.Record(
|
|
2439
|
+
S.String,
|
|
2440
|
+
S.Unknown,
|
|
2441
|
+
) as any as S.Schema<RegisterGuardrailGuardrailsRegisterPostRequestLitellmParamsMap>;
|
|
2442
|
+
|
|
2443
|
+
export interface RegisterGuardrailGuardrailsRegisterPostRequest {
|
|
2444
|
+
guardrail_info?: RegisterGuardrailGuardrailsRegisterPostRequestGuardrailInfoMap | null;
|
|
2445
|
+
guardrail_name: string;
|
|
2446
|
+
litellm_params: RegisterGuardrailGuardrailsRegisterPostRequestLitellmParamsMap;
|
|
2447
|
+
team_id?: string | null;
|
|
2448
|
+
}
|
|
2449
|
+
export const RegisterGuardrailGuardrailsRegisterPostRequest =
|
|
2450
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2451
|
+
S.Struct({
|
|
2452
|
+
guardrail_info: S.optional(
|
|
2453
|
+
S.NullOr(
|
|
2454
|
+
RegisterGuardrailGuardrailsRegisterPostRequestGuardrailInfoMap,
|
|
2455
|
+
),
|
|
2456
|
+
),
|
|
2457
|
+
guardrail_name: S.String,
|
|
2458
|
+
litellm_params:
|
|
2459
|
+
RegisterGuardrailGuardrailsRegisterPostRequestLitellmParamsMap,
|
|
2460
|
+
team_id: S.optional(S.NullOr(S.String)),
|
|
2461
|
+
}).pipe(T.Http({ method: "POST", uri: "/guardrails/register", code: 200 })),
|
|
2462
|
+
).annotate({
|
|
2463
|
+
identifier: "RegisterGuardrailGuardrailsRegisterPostRequest",
|
|
2464
|
+
}) as any as S.Schema<RegisterGuardrailGuardrailsRegisterPostRequest>;
|
|
2465
|
+
|
|
2466
|
+
export interface RegisterGuardrailResponse {
|
|
2467
|
+
guardrail_id: string;
|
|
2468
|
+
guardrail_name: string;
|
|
2469
|
+
status: string;
|
|
2470
|
+
submitted_at?: string | null;
|
|
2471
|
+
}
|
|
2472
|
+
export const RegisterGuardrailResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2473
|
+
S.Struct({
|
|
2474
|
+
guardrail_id: S.String,
|
|
2475
|
+
guardrail_name: S.String,
|
|
2476
|
+
status: S.String,
|
|
2477
|
+
submitted_at: S.optional(S.NullOr(S.String)),
|
|
2478
|
+
}),
|
|
2479
|
+
).annotate({
|
|
2480
|
+
identifier: "RegisterGuardrailResponse",
|
|
2481
|
+
}) as any as S.Schema<RegisterGuardrailResponse>;
|
|
2482
|
+
|
|
2483
|
+
export interface RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostRequest {
|
|
2484
|
+
guardrail_id: string;
|
|
2485
|
+
}
|
|
2486
|
+
export const RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostRequest =
|
|
2487
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2488
|
+
S.Struct({
|
|
2489
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
2490
|
+
}).pipe(
|
|
2491
|
+
T.Http({
|
|
2492
|
+
method: "POST",
|
|
2493
|
+
uri: "/guardrails/submissions/{guardrail_id}/reject",
|
|
2494
|
+
code: 200,
|
|
2495
|
+
}),
|
|
2496
|
+
),
|
|
2497
|
+
).annotate({
|
|
2498
|
+
identifier:
|
|
2499
|
+
"RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostRequest",
|
|
2500
|
+
}) as any as S.Schema<RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostRequest>;
|
|
2501
|
+
|
|
2502
|
+
export interface RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostResponse {
|
|
2503
|
+
body: unknown;
|
|
2504
|
+
}
|
|
2505
|
+
export const RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostResponse =
|
|
2506
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2507
|
+
S.Struct({
|
|
2508
|
+
body: S.Unknown,
|
|
2509
|
+
}),
|
|
2510
|
+
).annotate({
|
|
2511
|
+
identifier:
|
|
2512
|
+
"RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostResponse",
|
|
2513
|
+
}) as any as S.Schema<RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostResponse>;
|
|
2514
|
+
|
|
2515
|
+
export interface UpdateGuardrailGuardrailsGuardrailIdPutRequest {
|
|
2516
|
+
guardrail_id: string;
|
|
2517
|
+
guardrail: Guardrail;
|
|
2518
|
+
}
|
|
2519
|
+
export const UpdateGuardrailGuardrailsGuardrailIdPutRequest =
|
|
2520
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2521
|
+
S.Struct({
|
|
2522
|
+
guardrail_id: S.String.pipe(T.Label()),
|
|
2523
|
+
guardrail: Guardrail,
|
|
2524
|
+
}).pipe(
|
|
2525
|
+
T.Http({ method: "PUT", uri: "/guardrails/{guardrail_id}", code: 200 }),
|
|
2526
|
+
),
|
|
2527
|
+
).annotate({
|
|
2528
|
+
identifier: "UpdateGuardrailGuardrailsGuardrailIdPutRequest",
|
|
2529
|
+
}) as any as S.Schema<UpdateGuardrailGuardrailsGuardrailIdPutRequest>;
|
|
2530
|
+
|
|
2531
|
+
export interface UpdateGuardrailGuardrailsGuardrailIdPutResponse {
|
|
2532
|
+
body: unknown;
|
|
2533
|
+
}
|
|
2534
|
+
export const UpdateGuardrailGuardrailsGuardrailIdPutResponse =
|
|
2535
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2536
|
+
S.Struct({
|
|
2537
|
+
body: S.Unknown,
|
|
2538
|
+
}),
|
|
2539
|
+
).annotate({
|
|
2540
|
+
identifier: "UpdateGuardrailGuardrailsGuardrailIdPutResponse",
|
|
2541
|
+
}) as any as S.Schema<UpdateGuardrailGuardrailsGuardrailIdPutResponse>;
|
|
2542
|
+
|
|
2543
|
+
export type ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequestBodyMap =
|
|
2544
|
+
{ [key: string]: string | undefined };
|
|
2545
|
+
export const ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequestBodyMap =
|
|
2546
|
+
/*@__PURE__*/ S.Record(
|
|
2547
|
+
S.String,
|
|
2548
|
+
S.String,
|
|
2549
|
+
) as any as S.Schema<ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequestBodyMap>;
|
|
2550
|
+
|
|
2551
|
+
export interface ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequest {
|
|
2552
|
+
body: ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequestBodyMap;
|
|
2553
|
+
}
|
|
2554
|
+
export const ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequest =
|
|
2555
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2556
|
+
S.Struct({
|
|
2557
|
+
body: ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequestBodyMap.pipe(
|
|
2558
|
+
T.HttpBody(),
|
|
2559
|
+
),
|
|
2560
|
+
}).pipe(
|
|
2561
|
+
T.Http({
|
|
2562
|
+
method: "POST",
|
|
2563
|
+
uri: "/guardrails/validate_blocked_words_file",
|
|
2564
|
+
code: 200,
|
|
2565
|
+
}),
|
|
2566
|
+
),
|
|
2567
|
+
).annotate({
|
|
2568
|
+
identifier:
|
|
2569
|
+
"ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequest",
|
|
2570
|
+
}) as any as S.Schema<ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequest>;
|
|
2571
|
+
|
|
2572
|
+
export interface ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostResponse {
|
|
2573
|
+
body: unknown;
|
|
2574
|
+
}
|
|
2575
|
+
export const ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostResponse =
|
|
2576
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
2577
|
+
S.Struct({
|
|
2578
|
+
body: S.Unknown,
|
|
2579
|
+
}),
|
|
2580
|
+
).annotate({
|
|
2581
|
+
identifier:
|
|
2582
|
+
"ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostResponse",
|
|
2583
|
+
}) as any as S.Schema<ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostResponse>;
|
|
2584
|
+
|
|
2585
|
+
export type ApplyGuardrailApplyGuardrailPostError =
|
|
2586
|
+
| UnprocessableEntity
|
|
2587
|
+
| LitellmOpError;
|
|
2588
|
+
/** Apply Guardrail Apply a guardrail to text input and return the processed result. This endpoint allows testing guardrails by applying them to custom text inputs. */
|
|
2589
|
+
export const applyGuardrailApplyGuardrailPost: API.OperationMethod<
|
|
2590
|
+
ApplyGuardrailApplyGuardrailPostRequest,
|
|
2591
|
+
ApplyGuardrailResponse,
|
|
2592
|
+
ApplyGuardrailApplyGuardrailPostError,
|
|
2593
|
+
LitellmOpContext
|
|
2594
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2595
|
+
input: ApplyGuardrailApplyGuardrailPostRequest,
|
|
2596
|
+
output: ApplyGuardrailResponse,
|
|
2597
|
+
errors: [UnprocessableEntity],
|
|
2598
|
+
protocol: LitellmProtocol,
|
|
2599
|
+
retry: Retry.Retry,
|
|
2600
|
+
}));
|
|
2601
|
+
|
|
2602
|
+
export type ApplyGuardrailGuardrailsApplyGuardrailPostError =
|
|
2603
|
+
| UnprocessableEntity
|
|
2604
|
+
| LitellmOpError;
|
|
2605
|
+
/** Apply Guardrail Apply a guardrail to text input and return the processed result. This endpoint allows testing guardrails by applying them to custom text inputs. */
|
|
2606
|
+
export const applyGuardrailGuardrailsApplyGuardrailPost: API.OperationMethod<
|
|
2607
|
+
ApplyGuardrailGuardrailsApplyGuardrailPostRequest,
|
|
2608
|
+
ApplyGuardrailResponse,
|
|
2609
|
+
ApplyGuardrailGuardrailsApplyGuardrailPostError,
|
|
2610
|
+
LitellmOpContext
|
|
2611
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2612
|
+
input: ApplyGuardrailGuardrailsApplyGuardrailPostRequest,
|
|
2613
|
+
output: ApplyGuardrailResponse,
|
|
2614
|
+
errors: [UnprocessableEntity],
|
|
2615
|
+
protocol: LitellmProtocol,
|
|
2616
|
+
retry: Retry.Retry,
|
|
2617
|
+
}));
|
|
2618
|
+
|
|
2619
|
+
export type ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostError =
|
|
2620
|
+
| UnprocessableEntity
|
|
2621
|
+
| LitellmOpError;
|
|
2622
|
+
/** Approve Guardrail Submission Approve a pending guardrail submission: set status to active and initialize in memory (admin only). */
|
|
2623
|
+
export const approveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePost: API.OperationMethod<
|
|
2624
|
+
ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostRequest,
|
|
2625
|
+
ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostResponse,
|
|
2626
|
+
ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostError,
|
|
2627
|
+
LitellmOpContext
|
|
2628
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2629
|
+
input:
|
|
2630
|
+
ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostRequest,
|
|
2631
|
+
output:
|
|
2632
|
+
ApproveGuardrailSubmissionGuardrailsSubmissionsGuardrailIdApprovePostResponse,
|
|
2633
|
+
errors: [UnprocessableEntity],
|
|
2634
|
+
protocol: LitellmProtocol,
|
|
2635
|
+
retry: Retry.Retry,
|
|
2636
|
+
}));
|
|
2637
|
+
|
|
2638
|
+
export type CreateGuardrailGuardrailsPostError =
|
|
2639
|
+
| UnprocessableEntity
|
|
2640
|
+
| LitellmOpError;
|
|
2641
|
+
/** Create Guardrail Create a new guardrail 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X POST "http://localhost:4000/guardrails" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "guardrail": { "guardrail_name": "my-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "DRAFT", "default_on": true }, "guardrail_info": { "description": "Bedrock content moderation guardrail" } } }' ``` Example Response: ```json { "guardrail_id": "123e4567-e89b-12d3-a456-426614174000", "guardrail_name": "my-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "DRAFT", "default_on": true }, "guardrail_info": { "description": "Bedrock content moderation guardrail" }, "created_at": "2023-11-09T12:34:56.789Z", "updated_at": "2023-11-09T12:34:56.789Z" } ``` */
|
|
2642
|
+
export const createGuardrailGuardrailsPost: API.OperationMethod<
|
|
2643
|
+
CreateGuardrailGuardrailsPostRequest,
|
|
2644
|
+
CreateGuardrailGuardrailsPostResponse,
|
|
2645
|
+
CreateGuardrailGuardrailsPostError,
|
|
2646
|
+
LitellmOpContext
|
|
2647
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2648
|
+
input: CreateGuardrailGuardrailsPostRequest,
|
|
2649
|
+
output: CreateGuardrailGuardrailsPostResponse,
|
|
2650
|
+
errors: [UnprocessableEntity],
|
|
2651
|
+
protocol: LitellmProtocol,
|
|
2652
|
+
retry: Retry.Retry,
|
|
2653
|
+
}));
|
|
2654
|
+
|
|
2655
|
+
export type DeleteGuardrailGuardrailsGuardrailIdDeleteError =
|
|
2656
|
+
| UnprocessableEntity
|
|
2657
|
+
| LitellmOpError;
|
|
2658
|
+
/** Delete Guardrail Delete a guardrail 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X DELETE "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000" \ -H "Authorization: Bearer <your_api_key>" ``` Example Response: ```json { "message": "Guardrail 123e4567-e89b-12d3-a456-426614174000 deleted successfully" } ``` */
|
|
2659
|
+
export const deleteGuardrailGuardrailsGuardrailIdDelete: API.OperationMethod<
|
|
2660
|
+
DeleteGuardrailGuardrailsGuardrailIdDeleteRequest,
|
|
2661
|
+
DeleteGuardrailGuardrailsGuardrailIdDeleteResponse,
|
|
2662
|
+
DeleteGuardrailGuardrailsGuardrailIdDeleteError,
|
|
2663
|
+
LitellmOpContext
|
|
2664
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2665
|
+
input: DeleteGuardrailGuardrailsGuardrailIdDeleteRequest,
|
|
2666
|
+
output: DeleteGuardrailGuardrailsGuardrailIdDeleteResponse,
|
|
2667
|
+
errors: [UnprocessableEntity],
|
|
2668
|
+
protocol: LitellmProtocol,
|
|
2669
|
+
retry: Retry.Retry,
|
|
2670
|
+
}));
|
|
2671
|
+
|
|
2672
|
+
export type GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetError =
|
|
2673
|
+
| UnprocessableEntity
|
|
2674
|
+
| LitellmOpError;
|
|
2675
|
+
/** Get Category Yaml Get the YAML or JSON content for a specific content filter category. Args: category_name: The name of the category (e.g., "bias_gender", "harmful_self_harm") Returns: The raw YAML or JSON content of the category file with file type indicator */
|
|
2676
|
+
export const getCategoryYamlGuardrailsUiCategoryYamlCategoryNameGet: API.OperationMethod<
|
|
2677
|
+
GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetRequest,
|
|
2678
|
+
GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetResponse,
|
|
2679
|
+
GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetError,
|
|
2680
|
+
LitellmOpContext
|
|
2681
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2682
|
+
input: GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetRequest,
|
|
2683
|
+
output: GetCategoryYamlGuardrailsUiCategoryYamlCategoryNameGetResponse,
|
|
2684
|
+
errors: [UnprocessableEntity],
|
|
2685
|
+
protocol: LitellmProtocol,
|
|
2686
|
+
retry: Retry.Retry,
|
|
2687
|
+
}));
|
|
2688
|
+
|
|
2689
|
+
export type GetGuardrailInfoGuardrailsGuardrailIdGetError =
|
|
2690
|
+
| UnprocessableEntity
|
|
2691
|
+
| LitellmOpError;
|
|
2692
|
+
/** Get Guardrail Info Get detailed information about a specific guardrail by ID 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X GET "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000/info" \ -H "Authorization: Bearer <your_api_key>" ``` Example Response: ```json { "guardrail_id": "123e4567-e89b-12d3-a456-426614174000", "guardrail_name": "my-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "DRAFT", "default_on": true }, "guardrail_info": { "description": "Bedrock content moderation guardrail" }, "created_at": "2023-11-09T12:34:56.789Z", "updated_at": "2023-11-09T12:34:56.789Z" } ``` */
|
|
2693
|
+
export const getGuardrailInfoGuardrailsGuardrailIdGet: API.OperationMethod<
|
|
2694
|
+
GetGuardrailInfoGuardrailsGuardrailIdGetRequest,
|
|
2695
|
+
GetGuardrailInfoGuardrailsGuardrailIdGetResponse,
|
|
2696
|
+
GetGuardrailInfoGuardrailsGuardrailIdGetError,
|
|
2697
|
+
LitellmOpContext
|
|
2698
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2699
|
+
input: GetGuardrailInfoGuardrailsGuardrailIdGetRequest,
|
|
2700
|
+
output: GetGuardrailInfoGuardrailsGuardrailIdGetResponse,
|
|
2701
|
+
errors: [UnprocessableEntity],
|
|
2702
|
+
protocol: LitellmProtocol,
|
|
2703
|
+
retry: Retry.Retry,
|
|
2704
|
+
}));
|
|
2705
|
+
|
|
2706
|
+
export type GetGuardrailInfoGuardrailsGuardrailIdInfoGetError =
|
|
2707
|
+
| UnprocessableEntity
|
|
2708
|
+
| LitellmOpError;
|
|
2709
|
+
/** Get Guardrail Info Get detailed information about a specific guardrail by ID 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X GET "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000/info" \ -H "Authorization: Bearer <your_api_key>" ``` Example Response: ```json { "guardrail_id": "123e4567-e89b-12d3-a456-426614174000", "guardrail_name": "my-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "DRAFT", "default_on": true }, "guardrail_info": { "description": "Bedrock content moderation guardrail" }, "created_at": "2023-11-09T12:34:56.789Z", "updated_at": "2023-11-09T12:34:56.789Z" } ``` */
|
|
2710
|
+
export const getGuardrailInfoGuardrailsGuardrailIdInfoGet: API.OperationMethod<
|
|
2711
|
+
GetGuardrailInfoGuardrailsGuardrailIdInfoGetRequest,
|
|
2712
|
+
GetGuardrailInfoGuardrailsGuardrailIdInfoGetResponse,
|
|
2713
|
+
GetGuardrailInfoGuardrailsGuardrailIdInfoGetError,
|
|
2714
|
+
LitellmOpContext
|
|
2715
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2716
|
+
input: GetGuardrailInfoGuardrailsGuardrailIdInfoGetRequest,
|
|
2717
|
+
output: GetGuardrailInfoGuardrailsGuardrailIdInfoGetResponse,
|
|
2718
|
+
errors: [UnprocessableEntity],
|
|
2719
|
+
protocol: LitellmProtocol,
|
|
2720
|
+
retry: Retry.Retry,
|
|
2721
|
+
}));
|
|
2722
|
+
|
|
2723
|
+
export type GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetError =
|
|
2724
|
+
| UnprocessableEntity
|
|
2725
|
+
| LitellmOpError;
|
|
2726
|
+
/** Get Guardrail Submission Get a single guardrail submission by id. Non-admins may only access submissions for teams they belong to. */
|
|
2727
|
+
export const getGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGet: API.OperationMethod<
|
|
2728
|
+
GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetRequest,
|
|
2729
|
+
GuardrailSubmissionItem,
|
|
2730
|
+
GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetError,
|
|
2731
|
+
LitellmOpContext
|
|
2732
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2733
|
+
input: GetGuardrailSubmissionGuardrailsSubmissionsGuardrailIdGetRequest,
|
|
2734
|
+
output: GuardrailSubmissionItem,
|
|
2735
|
+
errors: [UnprocessableEntity],
|
|
2736
|
+
protocol: LitellmProtocol,
|
|
2737
|
+
retry: Retry.Retry,
|
|
2738
|
+
}));
|
|
2739
|
+
|
|
2740
|
+
export type GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdError =
|
|
2741
|
+
| UnprocessableEntity
|
|
2742
|
+
| LitellmOpError;
|
|
2743
|
+
/** Guardrails Usage Detail Return single guardrail usage metrics and time series. */
|
|
2744
|
+
export const getGuardrailsUsageDetailGuardrailsUsageDetailGuardrailId: API.OperationMethod<
|
|
2745
|
+
GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdRequest,
|
|
2746
|
+
UsageDetailResponse,
|
|
2747
|
+
GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdError,
|
|
2748
|
+
LitellmOpContext
|
|
2749
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2750
|
+
input: GetGuardrailsUsageDetailGuardrailsUsageDetailGuardrailIdRequest,
|
|
2751
|
+
output: UsageDetailResponse,
|
|
2752
|
+
errors: [UnprocessableEntity],
|
|
2753
|
+
protocol: LitellmProtocol,
|
|
2754
|
+
retry: Retry.Retry,
|
|
2755
|
+
}));
|
|
2756
|
+
|
|
2757
|
+
export type GetGuardrailsUsageLogsGuardrailsUsageLogError =
|
|
2758
|
+
| UnprocessableEntity
|
|
2759
|
+
| LitellmOpError;
|
|
2760
|
+
/** Guardrails Usage Logs Return paginated run logs for a guardrail (or policy) from SpendLogs via index. */
|
|
2761
|
+
export const getGuardrailsUsageLogsGuardrailsUsageLog: API.OperationMethod<
|
|
2762
|
+
GetGuardrailsUsageLogsGuardrailsUsageLogRequest,
|
|
2763
|
+
UsageLogsResponse,
|
|
2764
|
+
GetGuardrailsUsageLogsGuardrailsUsageLogError,
|
|
2765
|
+
LitellmOpContext
|
|
2766
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2767
|
+
input: GetGuardrailsUsageLogsGuardrailsUsageLogRequest,
|
|
2768
|
+
output: UsageLogsResponse,
|
|
2769
|
+
errors: [UnprocessableEntity],
|
|
2770
|
+
protocol: LitellmProtocol,
|
|
2771
|
+
retry: Retry.Retry,
|
|
2772
|
+
}));
|
|
2773
|
+
|
|
2774
|
+
export type GetGuardrailsUsageOverviewGuardrailsUsageOverviewError =
|
|
2775
|
+
| UnprocessableEntity
|
|
2776
|
+
| LitellmOpError;
|
|
2777
|
+
/** Guardrails Usage Overview Return guardrail performance overview for the dashboard. */
|
|
2778
|
+
export const getGuardrailsUsageOverviewGuardrailsUsageOverview: API.OperationMethod<
|
|
2779
|
+
GetGuardrailsUsageOverviewGuardrailsUsageOverviewRequest,
|
|
2780
|
+
UsageOverviewResponse,
|
|
2781
|
+
GetGuardrailsUsageOverviewGuardrailsUsageOverviewError,
|
|
2782
|
+
LitellmOpContext
|
|
2783
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2784
|
+
input: GetGuardrailsUsageOverviewGuardrailsUsageOverviewRequest,
|
|
2785
|
+
output: UsageOverviewResponse,
|
|
2786
|
+
errors: [UnprocessableEntity],
|
|
2787
|
+
protocol: LitellmProtocol,
|
|
2788
|
+
retry: Retry.Retry,
|
|
2789
|
+
}));
|
|
2790
|
+
|
|
2791
|
+
export type GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetError =
|
|
2792
|
+
LitellmOpError;
|
|
2793
|
+
/** Get Guardrail Ui Settings Get the UI settings for the guardrails Returns: - Supported entities for guardrails - Supported modes for guardrails - PII entity categories for UI organization - Content filter settings (patterns and categories) */
|
|
2794
|
+
export const getGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGet: API.OperationMethod<
|
|
2795
|
+
GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetRequest,
|
|
2796
|
+
GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetResponse,
|
|
2797
|
+
GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetError,
|
|
2798
|
+
LitellmOpContext
|
|
2799
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2800
|
+
input: GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetRequest,
|
|
2801
|
+
output: GetGuardrailUiSettingsGuardrailsUiAddGuardrailSettingsGetResponse,
|
|
2802
|
+
errors: [],
|
|
2803
|
+
protocol: LitellmProtocol,
|
|
2804
|
+
retry: Retry.Retry,
|
|
2805
|
+
}));
|
|
2806
|
+
|
|
2807
|
+
export type GetMajorAirlinesGuardrailsUiMajorAirlinesGetError = LitellmOpError;
|
|
2808
|
+
/** Get Major Airlines Get the major airlines list from IATA (competitor intent, airline type). Returns airline id, match variants (pipe-separated), and tags. */
|
|
2809
|
+
export const getMajorAirlinesGuardrailsUiMajorAirlinesGet: API.OperationMethod<
|
|
2810
|
+
GetMajorAirlinesGuardrailsUiMajorAirlinesGetRequest,
|
|
2811
|
+
GetMajorAirlinesGuardrailsUiMajorAirlinesGetResponse,
|
|
2812
|
+
GetMajorAirlinesGuardrailsUiMajorAirlinesGetError,
|
|
2813
|
+
LitellmOpContext
|
|
2814
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2815
|
+
input: GetMajorAirlinesGuardrailsUiMajorAirlinesGetRequest,
|
|
2816
|
+
output: GetMajorAirlinesGuardrailsUiMajorAirlinesGetResponse,
|
|
2817
|
+
errors: [],
|
|
2818
|
+
protocol: LitellmProtocol,
|
|
2819
|
+
retry: Retry.Retry,
|
|
2820
|
+
}));
|
|
2821
|
+
|
|
2822
|
+
export type GetPoliciesUsageOverviewPoliciesUsageOverviewError =
|
|
2823
|
+
| UnprocessableEntity
|
|
2824
|
+
| LitellmOpError;
|
|
2825
|
+
/** Policies Usage Overview Return policy performance overview for the dashboard. */
|
|
2826
|
+
export const getPoliciesUsageOverviewPoliciesUsageOverview: API.OperationMethod<
|
|
2827
|
+
GetPoliciesUsageOverviewPoliciesUsageOverviewRequest,
|
|
2828
|
+
UsageOverviewResponse,
|
|
2829
|
+
GetPoliciesUsageOverviewPoliciesUsageOverviewError,
|
|
2830
|
+
LitellmOpContext
|
|
2831
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2832
|
+
input: GetPoliciesUsageOverviewPoliciesUsageOverviewRequest,
|
|
2833
|
+
output: UsageOverviewResponse,
|
|
2834
|
+
errors: [UnprocessableEntity],
|
|
2835
|
+
protocol: LitellmProtocol,
|
|
2836
|
+
retry: Retry.Retry,
|
|
2837
|
+
}));
|
|
2838
|
+
|
|
2839
|
+
export type GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetError =
|
|
2840
|
+
LitellmOpError;
|
|
2841
|
+
/** Get Provider Specific Params Get provider-specific parameters for different guardrail types. Returns a dictionary mapping guardrail providers to their specific parameters, including parameter names, descriptions, and whether they are required. Example Response: ```json { "bedrock": { "guardrailIdentifier": { "description": "The ID of your guardrail on Bedrock", "required": true, "type": null }, "guardrailVersion": { "description": "The version of your Bedrock guardrail (e.g., DRAFT or version number)", "required": true, "type": null } }, "azure_content_safety_text_moderation": { "api_key": { "description": "API key for the Azure Content Safety Text Moderation guardrail", "required": false, "type": null }, "optional_params": { "description": "Optional parameters for the Azure Content Safety Text Moderation guardrail", "required": true, "type": "nested", "fields": { "severity_threshold": { "description": "Severity threshold for the Azure Content Safety Text Moderation guardrail across all categories", "required": false, "type": null }, "categories": { "description": "Categories to scan for the Azure Content Safety Text Moderation guardrail", "required": false, "type": "multiselect", "options": ["Hate", "SelfHarm", "Sexual", "Violence"], "default_value": None } } } } } ``` */
|
|
2842
|
+
export const getProviderSpecificParamsGuardrailsUiProviderSpecificParamsGet: API.OperationMethod<
|
|
2843
|
+
GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetRequest,
|
|
2844
|
+
GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetResponse,
|
|
2845
|
+
GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetError,
|
|
2846
|
+
LitellmOpContext
|
|
2847
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2848
|
+
input: GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetRequest,
|
|
2849
|
+
output:
|
|
2850
|
+
GetProviderSpecificParamsGuardrailsUiProviderSpecificParamsGetResponse,
|
|
2851
|
+
errors: [],
|
|
2852
|
+
protocol: LitellmProtocol,
|
|
2853
|
+
retry: Retry.Retry,
|
|
2854
|
+
}));
|
|
2855
|
+
|
|
2856
|
+
export type ListGuardrailsGuardrailsListGetError = LitellmOpError;
|
|
2857
|
+
/** List Guardrails List the guardrails that are available on the proxy server 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X GET "http://localhost:4000/guardrails/list" -H "Authorization: Bearer <your_api_key>" ``` Example Response: ```json { "guardrails": [ { "guardrail_name": "bedrock-pre-guard", "guardrail_info": { "params": [ { "name": "toxicity_score", "type": "float", "description": "Score between 0-1 indicating content toxicity level" }, { "name": "pii_detection", "type": "boolean" } ] } } ] } ``` */
|
|
2858
|
+
export const listGuardrailsGuardrailsListGet: API.OperationMethod<
|
|
2859
|
+
ListGuardrailsGuardrailsListGetRequest,
|
|
2860
|
+
ListGuardrailsResponse,
|
|
2861
|
+
ListGuardrailsGuardrailsListGetError,
|
|
2862
|
+
LitellmOpContext
|
|
2863
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2864
|
+
input: ListGuardrailsGuardrailsListGetRequest,
|
|
2865
|
+
output: ListGuardrailsResponse,
|
|
2866
|
+
errors: [],
|
|
2867
|
+
protocol: LitellmProtocol,
|
|
2868
|
+
retry: Retry.Retry,
|
|
2869
|
+
}));
|
|
2870
|
+
|
|
2871
|
+
export type ListGuardrailSubmissionsGuardrailsSubmissionsGetError =
|
|
2872
|
+
| UnprocessableEntity
|
|
2873
|
+
| LitellmOpError;
|
|
2874
|
+
/** List Guardrail Submissions List team guardrail submissions. Returns only guardrails with a team_id. Admins see all submissions. Non-admin users see submissions for teams they are a member of. Status values: pending_review (team-registered, awaiting approval), active (approved), rejected. Optional filters: - status: pending_review | active | rejected - team_id: filter by specific team (non-admins must be a member of that team) - search: name/description */
|
|
2875
|
+
export const listGuardrailSubmissionsGuardrailsSubmissionsGet: API.OperationMethod<
|
|
2876
|
+
ListGuardrailSubmissionsGuardrailsSubmissionsGetRequest,
|
|
2877
|
+
ListGuardrailSubmissionsResponse,
|
|
2878
|
+
ListGuardrailSubmissionsGuardrailsSubmissionsGetError,
|
|
2879
|
+
LitellmOpContext
|
|
2880
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2881
|
+
input: ListGuardrailSubmissionsGuardrailsSubmissionsGetRequest,
|
|
2882
|
+
output: ListGuardrailSubmissionsResponse,
|
|
2883
|
+
errors: [UnprocessableEntity],
|
|
2884
|
+
protocol: LitellmProtocol,
|
|
2885
|
+
retry: Retry.Retry,
|
|
2886
|
+
}));
|
|
2887
|
+
|
|
2888
|
+
export type ListGuardrailsV2V2GuardrailsListGetError = LitellmOpError;
|
|
2889
|
+
/** List Guardrails V2 List the guardrails that are available in the database using GuardrailRegistry 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X GET "http://localhost:4000/v2/guardrails/list" -H "Authorization: Bearer <your_api_key>" ``` Example Response: ```json { "guardrails": [ { "guardrail_id": "123e4567-e89b-12d3-a456-426614174000", "guardrail_name": "my-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "DRAFT", "default_on": true }, "guardrail_info": { "description": "Bedrock content moderation guardrail" } } ] } ``` */
|
|
2890
|
+
export const listGuardrailsV2V2GuardrailsListGet: API.OperationMethod<
|
|
2891
|
+
ListGuardrailsV2V2GuardrailsListGetRequest,
|
|
2892
|
+
ListGuardrailsResponse,
|
|
2893
|
+
ListGuardrailsV2V2GuardrailsListGetError,
|
|
2894
|
+
LitellmOpContext
|
|
2895
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2896
|
+
input: ListGuardrailsV2V2GuardrailsListGetRequest,
|
|
2897
|
+
output: ListGuardrailsResponse,
|
|
2898
|
+
errors: [],
|
|
2899
|
+
protocol: LitellmProtocol,
|
|
2900
|
+
retry: Retry.Retry,
|
|
2901
|
+
}));
|
|
2902
|
+
|
|
2903
|
+
export type PatchGuardrailGuardrailsGuardrailIdPatchError =
|
|
2904
|
+
| UnprocessableEntity
|
|
2905
|
+
| LitellmOpError;
|
|
2906
|
+
/** Patch Guardrail Partially update an existing guardrail 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) This endpoint allows updating specific fields of a guardrail without sending the entire object. Only the following fields can be updated: - guardrail_name: The name of the guardrail - default_on: Whether the guardrail is enabled by default - guardrail_info: Additional information about the guardrail Example Request: ```bash curl -X PATCH "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "guardrail_name": "updated-name", "default_on": true, "guardrail_info": { "description": "Updated description" } }' ``` Example Response: ```json { "guardrail_id": "123e4567-e89b-12d3-a456-426614174000", "guardrail_name": "updated-name", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "DRAFT", "default_on": true }, "guardrail_info": { "description": "Updated description" }, "created_at": "2023-11-09T12:34:56.789Z", "updated_at": "2023-11-09T14:22:33.456Z" } ``` */
|
|
2907
|
+
export const patchGuardrailGuardrailsGuardrailIdPatch: API.OperationMethod<
|
|
2908
|
+
PatchGuardrailGuardrailsGuardrailIdPatchRequest,
|
|
2909
|
+
PatchGuardrailGuardrailsGuardrailIdPatchResponse,
|
|
2910
|
+
PatchGuardrailGuardrailsGuardrailIdPatchError,
|
|
2911
|
+
LitellmOpContext
|
|
2912
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2913
|
+
input: PatchGuardrailGuardrailsGuardrailIdPatchRequest,
|
|
2914
|
+
output: PatchGuardrailGuardrailsGuardrailIdPatchResponse,
|
|
2915
|
+
errors: [UnprocessableEntity],
|
|
2916
|
+
protocol: LitellmProtocol,
|
|
2917
|
+
retry: Retry.Retry,
|
|
2918
|
+
}));
|
|
2919
|
+
|
|
2920
|
+
export type PostTestCustomCodeGuardrailGuardrailsTestCustomCodeError =
|
|
2921
|
+
| UnprocessableEntity
|
|
2922
|
+
| LitellmOpError;
|
|
2923
|
+
/** Test Custom Code Guardrail Test custom code guardrail logic without creating a guardrail. This endpoint allows admins to experiment with custom code guardrails by: 1. Compiling the provided code in a sandbox 2. Executing the apply_guardrail function with test input 3. Returning the result (allow/block/modify) 👉 [Custom Code Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/custom_code_guardrail) Example Request: ```bash curl -X POST "http://localhost:4000/guardrails/test_custom_code" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "custom_code": "def apply_guardrail(inputs, request_data, input_type):\n for text in inputs[\"texts\"]:\n if regex_match(text, r\"\\d{3}-\\d{2}-\\d{4}\"):\n return block(\"SSN detected\")\n return allow()", "test_input": { "texts": ["My SSN is 123-45-6789"] }, "input_type": "request" }' ``` Example Success Response (blocked): ```json { "success": true, "result": { "action": "block", "reason": "SSN detected" }, "error": null, "error_type": null } ``` Example Success Response (allowed): ```json { "success": true, "result": { "action": "allow" }, "error": null, "error_type": null } ``` Example Success Response (modified): ```json { "success": true, "result": { "action": "modify", "texts": ["My SSN is [REDACTED]"] }, "error": null, "error_type": null } ``` Example Error Response (compilation error): ```json { "success": false, "result": null, "error": "Syntax error in custom code: invalid syntax (<guardrail>, line 1)", "error_type": "compilation" } ``` */
|
|
2924
|
+
export const postTestCustomCodeGuardrailGuardrailsTestCustomCode: API.OperationMethod<
|
|
2925
|
+
PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequest,
|
|
2926
|
+
TestCustomCodeGuardrailResponse,
|
|
2927
|
+
PostTestCustomCodeGuardrailGuardrailsTestCustomCodeError,
|
|
2928
|
+
LitellmOpContext
|
|
2929
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2930
|
+
input: PostTestCustomCodeGuardrailGuardrailsTestCustomCodeRequest,
|
|
2931
|
+
output: TestCustomCodeGuardrailResponse,
|
|
2932
|
+
errors: [UnprocessableEntity],
|
|
2933
|
+
protocol: LitellmProtocol,
|
|
2934
|
+
retry: Retry.Retry,
|
|
2935
|
+
}));
|
|
2936
|
+
|
|
2937
|
+
export type RegisterGuardrailGuardrailsRegisterPostError =
|
|
2938
|
+
| UnprocessableEntity
|
|
2939
|
+
| LitellmOpError;
|
|
2940
|
+
/** Register Guardrail Register a guardrail for onboarding (team submission). Accepts a guardrail config in the [Generic Guardrail API](https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api) format. The submission is stored with status `pending_review` until an admin approves it. */
|
|
2941
|
+
export const registerGuardrailGuardrailsRegisterPost: API.OperationMethod<
|
|
2942
|
+
RegisterGuardrailGuardrailsRegisterPostRequest,
|
|
2943
|
+
RegisterGuardrailResponse,
|
|
2944
|
+
RegisterGuardrailGuardrailsRegisterPostError,
|
|
2945
|
+
LitellmOpContext
|
|
2946
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2947
|
+
input: RegisterGuardrailGuardrailsRegisterPostRequest,
|
|
2948
|
+
output: RegisterGuardrailResponse,
|
|
2949
|
+
errors: [UnprocessableEntity],
|
|
2950
|
+
protocol: LitellmProtocol,
|
|
2951
|
+
retry: Retry.Retry,
|
|
2952
|
+
}));
|
|
2953
|
+
|
|
2954
|
+
export type RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostError =
|
|
2955
|
+
| UnprocessableEntity
|
|
2956
|
+
| LitellmOpError;
|
|
2957
|
+
/** Reject Guardrail Submission Reject a guardrail submission (admin only). */
|
|
2958
|
+
export const rejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPost: API.OperationMethod<
|
|
2959
|
+
RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostRequest,
|
|
2960
|
+
RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostResponse,
|
|
2961
|
+
RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostError,
|
|
2962
|
+
LitellmOpContext
|
|
2963
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2964
|
+
input:
|
|
2965
|
+
RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostRequest,
|
|
2966
|
+
output:
|
|
2967
|
+
RejectGuardrailSubmissionGuardrailsSubmissionsGuardrailIdRejectPostResponse,
|
|
2968
|
+
errors: [UnprocessableEntity],
|
|
2969
|
+
protocol: LitellmProtocol,
|
|
2970
|
+
retry: Retry.Retry,
|
|
2971
|
+
}));
|
|
2972
|
+
|
|
2973
|
+
export type UpdateGuardrailGuardrailsGuardrailIdPutError =
|
|
2974
|
+
| UnprocessableEntity
|
|
2975
|
+
| LitellmOpError;
|
|
2976
|
+
/** Update Guardrail Update an existing guardrail 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) Example Request: ```bash curl -X PUT "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "guardrail": { "guardrail_name": "updated-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "1.0", "default_on": true }, "guardrail_info": { "description": "Updated Bedrock content moderation guardrail" } } }' ``` Example Response: ```json { "guardrail_id": "123e4567-e89b-12d3-a456-426614174000", "guardrail_name": "updated-bedrock-guard", "litellm_params": { "guardrail": "bedrock", "mode": "pre_call", "guardrailIdentifier": "ff6ujrregl1q", "guardrailVersion": "1.0", "default_on": true }, "guardrail_info": { "description": "Updated Bedrock content moderation guardrail" }, "created_at": "2023-11-09T12:34:56.789Z", "updated_at": "2023-11-09T13:45:12.345Z" } ``` */
|
|
2977
|
+
export const updateGuardrailGuardrailsGuardrailIdPut: API.OperationMethod<
|
|
2978
|
+
UpdateGuardrailGuardrailsGuardrailIdPutRequest,
|
|
2979
|
+
UpdateGuardrailGuardrailsGuardrailIdPutResponse,
|
|
2980
|
+
UpdateGuardrailGuardrailsGuardrailIdPutError,
|
|
2981
|
+
LitellmOpContext
|
|
2982
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2983
|
+
input: UpdateGuardrailGuardrailsGuardrailIdPutRequest,
|
|
2984
|
+
output: UpdateGuardrailGuardrailsGuardrailIdPutResponse,
|
|
2985
|
+
errors: [UnprocessableEntity],
|
|
2986
|
+
protocol: LitellmProtocol,
|
|
2987
|
+
retry: Retry.Retry,
|
|
2988
|
+
}));
|
|
2989
|
+
|
|
2990
|
+
export type ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostError =
|
|
2991
|
+
| UnprocessableEntity
|
|
2992
|
+
| LitellmOpError;
|
|
2993
|
+
/** Validate Blocked Words File Validate a blocked_words YAML file content. Args: request: Dictionary with 'file_content' key containing the YAML string Returns: Dictionary with 'valid' boolean and either 'message'/'errors' depending on result Example Request: ```json { "file_content": "blocked_words:\n - keyword: \"test\"\n action: \"BLOCK\"" } ``` Example Success Response: ```json { "valid": true, "message": "Valid YAML file with 2 blocked words" } ``` Example Error Response: ```json { "valid": false, "errors": ["Entry 0: missing 'action' field"] } ``` */
|
|
2994
|
+
export const validateBlockedWordsFileGuardrailsValidateBlockedWordsFilePost: API.OperationMethod<
|
|
2995
|
+
ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequest,
|
|
2996
|
+
ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostResponse,
|
|
2997
|
+
ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostError,
|
|
2998
|
+
LitellmOpContext
|
|
2999
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
3000
|
+
input: ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostRequest,
|
|
3001
|
+
output:
|
|
3002
|
+
ValidateBlockedWordsFileGuardrailsValidateBlockedWordsFilePostResponse,
|
|
3003
|
+
errors: [UnprocessableEntity],
|
|
3004
|
+
protocol: LitellmProtocol,
|
|
3005
|
+
retry: Retry.Retry,
|
|
3006
|
+
}));
|