diff --git a/litellm/models/object_permission.py b/litellm/models/object_permission.py index 7ab70d86762..2d966659877 100644 --- a/litellm/models/object_permission.py +++ b/litellm/models/object_permission.py @@ -25,4 +25,4 @@ class LiteLLM_ObjectPermissionTable(LiteLLMPydanticObjectBase): blocked_tools: Optional[List[str]] = [] search_tools: Optional[List[str]] = [] mcp_tool_search_enabled: Optional[bool] = None - allowed_skills: Optional[List[str]] = None + allowed_skills: list[str] | None = None diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 668c3f48a4f..88638dc1040 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -1009,7 +1009,7 @@ class LiteLLM_ObjectPermissionBase(LiteLLMPydanticObjectBase): models: Optional[List[str]] = None search_tools: Optional[List[str]] = None mcp_tool_search_enabled: Optional[bool] = None - allowed_skills: Optional[List[str]] = None + allowed_skills: list[str] | None = None from litellm.types.object_permission import ( # noqa: E402 diff --git a/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace.py b/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace.py index 9d996a415f3..a518dd4823b 100644 --- a/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace.py +++ b/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace.py @@ -18,7 +18,7 @@ Endpoints: import json import re from datetime import datetime, timezone -from typing import Any, Dict, FrozenSet, Optional +from typing import Any, Dict from fastapi import APIRouter, Depends, HTTPException, Request, Security from fastapi.responses import JSONResponse @@ -54,11 +54,11 @@ async def _optional_user_api_key_auth( request: Request, api_key: str = Security(api_key_header), azure_api_key: str = Security(azure_api_key_header), - anthropic_api_key: Optional[str] = Security(anthropic_api_key_header), - google_ai_studio_api_key: Optional[str] = Security(google_ai_studio_api_key_header), - azure_apim_key: Optional[str] = Security(azure_apim_header), - custom_litellm_key: Optional[str] = Security(custom_litellm_key_header), -) -> Optional[UserAPIKeyAuth]: + anthropic_api_key: str | None = Security(anthropic_api_key_header), + google_ai_studio_api_key: str | None = Security(google_ai_studio_api_key_header), + azure_apim_key: str | None = Security(azure_apim_header), + custom_litellm_key: str | None = Security(custom_litellm_key_header), +) -> UserAPIKeyAuth | None: """ Resolve UserAPIKeyAuth if a key is present (header or, for this route, the `key` query param wired up via RouteChecks.is_claude_code_marketplace_route), @@ -95,7 +95,7 @@ async def _get_prisma_client(): tags=["Claude Code Marketplace"], ) async def get_marketplace( - user_api_key_dict: Optional[UserAPIKeyAuth] = Depends(_optional_user_api_key_auth), # noqa: B008 # DI idiom + user_api_key_dict: UserAPIKeyAuth | None = Depends(_optional_user_api_key_auth), # noqa: B008 # DI idiom ): """ Serve marketplace.json for Claude Code plugin discovery. @@ -120,7 +120,7 @@ async def get_marketplace( try: prisma_client = await _get_prisma_client() - allowed_skills: FrozenSet[str] = ( + allowed_skills: frozenset[str] = ( await get_allowed_skills(user_api_key_dict, prisma_client) if user_api_key_dict is not None else frozenset() ) where = ( diff --git a/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace_sources.py b/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace_sources.py index 54a16c7e028..3073a80434f 100644 --- a/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace_sources.py +++ b/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_marketplace_sources.py @@ -13,7 +13,6 @@ Endpoints: """ import re -from typing import Optional from fastapi import APIRouter, Depends, HTTPException @@ -100,7 +99,7 @@ async def _count_plugins(prisma_client, marketplace_id: str) -> int: return await ClaudeCodePluginRepository(prisma_client).table.count(where={"marketplace_id": marketplace_id}) -def _to_marketplace_source_response(marketplace, plugin_count: Optional[int]) -> MarketplaceSourceResponse: +def _to_marketplace_source_response(marketplace, plugin_count: int | None) -> MarketplaceSourceResponse: return MarketplaceSourceResponse( id=marketplace.id, name=marketplace.name, diff --git a/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_skill_authz.py b/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_skill_authz.py index 8acb66d0184..11361ce858c 100644 --- a/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_skill_authz.py +++ b/litellm/proxy/anthropic_endpoints/claude_code_endpoints/claude_code_skill_authz.py @@ -1,5 +1,3 @@ -from typing import Optional - from litellm._logging import verbose_logger from litellm.proxy._types import UI_TEAM_ID, UserAPIKeyAuth from litellm.proxy.utils import PrismaClient @@ -7,7 +5,7 @@ from litellm.proxy.utils import PrismaClient async def _get_allowed_skills_for_key( user_api_key_dict: UserAPIKeyAuth, - prisma_client: Optional[PrismaClient], + prisma_client: PrismaClient | None, ) -> frozenset[str]: """Key's own allowed_skills ceiling from its object_permission. @@ -36,7 +34,7 @@ async def _get_allowed_skills_for_key( async def _get_allowed_skills_for_team( user_api_key_dict: UserAPIKeyAuth, - prisma_client: Optional[PrismaClient], + prisma_client: PrismaClient | None, ) -> frozenset[str]: """Team's allowed_skills ceiling from team.object_permission.""" from litellm.proxy.auth.auth_checks import get_team_object @@ -63,7 +61,7 @@ async def _get_allowed_skills_for_team( async def _get_allowed_skills_for_org( user_api_key_dict: UserAPIKeyAuth, - prisma_client: Optional[PrismaClient], + prisma_client: PrismaClient | None, ) -> frozenset[str]: """Org's allowed_skills ceiling from org.object_permission.""" from litellm.proxy.auth.auth_checks import get_object_permission, get_org_object @@ -97,7 +95,7 @@ async def _get_allowed_skills_for_org( async def get_allowed_skills( user_api_key_dict: UserAPIKeyAuth, - prisma_client: Optional[PrismaClient], + prisma_client: PrismaClient | None, ) -> frozenset[str]: """ Resolve the set of Claude Code skill names (already-namespaced, e.g. diff --git a/litellm/proxy/management_helpers/object_permission_utils.py b/litellm/proxy/management_helpers/object_permission_utils.py index f304c338257..4075d8b5aed 100644 --- a/litellm/proxy/management_helpers/object_permission_utils.py +++ b/litellm/proxy/management_helpers/object_permission_utils.py @@ -708,7 +708,7 @@ async def validate_key_vector_stores_against_team( def _extract_requested_allowed_skills( - object_permission: Optional[ObjectPermissionDict], + object_permission: ObjectPermissionDict | None, ) -> set[str]: """Return allowed_skills names from a key's object_permission dict.""" if not object_permission or not isinstance(object_permission, dict): @@ -720,8 +720,8 @@ def _extract_requested_allowed_skills( async def validate_key_allowed_skills_against_team( - object_permission: Optional[ObjectPermissionDict], - team_obj: Optional["LiteLLM_TeamTableCachedObj"], + object_permission: ObjectPermissionDict | None, + team_obj: "LiteLLM_TeamTableCachedObj | None", is_proxy_admin: bool = False, ) -> None: """ @@ -752,7 +752,7 @@ async def validate_key_allowed_skills_against_team( }, ) - team_skills: List[str] = [] + team_skills: list[str] = [] if team_obj is not None and team_obj.object_permission is not None: skills = team_obj.object_permission.allowed_skills if skills: diff --git a/tests/test_litellm/proxy/management_endpoints/test_customer_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_customer_endpoints.py index 5fbc3c4869b..93b0112a50d 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_customer_endpoints.py +++ b/tests/test_litellm/proxy/management_endpoints/test_customer_endpoints.py @@ -719,6 +719,7 @@ _EXPECTED_CUSTOMER = { "blocked_tools": [], "search_tools": [], "mcp_tool_search_enabled": None, + "allowed_skills": None, }, } diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index f1d15d781e4..30c06b59867 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -706,6 +706,60 @@ export interface paths { patch?: never; trace?: never; }; + "/audit": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Audit Logs + * @description Get all audit logs with filtering and pagination. + * + * Returns a paginated response of audit logs matching the specified filters. + * + * Note: object_team_id and object_key_hash use Prisma JSON path filtering, + * which requires PostgreSQL. + */ + get: operations["get_audit_logs_audit_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/audit/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Audit Log By Id + * @description Get detailed information about a specific audit log entry by its ID. + * + * Args: + * id (str): The unique identifier of the audit log entry + * + * Returns: + * AuditLogResponse: Detailed information about the audit log entry + * + * Raises: + * HTTPException: If the audit log is not found or if there's a database connection error + */ + get: operations["get_audit_log_by_id_audit__id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/azure/{endpoint}": { parameters: { query?: never; @@ -3177,6 +3231,50 @@ export interface paths { patch?: never; trace?: never; }; + "/email/event_settings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Email Event Settings + * @description Get all email event settings + */ + get: operations["get_email_event_settings_email_event_settings_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update Event Settings + * @description Update the settings for email events + */ + patch: operations["update_event_settings_email_event_settings_patch"]; + trace?: never; + }; + "/email/event_settings/reset": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Reset Event Settings + * @description Reset all email event settings to default (new user invitations on, virtual key creation off) + */ + post: operations["reset_event_settings_email_event_settings_reset_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/embeddings": { parameters: { query?: never; @@ -9936,6 +10034,240 @@ export interface paths { patch?: never; trace?: never; }; + "/project/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete Project + * @description Delete projects + * + * Parameters: + * - project_ids: *List[str]* - List of project ids to delete + * + * Example: + * ```bash + * curl --location --request DELETE 'http://0.0.0.0:4000/project/delete' \ + * --header 'Authorization: Bearer sk-1234' \ + * --header 'Content-Type: application/json' \ + * --data '{ + * "project_ids": ["project-123", "project-456"] + * }' + * ``` + */ + delete: operations["delete_project_project_delete_delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/project/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Project Info + * @description Get information about a specific project + * + * Parameters: + * - project_id: *str* - The project id to fetch info for + * + * Example: + * ```bash + * curl --location 'http://0.0.0.0:4000/project/info?project_id=project-123' \ + * --header 'Authorization: Bearer sk-1234' + * ``` + */ + get: operations["project_info_project_info_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/project/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Projects + * @description List all projects that the user has access to + * + * Example: + * ```bash + * curl --location 'http://0.0.0.0:4000/project/list' \ + * --header 'Authorization: Bearer sk-1234' + * ``` + */ + get: operations["list_projects_project_list_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/project/new": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * New Project + * @description Create a new project. Projects sit between teams and keys in the hierarchy. + * + * Only admins or team admins can create projects. + * + * # Parameters + * + * - project_alias: *Optional[str]* - The name of the project. + * - description: *Optional[str]* - Description of the project's purpose and use case. + * - team_id: *str* - The team id that this project belongs to. Required. + * - models: *List* - The models the project has access to. + * - budget_id: *Optional[str]* - The id for a budget (tpm/rpm/max budget) for the project. + * ### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ### + * - max_budget: *Optional[float]* - Max budget for project + * - tpm_limit: *Optional[int]* - Max tpm limit for project + * - rpm_limit: *Optional[int]* - Max rpm limit for project + * - max_parallel_requests: *Optional[int]* - Max parallel requests for project + * - soft_budget: *Optional[float]* - Get a slack alert when this soft budget is reached. Don't block requests. + * - model_max_budget: *Optional[dict]* - Max budget for a specific model. Example: {"gpt-4": 100.0, "gpt-3.5-turbo": 50.0} + * - model_rpm_limit: *Optional[dict]* - RPM limits per model. Example: {"gpt-4": 1000, "gpt-3.5-turbo": 5000} + * - model_tpm_limit: *Optional[dict]* - TPM limits per model. Example: {"gpt-4": 50000, "gpt-3.5-turbo": 100000} + * - budget_duration: *Optional[str]* - Frequency of reseting project budget + * - metadata: *Optional[dict]* - Metadata for project, store information for project. Example metadata - {"use_case_id": "SNOW-12345", "responsible_ai_id": "RAI-67890"} + * - tags: *Optional[list]* - Tags for the project. Example: ["production", "api"] + * - blocked: *bool* - Flag indicating if the project is blocked or not - will stop all calls from keys with this project_id. + * - object_permission: Optional[LiteLLM_ObjectPermissionBase] - project-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"]}. IF null or {} then no object permission. + * + * Example 1: Create new project **without** a budget_id, with model-specific limits + * + * ```bash + * curl --location 'http://0.0.0.0:4000/project/new' \ + * --header 'Authorization: Bearer sk-1234' \ + * --header 'Content-Type: application/json' \ + * --data '{ + * "project_alias": "flight-search-assistant", + * "description": "AI-powered flight search and booking assistant", + * "team_id": "team-123", + * "models": ["gpt-4", "gpt-3.5-turbo"], + * "max_budget": 100, + * "model_rpm_limit": { + * "gpt-4": 1000, + * "gpt-3.5-turbo": 5000 + * }, + * "model_tpm_limit": { + * "gpt-4": 50000, + * "gpt-3.5-turbo": 100000 + * }, + * "metadata": { + * "use_case_id": "SNOW-12345", + * "responsible_ai_id": "RAI-67890" + * } + * }' + * ``` + * + * Example 2: Create new project **with** a budget_id + * + * ```bash + * curl --location 'http://0.0.0.0:4000/project/new' \ + * --header 'Authorization: Bearer sk-1234' \ + * --header 'Content-Type: application/json' \ + * --data '{ + * "project_alias": "hotel-recommendations", + * "description": "Personalized hotel recommendation engine", + * "team_id": "team-123", + * "models": ["claude-3-sonnet"], + * "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689", + * "metadata": { + * "use_case_id": "SNOW-54321" + * } + * }' + * ``` + */ + post: operations["new_project_project_new_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/project/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update Project + * @description Update a project + * + * Parameters: + * - project_id: *str* - The project id to update. Required. + * - project_alias: *Optional[str]* - Updated name for the project + * - description: *Optional[str]* - Updated description for the project + * - team_id: *Optional[str]* - Updated team_id for the project + * - metadata: *Optional[dict]* - Updated metadata for project + * - models: *Optional[list]* - Updated list of models for the project + * - blocked: *Optional[bool]* - Updated blocked status + * - max_budget: *Optional[float]* - Updated max budget + * - tpm_limit: *Optional[int]* - Updated tpm limit + * - rpm_limit: *Optional[int]* - Updated rpm limit + * - model_rpm_limit: *Optional[dict]* - Updated RPM limits per model + * - model_tpm_limit: *Optional[dict]* - Updated TPM limits per model + * - budget_duration: *Optional[str]* - Updated budget duration + * - tags: *Optional[list]* - Updated list of tags for the project + * - object_permission: Optional[LiteLLM_ObjectPermissionBase] - Updated object permission + * + * Example: + * ```bash + * curl --location 'http://0.0.0.0:4000/project/update' \ + * --header 'Authorization: Bearer sk-1234' \ + * --header 'Content-Type: application/json' \ + * --data '{ + * "project_id": "project-123", + * "description": "Updated flight search system with enhanced capabilities", + * "max_budget": 200, + * "model_rpm_limit": { + * "gpt-4": 2000, + * "gpt-3.5-turbo": 10000 + * }, + * "metadata": { + * "use_case_id": "SNOW-12345", + * "status": "active" + * } + * }' + * ``` + */ + post: operations["update_project_project_update_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/prompts": { parameters: { query?: never; @@ -10978,6 +11310,27 @@ export interface paths { patch?: never; trace?: never; }; + "/robots.txt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Robots + * @description Block all web crawlers from indexing the proxy server endpoints + * This is useful for ensuring that the API endpoints aren't indexed by search engines + */ + get: operations["get_robots_robots_txt_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/router/fields": { parameters: { query?: never; @@ -14049,6 +14402,26 @@ export interface paths { patch?: never; trace?: never; }; + "/user/available_users": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Available Enterprise Users + * @description For keys with `max_users` set, return the list of users that are allowed to use the key. + */ + get: operations["available_enterprise_users_user_available_users_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/user/bulk_update": { parameters: { query?: never; @@ -20333,6 +20706,37 @@ export interface components { */ unnamed_teams_count: number; }; + /** + * AuditLogResponse + * @description Response model for a single audit log entry + */ + AuditLogResponse: { + /** Action */ + action: string; + /** Before Value */ + before_value?: { + [key: string]: unknown; + } | null; + /** Changed By */ + changed_by: string; + /** Changed By Api Key */ + changed_by_api_key: string; + /** Id */ + id: string; + /** Object Id */ + object_id: string; + /** Table Name */ + table_name: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + /** Updated Values */ + updated_values?: { + [key: string]: unknown; + } | null; + }; /** BaseLitellmParams */ "BaseLitellmParams-Input": { /** @@ -20746,18 +21150,12 @@ export interface components { }; /** Body_audio_transcriptions_audio_transcriptions_post */ Body_audio_transcriptions_audio_transcriptions_post: { - /** - * File - * Format: binary - */ + /** File */ file: string; }; /** Body_audio_transcriptions_v1_audio_transcriptions_post */ Body_audio_transcriptions_v1_audio_transcriptions_post: { - /** - * File - * Format: binary - */ + /** File */ file: string; }; /** Body_convert_prompt_file_to_json_utils_dotprompt_json_converter_post */ @@ -20775,10 +21173,7 @@ export interface components { * @default openai */ custom_llm_provider: string; - /** - * File - * Format: binary - */ + /** File */ file: string; /** Litellm Metadata */ litellm_metadata?: string | null; @@ -20802,10 +21197,7 @@ export interface components { * @default openai */ custom_llm_provider: string; - /** - * File - * Format: binary - */ + /** File */ file: string; /** Litellm Metadata */ litellm_metadata?: string | null; @@ -20829,10 +21221,7 @@ export interface components { * @default openai */ custom_llm_provider: string; - /** - * File - * Format: binary - */ + /** File */ file: string; /** Litellm Metadata */ litellm_metadata?: string | null; @@ -20853,34 +21242,34 @@ export interface components { Body_image_edit_api_images_edits_post: { /** Image */ image?: string[] | null; - /** Image Array */ - image_array?: string[] | null; + /** Image[] */ + "image[]"?: string[] | null; /** Mask */ mask?: string[] | null; - /** Mask Array */ - mask_array?: string[] | null; + /** Mask[] */ + "mask[]"?: string[] | null; }; /** Body_image_edit_api_openai_deployments__model__images_edits_post */ Body_image_edit_api_openai_deployments__model__images_edits_post: { /** Image */ image?: string[] | null; - /** Image Array */ - image_array?: string[] | null; + /** Image[] */ + "image[]"?: string[] | null; /** Mask */ mask?: string[] | null; - /** Mask Array */ - mask_array?: string[] | null; + /** Mask[] */ + "mask[]"?: string[] | null; }; /** Body_image_edit_api_v1_images_edits_post */ Body_image_edit_api_v1_images_edits_post: { /** Image */ image?: string[] | null; - /** Image Array */ - image_array?: string[] | null; + /** Image[] */ + "image[]"?: string[] | null; /** Mask */ mask?: string[] | null; - /** Mask Array */ - mask_array?: string[] | null; + /** Mask[] */ + "mask[]"?: string[] | null; }; /** Body_test_model_connection_health_test_connection_post */ Body_test_model_connection_health_test_connection_post: { @@ -20906,30 +21295,21 @@ export interface components { }; /** Body_upload_logo_upload_logo_post */ Body_upload_logo_upload_logo_post: { - /** - * File - * Format: binary - */ + /** File */ file: string; }; /** Body_video_create_character_v1_videos_characters_post */ Body_video_create_character_v1_videos_characters_post: { /** Name */ name: string; - /** - * Video - * Format: binary - */ + /** Video */ video: string; }; /** Body_video_create_character_videos_characters_post */ Body_video_create_character_videos_characters_post: { /** Name */ name: string; - /** - * Video - * Format: binary - */ + /** Video */ video: string; }; /** Body_video_generation_v1_videos_post */ @@ -23002,6 +23382,14 @@ export interface components { /** Organization Ids */ organization_ids: string[]; }; + /** + * DeleteProjectRequest + * @description Request model for DELETE /project/delete + */ + DeleteProjectRequest: { + /** Project Ids */ + project_ids: string[]; + }; /** * DeleteSkillResponse * @description Response from deleting a skill @@ -23116,6 +23504,27 @@ export interface components { /** Write Capacity Units */ write_capacity_units?: number | null; }; + /** + * EmailEvent + * @enum {string} + */ + EmailEvent: "Virtual Key Created" | "New User Invitation" | "Virtual Key Rotated" | "Soft Budget Crossed" | "Max Budget Alert"; + /** EmailEventSettings */ + EmailEventSettings: { + /** Enabled */ + enabled: boolean; + event: components["schemas"]["EmailEvent"]; + }; + /** EmailEventSettingsResponse */ + EmailEventSettingsResponse: { + /** Settings */ + settings: components["schemas"]["EmailEventSettings"][]; + }; + /** EmailEventSettingsUpdateRequest */ + EmailEventSettingsUpdateRequest: { + /** Settings */ + settings: components["schemas"]["EmailEventSettings"][]; + }; /** EmbeddingRequest */ EmbeddingRequest: { /** @@ -25444,6 +25853,65 @@ export interface components { } & { [key: string]: unknown; }; + /** + * LiteLLM_ProjectTable + * @description Database model representation for project + */ + LiteLLM_ProjectTable: { + /** + * Blocked + * @default false + */ + blocked: boolean; + /** Budget Id */ + budget_id?: string | null; + /** Created At */ + created_at?: string | null; + /** Created By */ + created_by?: string | null; + /** Description */ + description?: string | null; + litellm_budget_table?: components["schemas"]["LiteLLM_BudgetTable"] | null; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Model Rpm Limit */ + model_rpm_limit?: { + [key: string]: unknown; + } | null; + /** Model Spend */ + model_spend?: { + [key: string]: unknown; + } | null; + /** Model Tpm Limit */ + model_tpm_limit?: { + [key: string]: unknown; + } | null; + /** + * Models + * @default [] + */ + models: string[]; + object_permission?: components["schemas"]["LiteLLM_ObjectPermissionTable"] | null; + /** Object Permission Id */ + object_permission_id?: string | null; + /** Project Alias */ + project_alias?: string | null; + /** Project Id */ + project_id: string; + /** + * Spend + * @default 0 + */ + spend: number; + /** Team Id */ + team_id?: string | null; + /** Updated At */ + updated_at?: string | null; + /** Updated By */ + updated_by?: string | null; + }; /** LiteLLM_ProxyModelTable */ LiteLLM_ProxyModelTable: { /** @@ -27465,6 +27933,134 @@ export interface components { /** Users */ users?: components["schemas"]["LiteLLM_UserTable"][] | null; }; + /** + * NewProjectRequest + * @description Request model for POST /project/new + */ + NewProjectRequest: { + /** Allowed Models */ + allowed_models?: string[] | null; + /** + * Blocked + * @default false + */ + blocked: boolean; + /** Budget Duration */ + budget_duration?: string | null; + /** Budget Id */ + budget_id?: string | null; + /** Description */ + description?: string | null; + /** Guardrails */ + guardrails?: string[] | null; + /** Max Budget */ + max_budget?: number | null; + /** Max Parallel Requests */ + max_parallel_requests?: number | null; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Model Max Budget */ + model_max_budget?: { + [key: string]: unknown; + } | null; + /** Model Rpm Limit */ + model_rpm_limit?: { + [key: string]: unknown; + } | null; + /** Model Tpm Limit */ + model_tpm_limit?: { + [key: string]: unknown; + } | null; + /** + * Models + * @default [] + */ + models: string[]; + object_permission?: components["schemas"]["LiteLLM_ObjectPermissionBase"] | null; + /** Policies */ + policies?: string[] | null; + /** Project Alias */ + project_alias?: string | null; + /** Project Id */ + project_id?: string | null; + /** Rpm Limit */ + rpm_limit?: number | null; + /** Soft Budget */ + soft_budget?: number | null; + /** Tags */ + tags?: string[] | null; + /** Team Id */ + team_id: string; + /** Tpm Limit */ + tpm_limit?: number | null; + }; + /** + * NewProjectResponse + * @description Response model for POST /project/new + */ + NewProjectResponse: { + /** + * Blocked + * @default false + */ + blocked: boolean; + /** Budget Id */ + budget_id?: string | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** Created By */ + created_by?: string | null; + /** Description */ + description?: string | null; + litellm_budget_table?: components["schemas"]["LiteLLM_BudgetTable"] | null; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Model Rpm Limit */ + model_rpm_limit?: { + [key: string]: unknown; + } | null; + /** Model Spend */ + model_spend?: { + [key: string]: unknown; + } | null; + /** Model Tpm Limit */ + model_tpm_limit?: { + [key: string]: unknown; + } | null; + /** + * Models + * @default [] + */ + models: string[]; + object_permission?: components["schemas"]["LiteLLM_ObjectPermissionTable"] | null; + /** Object Permission Id */ + object_permission_id?: string | null; + /** Project Alias */ + project_alias?: string | null; + /** Project Id */ + project_id: string; + /** + * Spend + * @default 0 + */ + spend: number; + /** Team Id */ + team_id?: string | null; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + /** Updated By */ + updated_by?: string | null; + }; /** NewTeamRequest */ NewTeamRequest: { /** Access Group Ids */ @@ -27992,6 +28588,34 @@ export interface components { /** Organizations */ organizations: string[]; }; + /** + * PaginatedAuditLogResponse + * @description Response model for paginated audit logs + */ + PaginatedAuditLogResponse: { + /** Audit Logs */ + audit_logs: components["schemas"]["AuditLogResponse"][]; + /** + * Page + * @description Current page number + */ + page: number; + /** + * Page Size + * @description Number of items per page + */ + page_size: number; + /** + * Total + * @description Total number of audit logs matching the filters + */ + total: number; + /** + * Total Pages + * @description Total number of pages + */ + total_pages: number; + }; /** PassThroughEndpointResponse */ PassThroughEndpointResponse: { /** Endpoints */ @@ -31522,6 +32146,63 @@ export interface components { /** Model Names */ model_names?: string[] | null; }; + /** + * UpdateProjectRequest + * @description Request model for POST /project/update + */ + UpdateProjectRequest: { + /** Allowed Models */ + allowed_models?: string[] | null; + /** Blocked */ + blocked?: boolean | null; + /** Budget Duration */ + budget_duration?: string | null; + /** Budget Id */ + budget_id?: string | null; + /** Description */ + description?: string | null; + /** Guardrails */ + guardrails?: string[] | null; + /** Max Budget */ + max_budget?: number | null; + /** Max Parallel Requests */ + max_parallel_requests?: number | null; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Model Max Budget */ + model_max_budget?: { + [key: string]: unknown; + } | null; + /** Model Rpm Limit */ + model_rpm_limit?: { + [key: string]: unknown; + } | null; + /** Model Tpm Limit */ + model_tpm_limit?: { + [key: string]: unknown; + } | null; + /** Models */ + models?: string[] | null; + object_permission?: components["schemas"]["LiteLLM_ObjectPermissionBase"] | null; + /** Policies */ + policies?: string[] | null; + /** Project Alias */ + project_alias?: string | null; + /** Project Id */ + project_id: string; + /** Rpm Limit */ + rpm_limit?: number | null; + /** Soft Budget */ + soft_budget?: number | null; + /** Tags */ + tags?: string[] | null; + /** Team Id */ + team_id?: string | null; + /** Tpm Limit */ + tpm_limit?: number | null; + }; /** * UpdatePublicModelGroupsRequest * @description Request model for updating public model groups @@ -32418,6 +33099,10 @@ export interface components { }; /** ValidationError */ ValidationError: { + /** Context */ + ctx?: Record; + /** Input */ + input?: unknown; /** Location */ loc: (string | number)[]; /** Message */ @@ -33988,6 +34673,105 @@ export interface operations { }; }; }; + get_audit_logs_audit_get: { + parameters: { + query?: { + page?: number; + page_size?: number; + /** @description Filter by user or system that performed the action */ + changed_by?: string | null; + /** @description Filter by API key hash that performed the action */ + changed_by_api_key?: string | null; + /** @description Filter by action type (create, update, delete) */ + action?: string | null; + /** @description Filter by table name that was modified */ + table_name?: string | null; + /** @description Filter by ID of the object that was modified */ + object_id?: string | null; + /** @description Filter logs after this date */ + start_date?: string | null; + /** @description Filter logs before this date */ + end_date?: string | null; + /** @description Filter by team_id present in before_value or updated_values JSON (PostgreSQL only) */ + object_team_id?: string | null; + /** @description Filter by token (key hash) present in before_value or updated_values JSON (PostgreSQL only) */ + object_key_hash?: string | null; + /** @description Column to sort by (e.g. 'updated_at', 'action', 'table_name') */ + sort_by?: string | null; + /** @description Sort order ('asc' or 'desc') */ + sort_order?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PaginatedAuditLogResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_audit_log_by_id_audit__id__get: { + parameters: { + query?: never; + header?: never; + path: { + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuditLogResponse"]; + }; + }; + /** @description Audit log not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + /** @description Database connection error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; azure_proxy_route_azure__endpoint__get: { parameters: { query?: never; @@ -37604,6 +38388,79 @@ export interface operations { }; }; }; + get_email_event_settings_email_event_settings_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EmailEventSettingsResponse"]; + }; + }; + }; + }; + update_event_settings_email_event_settings_patch: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["EmailEventSettingsUpdateRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + reset_event_settings_email_event_settings_reset_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; embeddings_embeddings_post: { parameters: { query?: never; @@ -43793,11 +44650,7 @@ export interface operations { }; websocket_realtime_websocket_endpoint_get_3: { parameters: { - query?: { - model?: string; - intent?: string; - guardrails?: string; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -45772,6 +46625,156 @@ export interface operations { }; }; }; + delete_project_project_delete_delete: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DeleteProjectRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LiteLLM_ProjectTable"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + project_info_project_info_get: { + parameters: { + query: { + project_id: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LiteLLM_ProjectTable"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_projects_project_list_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LiteLLM_ProjectTable"][]; + }; + }; + }; + }; + new_project_project_new_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["NewProjectRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["NewProjectResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_project_project_update_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["UpdateProjectRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LiteLLM_ProjectTable"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; create_prompt_prompts_post: { parameters: { query?: never; @@ -46386,11 +47389,7 @@ export interface operations { }; websocket_realtime_websocket_endpoint_get: { parameters: { - query?: { - model?: string; - intent?: string; - guardrails?: string; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -46508,9 +47507,7 @@ export interface operations { }; websocket_responses_websocket_endpoint_get: { parameters: { - query?: { - model?: string; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -46690,6 +47687,26 @@ export interface operations { }; }; }; + get_robots_robots_txt_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; get_router_fields_router_fields_get: { parameters: { query?: never; @@ -50334,6 +51351,26 @@ export interface operations { }; }; }; + available_enterprise_users_user_available_users_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; bulk_user_update_user_bulk_update_post: { parameters: { query?: never; @@ -54159,11 +55196,7 @@ export interface operations { }; websocket_realtime_websocket_endpoint_get_2: { parameters: { - query?: { - model?: string; - intent?: string; - guardrails?: string; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -54241,9 +55274,7 @@ export interface operations { }; websocket_responses_websocket_endpoint_get_2: { parameters: { - query?: { - model?: string; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -57585,11 +58616,7 @@ export interface operations { }; websocket_vertex_ai_live_passthrough_endpoint: { parameters: { - query?: { - model?: string; - vertex_project?: string; - vertex_location?: string; - }; + query?: never; header?: never; path?: never; cookie?: never;