brk-code

litellm の API リファレンス

litellm (BerriAI/litellm) の公開 API 400 件 —— クラス 181、関数 132、メソッド 87。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: BerriAI/litellm

種別件数
クラス181
関数132
メソッド87

API 一覧

func.github.workflows.run_llm_translation_tests.format_duration(seconds:float) -> str
Format duration in human-readable format
func.github.workflows.run_llm_translation_tests.get_provider_from_test_file(test_file:str) -> str
Map test file names to provider names
func.github.workflows.run_llm_translation_tests.print_colored(message:str, color:str=Colors.RESET)
Print colored message to terminal
funccookbook.anthropic_agent_sdk.agent_with_mcp.main()
Run interactive chat with MCP
classcookbook.anthropic_agent_sdk.common.Config
Configuration for LiteLLM Gateway connection
funccookbook.anthropic_agent_sdk.common.fetch_available_models(base_url:str, api_key:str) -> list[str]
Fetch available models from LiteLLM proxy /models endpoint
funccookbook.anthropic_agent_sdk.common.handle_model_list(available_models:list[str], current_model:str)
Display available models
funccookbook.anthropic_agent_sdk.common.print_header(base_url:str, current_model:str, has_mcp:bool=False)
Print the chat header
funccookbook.anthropic_agent_sdk.common.stream_response(client, user_input:str)
Stream response from the agent
funccookbook.anthropic_agent_sdk.main.interactive_chat()
Interactive CLI chat with the agent
funccookbook.anthropic_agent_sdk.main.main()
Run interactive chat
funccookbook.litellm_proxy_server.braintrust_prompt_wrapper_server.health_check()
Health check endpoint.
funccookbook.litellm_proxy_server.braintrust_prompt_wrapper_server.main()
Run the server.
funccookbook.litellm_proxy_server.cli_token_usage.main()
Using CLI token with LiteLLM SDK
funccookbook.livekit_agent_sdk.main.main()
Run the voice agent
funccookbook.livekit_agent_sdk.main.run_voice_agent()
Simple voice agent that: 1.
classcookbook.mock_guardrail_server.mock_bedrock_guardrail_server.GuardrailConfig
Configuration for mock guardrail behavior
funccookbook.mock_guardrail_server.mock_bedrock_guardrail_server.check_blocked_topics(text:str) -> Optional[TopicPolicy]
Check if text contains blocked topics
funccookbook.mock_guardrail_server.mock_bedrock_guardrail_server.check_blocked_words(text:str) -> Optional[WordPolicy]
Check if text contains blocked words
funccookbook.mock_guardrail_server.mock_bedrock_guardrail_server.health()
Health check endpoint
funccookbook.mock_guardrail_server.mock_bedrock_guardrail_server.root()
Health check endpoint
classcookbook.mock_prompt_management_server.mock_prompt_management_server.MessageContent
A single message in the prompt template
funccookbook.mock_prompt_management_server.mock_prompt_management_server.health_check()
Health check endpoint
funccookbook.mock_prompt_management_server.mock_prompt_management_server.list_prompts(authorization:Optional[str]=Header(None))
List all available prompts.
funccookbook.mock_prompt_management_server.mock_prompt_management_server.verify_api_key(authorization:Optional[str]=Header(None)) -> bool
Verify the API key from the Authorization header.
classcookbook.nova_sonic_realtime.RealtimeClient
Client for LiteLLM realtime API with audio support.
methodcookbook.nova_sonic_realtime.RealtimeClient.close()
Close the connection and cleanup.
methodcookbook.nova_sonic_realtime.RealtimeClient.send_audio_chunk(audio_bytes:bytes)
Send audio chunk to server.
methodcookbook.nova_sonic_realtime.RealtimeClient.send_session_update()
Send session configuration.
funccookbook.nova_sonic_realtime.main()
Main function to run the realtime client.
classcookbook.veo_video_generation.VeoVideoGenerator
Complete Veo video generation client using LiteLLM proxy.
methodcookbook.veo_video_generation.VeoVideoGenerator.download_video(video_uri:str, output_filename:str='generated_video.mp4') -> bool
Download the generated video file.
methodcookbook.veo_video_generation.VeoVideoGenerator.generate_and_download(prompt:str, output_filename:str=None) -> bool
Complete workflow: generate video and download it.
methodcookbook.veo_video_generation.VeoVideoGenerator.generate_video(prompt:str) -> Optional[str]
Initiate video generation with Veo.
funccookbook.veo_video_generation.main()
Example usage of the VeoVideoGenerator.
funcdb_scripts.migrate_keys.migrate_verification_tokens()
Main migration function
funcdb_scripts.migrate_keys.parse_csv_value(value:str, field_type:str) -> Any
Parse CSV values according to their expected types
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.adafruit.AdafruitKeyDetector
Scans for Adafruit keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.adobe.AdobeSecretDetector
Scans for Adobe client keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.age_secret_key.AgeSecretKeyDetector
Scans for Age secret keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.airtable_api_key.AirtableApiKeyDetector
Scans for Airtable API keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.algolia_api_key.AlgoliaApiKeyDetector
Scans for Algolia API keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.atlassian_api_token.AtlassianApiTokenDetector
Scans for Atlassian API tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.beamer_api_token.BeamerApiTokenDetector
Scans for Beamer API tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.clojars_api_token.ClojarsApiTokenDetector
Scans for Clojars API tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.codecov_access_token.CodecovAccessTokenDetector
Scans for Codecov Access Token.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.coinbase_access_token.CoinbaseAccessTokenDetector
Scans for Coinbase Access Token.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.databricks_api_token.DatabricksApiTokenDetector
Scans for Databricks API token.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.datadog_access_token.DatadogAccessTokenDetector
Scans for Datadog Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.digitalocean.DigitaloceanDetector
Scans for various DigitalOcean Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.discord.DiscordDetector
Scans for various Discord Client Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.doppler_api_token.DopplerApiTokenDetector
Scans for Doppler API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.droneci_access_token.DroneciAccessTokenDetector
Scans for Droneci Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.dropbox.DropboxDetector
Scans for various Dropbox Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.duffel_api_token.DuffelApiTokenDetector
Scans for Duffel API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.dynatrace_api_token.DynatraceApiTokenDetector
Scans for Dynatrace API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.easypost.EasyPostDetector
Scans for various EasyPost Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.etsy_access_token.EtsyAccessTokenDetector
Scans for Etsy Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.fastly_api_token.FastlyApiKeyDetector
Scans for Fastly API keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.finnhub_access_token.FinnhubAccessTokenDetector
Scans for Finnhub Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.flickr_access_token.FlickrAccessTokenDetector
Scans for Flickr Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.flutterwave.FlutterwaveDetector
Scans for Flutterwave API Keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.frameio_api_token.FrameIoApiTokenDetector
Scans for Frame.io API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.gcp_api_key.GCPApiKeyDetector
Scans for GCP API keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.github_token.GitHubTokenCustomDetector
Scans for GitHub tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.gitlab.GitLabDetector
Scans for GitLab Secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.gitter_access_token.GitterAccessTokenDetector
Scans for Gitter Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.gocardless_api_token.GoCardlessApiTokenDetector
Scans for GoCardless API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.grafana.GrafanaDetector
Scans for Grafana Secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.heroku_api_key.HerokuApiKeyDetector
Scans for Heroku API Keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.hubspot_api_key.HubSpotApiTokenDetector
Scans for HubSpot API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.huggingface.HuggingFaceDetector
Scans for Hugging Face Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.intercom_api_key.IntercomApiTokenDetector
Scans for Intercom API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.jfrog.JFrogDetector
Scans for JFrog-related secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.jwt.JWTBase64Detector
Scans for Base64-encoded JSON Web Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.kraken_access_token.KrakenAccessTokenDetector
Scans for Kraken Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.linear.LinearDetector
Scans for Linear secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.linkedin.LinkedInDetector
Scans for LinkedIn secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.lob.LobDetector
Scans for Lob secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.mailgun.MailgunDetector
Scans for Mailgun secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.mapbox_api_token.MapBoxApiTokenDetector
Scans for MapBox API tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.messagebird.MessageBirdDetector
Scans for MessageBird secrets.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.netlify_access_token.NetlifyAccessTokenDetector
Scans for Netlify Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.new_relic.NewRelicDetector
Scans for New Relic API tokens and keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.okta_access_token.OktaAccessTokenDetector
Scans for Okta Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.openai_api_key.OpenAIApiKeyDetector
Scans for OpenAI API Keys.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.planetscale.PlanetScaleDetector
Scans for PlanetScale API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.postman_api_token.PostmanApiTokenDetector
Scans for Postman API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.prefect_api_token.PrefectApiTokenDetector
Scans for Prefect API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.pulumi_api_token.PulumiApiTokenDetector
Scans for Pulumi API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.pypi_upload_token.PyPiUploadTokenDetector
Scans for PyPI Upload Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.readme_api_token.ReadmeApiTokenDetector
Scans for Readme API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.rubygems_api_token.RubygemsApiTokenDetector
Scans for Rubygem API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.scalingo_api_token.ScalingoApiTokenDetector
Scans for Scalingo API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.sendbird.SendbirdDetector
Scans for Sendbird Access IDs and Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.sendgrid_api_token.SendGridApiTokenDetector
Scans for SendGrid API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.sendinblue_api_token.SendinBlueApiTokenDetector
Scans for SendinBlue API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.sentry_access_token.SentryAccessTokenDetector
Scans for Sentry Access Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.shippo_api_token.ShippoApiTokenDetector
Scans for Shippo API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.slack.SlackDetector
Scans for Slack tokens and webhooks.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.snyk_api_token.SnykApiTokenDetector
Scans for Snyk API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.twitch_api_token.TwitchApiTokenDetector
Scans for Twitch API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.typeform_api_token.TypeformApiTokenDetector
Scans for Typeform API Tokens.
classenterprise.litellm_enterprise.enterprise_callbacks.secrets_plugins.zendesk_secret_key.ZendeskSecretKeyDetector
Scans for Zendesk Secret Keys.
classenterprise.litellm_enterprise.enterprise_callbacks.send_emails.resend_email.ResendEmailLogger
Send emails using Resend's API.
classenterprise.litellm_enterprise.types.enterprise_callbacks.send_emails.DefaultEmailSettings
Default settings for email events
classenterprise.litellm_enterprise.types.proxy.audit_logging_endpoints.AuditLogResponse
Response model for a single audit log entry
classenterprise.litellm_enterprise.types.proxy.audit_logging_endpoints.PaginatedAuditLogResponse
Response model for paginated audit logs
classlitellm-proxy-extras.litellm_proxy_extras.prisma_toolchain.ToolchainBootstrap
Outcome of preparing the Prisma toolchain.
funclitellm._lazy_imports.get_litellm_globals() -> dict
Get the globals dictionary of the litellm module.
classlitellm._logging.SecretRedactionFilter
Scrubs known secret/credential patterns from log records.
funclitellm._uuid.uuid4()
Return a UUID4 using the selected backend.
funclitellm.a2a_protocol.card_resolver.get_agent_card_url(agent_card:'AgentCard') -> str | None
Return the agent endpoint URL from the resolved SDK card.
funclitellm.a2a_protocol.card_resolver.is_localhost_or_internal_url(url:str | None) -> bool
Check if a URL is a localhost or internal URL.
funclitellm.a2a_protocol.card_resolver.set_agent_card_url(agent_card:'AgentCard', url:str) -> None
Set the agent endpoint URL on the resolved SDK card.
classlitellm.a2a_protocol.client.A2AClient
LiteLLM wrapper for A2A agent invocation.
methodlitellm.a2a_protocol.client.A2AClient.get_agent_card() -> 'AgentCard'
Fetch the agent card from the server.
methodlitellm.a2a_protocol.client.A2AClient.send_message(request:'SendMessageRequest') -> LiteLLMSendMessageResponse
Send a message to the A2A agent.
methodlitellm.a2a_protocol.client.A2AClient.send_message_streaming(request:'SendStreamingMessageRequest') -> AsyncIterator['SendStreamingMessageResponse']
Send a streaming message to the A2A agent.
classlitellm.a2a_protocol.exceptions.A2AAgentCardError
Raised when there's an issue with the agent card.
classlitellm.a2a_protocol.exceptions.A2AConnectionError
Raised when connection to an A2A agent fails.
classlitellm.a2a_protocol.exceptions.A2AError
Base exception for A2A protocol errors.
classlitellm.a2a_protocol.litellm_completion_bridge.transformation.A2AStreamingContext
Context holder for A2A streaming state.
funclitellm.a2a_protocol.main.aget_agent_card(base_url:str, timeout:float=DEFAULT_A2A_AGENT_TIMEOUT, extra_headers:dict[str, str] | None=None) -> 'AgentCard'
Fetch the agent card from an A2A agent.
classlitellm.a2a_protocol.providers.base.BaseA2AProviderConfig
Base configuration class for A2A protocol providers.
methodlitellm.a2a_protocol.providers.base.BaseA2AProviderConfig.handle_non_streaming(request_id:str, params:dict[str, Any], api_base:str | None=None, **kwargs) -> dict[str, Any]
Handle non-streaming A2A request.
methodlitellm.a2a_protocol.providers.base.BaseA2AProviderConfig.handle_streaming(request_id:str, params:dict[str, Any], api_base:str | None=None, **kwargs) -> AsyncIterator[dict[str, Any]]
Handle streaming A2A request.
classlitellm.a2a_protocol.providers.bedrock_agentcore.handler.BedrockAgentCoreA2AHandler
Handler for Bedrock AgentCore A2A requests.
classlitellm.a2a_protocol.providers.config_manager.A2AProviderConfigManager
Manager for A2A provider configurations.
classlitellm.a2a_protocol.providers.pydantic_ai_agents.config.PydanticAIProviderConfig
Provider configuration for Pydantic AI agents.
classlitellm.a2a_protocol.providers.pydantic_ai_agents.handler.PydanticAIHandler
Handler for Pydantic AI agent requests.
classlitellm.a2a_protocol.utils.A2ARequestUtils
Utility class for A2A request/response processing.
methodlitellm.a2a_protocol.utils.A2ARequestUtils.count_tokens(text:str) -> int
Count tokens in text using litellm.token_counter.
methodlitellm.a2a_protocol.utils.A2ARequestUtils.extract_text_from_message(message:Any) -> str
Extract text content from A2A message parts.
methodlitellm.a2a_protocol.utils.A2ARequestUtils.extract_text_from_response(response_dict:dict[str, Any]) -> str
Extract text content from A2A response result.
methodlitellm.a2a_protocol.utils.A2ARequestUtils.get_input_message_from_request(request:'SendMessageRequest | SendStreamingMessageRequest') -> Any
Extract the input message from an A2A request.
funclitellm.anthropic_beta_headers_manager.get_beta_headers_config(url:str) -> dict
Public entry point — returns the beta headers config dict.
funclitellm.anthropic_beta_headers_manager.get_provider_name(provider:str) -> str
Resolve provider aliases to canonical provider names.
classlitellm.anthropic_interface.exceptions.exceptions.AnthropicErrorDetail
Inner error detail in Anthropic format.
classlitellm.anthropic_interface.exceptions.exceptions.AnthropicErrorResponse
Anthropic-formatted error response.
funclitellm.assistants.main.get_thread(custom_llm_provider:Literal['openai', 'azure'], thread_id:str, client=None, **kwargs) -> Thread
Get the thread object, given a thread_id
methodlitellm.caching.caching.Cache.add_cache(result, **kwargs)
Adds a result to the cache.
methodlitellm.caching.caching.Cache.async_add_cache(result, dynamic_cache_object:BaseCache | None=None, **kwargs)
Async implementation of add_cache
methodlitellm.caching.caching.Cache.async_get_cache(dynamic_cache_object:BaseCache | None=None, **kwargs)
Async get cache implementation.
methodlitellm.caching.caching.Cache.get_cache_key(**kwargs) -> str
Get the cache key for the given arguments.
funclitellm.caching.caching.disable_cache()
Disable the cache used by LiteLLM.
classlitellm.caching.caching_handler.CachingHandlerResponse
This is the response object for the caching handler.
methodlitellm.caching.in_memory_cache.InMemoryCache.allow_ttl_override(key:str) -> bool
Check if ttl is set for a key
methodlitellm.caching.in_memory_cache.InMemoryCache.async_get_oldest_n_keys(n:int) -> list[str]
Get the oldest n keys in the cache
methodlitellm.caching.in_memory_cache.InMemoryCache.async_get_ttl(key:str) -> int | None
Get the remaining TTL of a key in in-memory cache
methodlitellm.caching.in_memory_cache.InMemoryCache.async_set_cache_sadd(key, value:list, ttl:float | None)
Add value to set
methodlitellm.caching.in_memory_cache.InMemoryCache.evict_cache()
Eviction policy: 1.
methodlitellm.caching.redis_cache.RedisCache.async_register_script(script:str) -> Callable[..., Awaitable[Any]]
Register a Lua script with Redis asynchronously.
methodlitellm.caching.redis_cache.RedisCache.check_and_fix_namespace(key:str) -> str
Make sure each key starts with the given namespace
methodlitellm.caching.redis_cache.RedisCache.sync_ping() -> bool
Tests if the sync redis client is correctly setup.
classlitellm.caching.redis_cache.RedisCircuitBreaker
Tracks Redis health for a RedisCache instance.
methodlitellm.caching.redis_cache.RedisCircuitBreaker.is_open() -> bool
Returns True if Redis calls should be skipped.
classlitellm.caching.redis_semantic_cache.RedisSemanticCache
Redis-backed semantic cache for LLM responses.
methodlitellm.caching.redis_semantic_cache.RedisSemanticCache.async_set_cache(key:str, value:object, **kwargs) -> None
Asynchronously store a value in the semantic cache.
methodlitellm.caching.redis_semantic_cache.RedisSemanticCache.get_cache(key:str, **kwargs) -> object
Retrieve a semantically similar cached response.
methodlitellm.caching.redis_semantic_cache.RedisSemanticCache.set_cache(key:str, value:object, **kwargs) -> None
Store a value in the semantic cache.
classlitellm.caching.valkey_semantic_cache.ValkeySemanticCache
Valkey-backed semantic cache for LLM responses.
funclitellm.compression.content_detection.detect_content_type(content:str) -> str
Detect whether content is code, JSON, or plain text.
funclitellm.compression.message_stubbing.extract_key(message:dict, fallback_index:int, used_keys:set[str]) -> str
Extract a human-readable key for the message.
funclitellm.compression.message_stubbing.stub_message(message:dict, key:str) -> dict
Replace message content with a compact stub.
funclitellm.containers.endpoint_factory.create_sync_endpoint_function(endpoint_config:dict) -> Callable
Create a sync SDK function from endpoint config.
funclitellm.cost_calculator.batch_cost_calculator(usage:Usage, model:str, custom_llm_provider:str | None=None, model_info:ModelInfo | None=None, data_residency:str | None=None) -> tuple[float, float]
Calculate the cost of a batch job.
classlitellm.exceptions.RateLimitError
Unified rate-limit error.
classlitellm.exceptions.RateLimitType
The dimension that was exceeded when a rate-limit error fired.
funclitellm.experimental_mcp_client.client.to_basic_auth(auth_value:str) -> str
Convert auth value to Basic Auth format.
funclitellm.experimental_mcp_client.tools.call_mcp_tool(session:ClientSession, call_tool_request_params:MCPCallToolRequestParams) -> MCPCallToolResult
Call an MCP tool.
funclitellm.experimental_mcp_client.tools.call_openai_tool(session:ClientSession, openai_tool:ChatCompletionMessageToolCall) -> MCPCallToolResult
Call an OpenAI tool using MCP client.
funclitellm.experimental_mcp_client.tools.transform_mcp_tool_to_openai_tool(mcp_tool:MCPTool) -> ChatCompletionToolParam
Convert an MCP tool to an OpenAI tool.
classlitellm.files.utils.FilesAPIUtils
Utils for files API interface on litellm
methodlitellm.files.utils.FilesAPIUtils.is_batch_jsonl_file(create_file_data:CreateFileRequest, extracted_file_data:ExtractedFileData) -> bool
Check if the file is a batch jsonl file
classlitellm.integrations.SlackAlerting.budget_alert_types.BaseBudgetAlertType
Base class for different budget alert types
methodlitellm.integrations.SlackAlerting.budget_alert_types.BaseBudgetAlertType.get_id(user_info:CallInfo) -> str
Return the ID to use for caching/tracking this alert
classlitellm.integrations.SlackAlerting.slack_alerting.SlackAlerting
Class for sending Slack Alerts
methodlitellm.integrations.SlackAlerting.slack_alerting.SlackAlerting.send_webhook_alert(webhook_event:WebhookEvent) -> bool
Sends structured alert to webhook, if set.
classlitellm.integrations._types.open_inference.AudioAttributes
Attributes for audio
classlitellm.integrations._types.open_inference.DocumentAttributes
Attributes for a document.
classlitellm.integrations._types.open_inference.EmbeddingAttributes
Attributes for an embedding
classlitellm.integrations._types.open_inference.ErrorAttributes
Attributes for error information in spans.
classlitellm.integrations._types.open_inference.ImageAttributes
Attributes for images
classlitellm.integrations._types.open_inference.MessageAttributes
Attributes for a message sent to or from an LLM
classlitellm.integrations._types.open_inference.RerankerAttributes
Attributes for a reranker
classlitellm.integrations._types.open_inference.ToolAttributes
Attributes for a tools
classlitellm.integrations._types.open_inference.ToolCallAttributes
Attributes for a tool call
classlitellm.integrations.arize.arize.ArizeLogger
Arize logger that sends traces to an Arize endpoint.
methodlitellm.integrations.arize.arize.ArizeLogger.get_arize_config() -> ArizeConfig
Helper function to get Arize configuration.
funclitellm.integrations.arize.prompt_initializer(litellm_params:'PromptLiteLLMParams', prompt_spec:'PromptSpec') -> 'CustomPromptManagement'
Initialize a prompt from Arize Phoenix.
funclitellm.integrations.bitbucket.set_global_bitbucket_config(config:dict) -> None
Set the global BitBucket configuration for prompt management.
classlitellm.integrations.custom_secret_manager.CustomSecretManager
Base class for implementing custom secret managers.
methodlitellm.integrations.custom_secret_manager.CustomSecretManager.async_health_check(timeout:float | httpx.Timeout | None=None) -> bool
Perform a health check on your secret manager.
classlitellm.integrations.deepeval.deepeval.DeepEvalLogger
Logs litellm traces to DeepEval's platform.
funclitellm.integrations.dotprompt.prompt_initializer(litellm_params:'PromptLiteLLMParams', prompt_spec:'PromptSpec') -> 'CustomPromptManagement'
Initialize a prompt from a .prompt file.
methodlitellm.integrations.dotprompt.prompt_manager.PromptManager.add_prompt(prompt_id:str, content:str, metadata:dict[str, Any] | None=None) -> None
Add a prompt template programmatically.
methodlitellm.integrations.dotprompt.prompt_manager.PromptManager.get_prompt_metadata(prompt_id:str) -> dict[str, Any] | None
Get metadata for a specific prompt.
methodlitellm.integrations.dotprompt.prompt_manager.PromptManager.json_to_prompt_file(prompt_data:dict[str, Any]) -> str
Convert JSON prompt data to .prompt file format.
methodlitellm.integrations.dotprompt.prompt_manager.PromptManager.list_prompts() -> list[str]
Get a list of all available prompt IDs.
methodlitellm.integrations.dotprompt.prompt_manager.PromptManager.prompt_file_to_json(file_path:str | Path) -> dict[str, Any]
Convert a .prompt file to JSON format.
funclitellm.integrations.dotprompt.set_global_prompt_directory(directory:str) -> None
Set the global prompt directory for dotprompt files.
classlitellm.integrations.focus.serializers.base.FocusSerializer
Base serializer turning Focus frames into bytes.
classlitellm.integrations.focus.serializers.csv.FocusCsvSerializer
Serialize normalized Focus frames to CSV bytes.
methodlitellm.integrations.focus.serializers.csv.FocusCsvSerializer.serialize(frame:pl.DataFrame) -> bytes
Encode the provided frame as a CSV payload.
methodlitellm.integrations.focus.serializers.parquet.FocusParquetSerializer.serialize(frame:pl.DataFrame) -> bytes
Encode the provided frame as a parquet payload.
funclitellm.integrations.generic_prompt_management.set_global_generic_prompt_config(config:dict) -> None
Set the global generic prompt configuration.
classlitellm.integrations.gitlab.gitlab_prompt_manager.GitLabPromptManager
GitLab prompt manager with folder support.
methodlitellm.integrations.gitlab.gitlab_prompt_manager.GitLabPromptManager.get_available_prompts() -> list[str]
Return prompt IDs.
funclitellm.integrations.gitlab.gitlab_prompt_manager.decode_prompt_id(encoded_id:str) -> str
Convert 'gitlab::invoice::extract' → 'invoice/extract'
funclitellm.integrations.gitlab.prompt_initializer(litellm_params:'PromptLiteLLMParams', prompt_spec:'PromptSpec') -> 'CustomPromptManagement'
Initialize a prompt from a Gitlab repository.
funclitellm.integrations.gitlab.set_global_gitlab_config(config:dict) -> None
Set the global gitlab configuration for prompt management.
classlitellm.integrations.levo.levo.LevoConfig
Configuration for Levo OTLP integration.
classlitellm.integrations.mock_client_factory.MockClientConfig
Configuration for creating a mock client.
methodlitellm.integrations.mock_client_factory.MockResponse.content() -> bytes
Return response content.
methodlitellm.integrations.mock_client_factory.MockResponse.json() -> dict
Return JSON response data.
methodlitellm.integrations.mock_client_factory.MockResponse.raise_for_status()
Raise exception for error status codes.
methodlitellm.integrations.mock_client_factory.MockResponse.read() -> bytes
Read response content.
methodlitellm.integrations.mock_client_factory.MockResponse.text() -> str
Return response text.
funclitellm.integrations.mock_client_factory.should_use_mock() -> bool
Determine if mock mode should be enabled.
classlitellm.integrations.opik.opik.OpikLogger
Opik Logger for logging events to an Opik Server
funclitellm.integrations.opik.opik_payload_builder.extractors.extract_tags(opik_metadata:dict[str, Any], custom_llm_provider:str | None) -> list[str]
Extract and build list of tags.
classlitellm.integrations.opik.opik_payload_builder.types.SpanPayload
Opik span payload structure
classlitellm.integrations.opik.opik_payload_builder.types.TracePayload
Opik trace payload structure
funclitellm.integrations.opik.utils.create_uuid7() -> str
Generate an RFC 9562 conformant UUIDv7 string.
funclitellm.integrations.opik.utils.get_traces_and_spans_from_payload(payload:list[dict[str, Any]]) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]
Separate traces and spans from payload.
classlitellm.integrations.otel.logger.OpenTelemetryV2
The ``CustomLogger`` for OpenTelemetry.
funclitellm.integrations.otel.logger.emit_guardrail_span(entry:'StandardLoggingGuardrailInformation') -> None
Emit a guardrail span on the registered v2 OTel logger.
funclitellm.integrations.otel.mappers.resolve_mappers(names:Iterable[str]) -> list[AttributeMapper]
Resolve mapper names to instances.
funclitellm.integrations.otel.mappers.utils.drop_none(values:Mapping[str, AttrValue | None]) -> AttributeMap
Return ``values`` with ``None``-valued entries removed.
funclitellm.integrations.otel.mappers.utils.message_content(message:object) -> str | None
Extract the textual ``content`` from a chat message dict.
funclitellm.integrations.otel.mappers.utils.output_messages(data:LLMCallSpanData) -> list
The ``message`` payload of each response choice.
classlitellm.integrations.otel.mappers.weave.WeaveMapper
Maps ``LLMCallSpanData`` to Weave's vendor attributes.
classlitellm.integrations.otel.model.config.ExporterOwner
The preset that contributed an exporter.
classlitellm.integrations.otel.model.config.ExporterSpec
One span-export destination.
classlitellm.integrations.otel.model.semconv.DB
Database / cache client-span keys (OTel ``db.*`` semconv).
classlitellm.integrations.otel.model.semconv.GenAI
Canonical OTel GenAI attribute keys.
classlitellm.integrations.otel.model.semconv.GenAIOperation
Values for ``gen_ai.operation.name``.
classlitellm.integrations.otel.model.semconv.HTTP
HTTP server-span keys.
classlitellm.integrations.otel.model.semconv.JsonRpc
JSON-RPC keys carried on MCP spans.
classlitellm.integrations.otel.model.semconv.LiteLLM
Vendor-extension keys (no semconv equivalent).
classlitellm.integrations.otel.model.semconv.Metric
GenAI metric instrument names.
classlitellm.integrations.otel.model.semconv.NetworkTransport
Well-known values for ``network.transport``.
funclitellm.integrations.otel.model.spans.db_system(service_name:str) -> str | None
The ``db.system.name`` for a datastore service, else ``None``.
funclitellm.integrations.otel.model.spans.llm_call_span_name(data:'LLMCallSpanData') -> str
``"{operation} {model}"`` e.g.
funclitellm.integrations.otel.model.spans.mcp_list_tools_span_name(data:'MCPListToolsSpanData') -> str
``"{mcp.method.name}"`` i.e.
funclitellm.integrations.otel.model.spans.mcp_tool_call_span_name(data:'MCPToolCallSpanData') -> str
``"{mcp.method.name} {tool}"`` e.g.
funclitellm.integrations.otel.model.spans.proxy_request_span_name(data:'ProxyRequestSpanData') -> str
``"{method} {route}"`` (HTTP semconv).
funclitellm.integrations.otel.model.spans.root_roles() -> list[SpanRole]
Roles with no in-process parent.
funclitellm.integrations.otel.model.spans.service_span_name(data:'ServiceSpanData') -> str
``"{service} {call_type}"`` e.g.
funclitellm.integrations.otel.model.utils.to_ns(value:datetime | float | None) -> int | None
Coerce a datetime / epoch value to integer nanoseconds.
funclitellm.integrations.otel.mount.instrument_fastapi_app(app:Any) -> None
Attach OTel server-span instrumentation to the proxy FastAPI app.
funclitellm.integrations.otel.plumbing.context.get_baggage_attributes(context:Context | None=None) -> dict[str, str]
All Baggage entries on ``context`` as strings.
funclitellm.integrations.otel.plumbing.context.resolve_parent_context(threaded:Span | None=None) -> Context
The context a child span should parent under.
funclitellm.integrations.otel.plumbing.metrics.resolve_error_type(kwargs:Mapping[str, Any]) -> str
The ``error.type`` value for a failed request.
funclitellm.integrations.otel.plumbing.providers.parse_headers(raw:str | None) -> dict[str, str]
Parse an OTLP ``"k=v,k=v"`` header string into a dict.
funclitellm.integrations.prometheus.get_custom_labels_from_metadata(metadata:dict) -> dict[str, str]
Get custom labels from metadata
funclitellm.integrations.prometheus.get_custom_labels_from_tags(tags:Sequence[str]) -> dict[str, str]
Get custom labels from tags based on admin configuration.
classlitellm.integrations.weave.weave_otel.WeaveLLMObsOTELAttributes
Weave-specific LLM observability OTEL attributes.
classlitellm.integrations.weave.weave_otel.WeaveOtelLogger
Weave (W&B) OpenTelemetry Logger for LiteLLM.
classlitellm.interactions.agents.http_handler.AgentsHTTPHandler
HTTP handler for Agents API CRUD requests.
funclitellm.interactions.agents.main.get(name:str, custom_llm_provider:str | None=None, extra_headers:dict[str, Any] | None=None, timeout:float | httpx.Timeout | None=None, **kwargs) -> AgentCreateResponse | Coroutine[Any, Any, AgentCreateResponse]
Sync: Get a specific agent by name.
funclitellm.interactions.agents.main.list(custom_llm_provider:str | None=None, extra_headers:dict[str, Any] | None=None, timeout:float | httpx.Timeout | None=None, **kwargs) -> AgentListResponse | Coroutine[Any, Any, AgentListResponse]
Sync: List all agents on the provider side.
classlitellm.interactions.http_handler.InteractionsHTTPHandler
HTTP handler for Interactions API requests.
funclitellm.is_bedrock_pricing_only_model(key:str) -> bool
Excludes keys with the pattern 'bedrock/<region>/<model>'.
funclitellm.is_openai_finetune_model(key:str) -> bool
Excludes model cost keys with the pattern 'ft:<model>'.
funclitellm.litellm_core_utils.api_route_to_call_types.get_call_types_for_route(route:str) -> Sequence[CallTypes] | None
Get the CallTypes for a given API route.
funclitellm.litellm_core_utils.api_route_to_call_types.get_routes_for_call_type(call_type:CallTypes) -> list
Get all routes that use a specific CallType.
classlitellm.litellm_core_utils.audio_utils.utils.ProcessedAudioFile
Processed audio file data.
funclitellm.litellm_core_utils.audio_utils.utils.calculate_request_duration(file:FileTypes) -> float | None
Calculate audio duration from file content.
funclitellm.litellm_core_utils.cached_imports.clear_cached_imports() -> None
Clear all cached imports.
funclitellm.litellm_core_utils.cli_token_utils.get_cli_token_file_path() -> str
Get the path to the CLI token file
funclitellm.litellm_core_utils.cli_token_utils.get_litellm_gateway_api_key(expected_base_url:str | None=None) -> str | None
Get the stored CLI API key for use with LiteLLM SDK.
funclitellm.litellm_core_utils.cli_token_utils.load_cli_token() -> dict | None
Load CLI token data from file
funclitellm.litellm_core_utils.cloud_storage_security.is_managed_cloud_storage_uri(file_id:str) -> bool
True if file_id is a raw cloud-storage object URI (e.g.
funclitellm.litellm_core_utils.core_helpers.remove_items_at_indices(items:list[Any] | None, indices:Iterable[int]) -> None
Remove items from a list in-place by index
classlitellm.litellm_core_utils.dd_tracing.NullSpan
A no-op span implementation.
classlitellm.litellm_core_utils.dd_tracing.NullTracer
A no-op tracer implementation.
funclitellm.litellm_core_utils.dd_tracing.set_active_span_tag(tag_key:str, tag_value:str) -> bool
Best-effort helper to set a tag on the active Datadog span.
funclitellm.litellm_core_utils.dot_notation_indexing.is_nested_path(path:str) -> bool
Check if path requires nested handling.
classlitellm.litellm_core_utils.get_blog_posts.GetBlogPosts
Fetches, validates, and caches LiteLLM blog posts.
methodlitellm.litellm_core_utils.get_blog_posts.GetBlogPosts.fetch_rss_feed(url:str, timeout:int=5) -> str
Fetch RSS XML from a remote URL.
methodlitellm.litellm_core_utils.get_blog_posts.GetBlogPosts.get_blog_posts(url:str) -> list[dict[str, str]]
Return the blog posts list.
methodlitellm.litellm_core_utils.get_blog_posts.GetBlogPosts.load_local_blog_posts() -> list[dict[str, str]]
Load the bundled local backup blog posts.
methodlitellm.litellm_core_utils.get_blog_posts.GetBlogPosts.validate_blog_posts(posts:list[dict[str, str]]) -> bool
Return True if posts is a non-empty list.
funclitellm.litellm_core_utils.get_blog_posts.get_blog_posts(url:str) -> list[dict[str, str]]
Public entry point — returns the blog posts list.
funclitellm.litellm_core_utils.get_model_cost_map.get_model_cost_map(url:str) -> dict
Public entry point — returns the model cost map dict.
funclitellm.litellm_core_utils.llm_cost_calc.utils.get_billable_input_tokens(usage:Usage) -> int
Returns the number of billable input tokens.
funclitellm.litellm_core_utils.llm_response_utils.get_api_base.get_api_base(model:str, optional_params:dict | LiteLLM_Params) -> str | None
Returns the api base used for calling the model.
funclitellm.litellm_core_utils.prompt_templates.common_utils.extract_images_from_message(message:AllMessageValues) -> list[str]
Extract images from a message.
funclitellm.litellm_core_utils.prompt_templates.common_utils.get_content_from_model_response(response:ModelResponse | dict) -> str
Gets content from model response
funclitellm.litellm_core_utils.prompt_templates.common_utils.get_file_ids_from_messages(messages:list[AllMessageValues]) -> list[str]
Gets file ids from messages
funclitellm.litellm_core_utils.prompt_templates.common_utils.get_str_from_messages(messages:list[AllMessageValues]) -> str
Converts a list of messages to a string
funclitellm.litellm_core_utils.prompt_templates.common_utils.get_tool_call_names(tools:list[ChatCompletionToolParam]) -> list[str]
Get tool call names from tools
funclitellm.litellm_core_utils.prompt_templates.common_utils.is_function_call(optional_params:dict) -> bool
Checks if the optional params contain the function call
funclitellm.litellm_core_utils.prompt_templates.common_utils.migrate_file_to_image_url(message:'ChatCompletionFileObject') -> 'ChatCompletionImageObject'
Migrate file to image_url
funclitellm.litellm_core_utils.prompt_templates.common_utils.set_last_user_message(messages:list[AllMessageValues], content:str) -> list[AllMessageValues]
Set the last user message 1.
funclitellm.litellm_core_utils.prompt_templates.common_utils.strip_name_from_message(message:AllMessageValues, allowed_name_roles:list[str]=['user']) -> AllMessageValues
Removes 'name' from message
funclitellm.litellm_core_utils.prompt_templates.common_utils.strip_name_from_messages(messages:list[AllMessageValues], allowed_name_roles:list[str]=['user']) -> list[AllMessageValues]
Removes 'name' from messages
funclitellm.litellm_core_utils.prompt_templates.common_utils.strip_none_values_from_message(message:AllMessageValues) -> AllMessageValues
Strips None values from message
funclitellm.litellm_core_utils.prompt_templates.factory.anthropic_infer_file_id_content_type(file_id:str) -> Literal['document_url', 'container_upload']
Use when 'format' not provided.
funclitellm.litellm_core_utils.prompt_templates.factory.anthropic_messages_pt_xml(messages:list)
format messages for anthropic 1.
funclitellm.litellm_core_utils.prompt_templates.factory.get_all_tool_calls(messages:list) -> list
Returns extracted list of `tool_calls`.
funclitellm.litellm_core_utils.redact_messages.should_redact_message_logging(model_call_details:dict) -> bool
Determine if message logging should be redacted.
funclitellm.litellm_core_utils.safe_json_loads.safe_json_loads(data:str, default:Any=None) -> Any
Safely parse a JSON string.
funclitellm.litellm_core_utils.streaming_chunk_builder_utils.concatenate_base64_list(base64_strings:list[str]) -> str
Concatenates a list of base64-encoded strings.
classlitellm.litellm_core_utils.url_utils.SSRFError
Raised when a URL targets a blocked network.
funclitellm.litellm_core_utils.url_utils.async_safe_get(client:Any, url:str, **kwargs:Any) -> Any
Async version of safe_get.
funclitellm.litellm_core_utils.url_utils.encode_url_path_segment(value:Any, *field_name:str='path parameter') -> str
Percent-encode one user-controlled URL path segment.
classlitellm.llms.a2a.chat.streaming_iterator.A2AModelResponseIterator
Iterator for parsing A2A streaming responses.
methodlitellm.llms.a2a.chat.streaming_iterator.A2AModelResponseIterator.chunk_parser(chunk:dict) -> GenericStreamingChunk | ModelResponseStream
Parse A2A streaming chunk to OpenAI format.
classlitellm.llms.a2a.chat.transformation.A2AConfig
Configuration for A2A (Agent-to-Agent) Protocol.
methodlitellm.llms.a2a.chat.transformation.A2AConfig.get_error_class(error_message:str, status_code:int, headers:dict | httpx.Headers) -> BaseLLMException
Return appropriate error class for A2A errors
methodlitellm.llms.a2a.chat.transformation.A2AConfig.get_supported_openai_params(model:str) -> list[str]
Return list of supported OpenAI parameters
methodlitellm.llms.a2a.chat.transformation.A2AConfig.map_openai_params(non_default_params:dict, optional_params:dict, model:str, drop_params:bool) -> dict
Map OpenAI parameters to A2A parameters.
classlitellm.llms.a2a.common_utils.A2AError
Base exception for A2A protocol errors
funclitellm.llms.a2a.common_utils.extract_text_from_a2a_message(message:dict[str, Any], depth:int=0, max_depth:int=10) -> str
Extract text content from A2A message parts.
funclitellm.llms.a2a.common_utils.extract_text_from_a2a_response(response_dict:dict[str, Any], max_depth:int=10) -> str
Extract text content from A2A response result.
funclitellm.llms.aiml.image_generation.cost_calculator.cost_calculator(model:str, image_response:Any) -> float
AI/ML flux image generation cost calculator
classlitellm.llms.anthropic.batches.handler.AnthropicBatchesHandler
Handler for Anthropic Message Batches API.
methodlitellm.llms.anthropic.chat.transformation.AnthropicConfig.get_max_tokens_for_model(model:str | None=None) -> int
Get the max output tokens for a given model.
methodlitellm.llms.anthropic.chat.transformation.AnthropicConfig.get_prefix_prompt(messages:list[AllMessageValues]) -> str | None
Get the prefix prompt from the messages.
methodlitellm.llms.anthropic.chat.transformation.AnthropicConfig.update_headers_with_optional_anthropic_beta(headers:dict, optional_params:dict) -> dict
Update headers with optional anthropic beta.
classlitellm.llms.anthropic.count_tokens.handler.AnthropicCountTokensHandler
Handler for Anthropic CountTokens API requests.
classlitellm.llms.anthropic.files.handler.AnthropicFilesHandler
Handles Anthropic Files API operations.
classlitellm.llms.anthropic.files.transformation.AnthropicFilesConfig
Transformation config for Anthropic Files API.
classlitellm.llms.anthropic.skills.transformation.AnthropicSkillsConfig
Anthropic-specific Skills API configuration
methodlitellm.llms.anthropic.skills.transformation.AnthropicSkillsConfig.get_complete_url(api_base:str | None, endpoint:str, skill_id:str | None=None) -> str
Get complete URL for Anthropic Skills API
methodlitellm.llms.anthropic.skills.transformation.AnthropicSkillsConfig.validate_environment(headers:dict, litellm_params:GenericLiteLLMParams | None) -> dict
Add Anthropic-specific headers
classlitellm.llms.azure.chat.gpt_5_transformation.AzureOpenAIGPT5Config
Azure specific handling for gpt-5 models.
funclitellm.llms.azure.common_utils.get_azure_ad_token(litellm_params:GenericLiteLLMParams) -> str | None
Get Azure AD token from various authentication methods.
methodlitellm.llms.azure.containers.transformation.AzureContainerConfig.get_complete_url(api_base:str | None, litellm_params:dict) -> str
Build the Azure container endpoint URL.
classlitellm.llms.azure.image_generation.dall_e_2_transformation.AzureDallE2ImageGenerationConfig
Azure dall-e-2 image generation config
classlitellm.llms.azure.image_generation.dall_e_3_transformation.AzureDallE3ImageGenerationConfig
Azure dall-e-3 image generation config
classlitellm.llms.azure.image_generation.gpt_transformation.AzureGPTImageGenerationConfig
Azure gpt-image image generation config
classlitellm.llms.azure.videos.transformation.AzureVideoConfig
Configuration class for OpenAI video generation.
methodlitellm.llms.azure.videos.transformation.AzureVideoConfig.get_complete_url(model:str, api_base:str | None, litellm_params:dict) -> str
Constructs a complete URL for the API request.
classlitellm.llms.azure_ai.agents.handler.AzureAIAgentsHandler
Handler for Azure AI Agent Service.
classlitellm.llms.azure_ai.agents.transformation.AzureAIAgentsConfig
Configuration for Azure AI Agent Service API.
methodlitellm.llms.azure_ai.agents.transformation.AzureAIAgentsConfig.get_agent_id_from_model(model:str) -> str
Extract agent ID from the model string.
methodlitellm.llms.azure_ai.agents.transformation.AzureAIAgentsConfig.is_azure_ai_agents_route(model:str) -> bool
Check if the model is an Azure AI Agents route.
classlitellm.llms.azure_ai.anthropic.handler.AzureAnthropicChatCompletion
Azure Anthropic chat completion handler.
classlitellm.llms.azure_ai.common_utils.AzureFoundryModelInfo
Model info for Azure AI / Azure Foundry models.
methodlitellm.llms.azure_ai.common_utils.AzureFoundryModelInfo.get_azure_ai_route(model:str) -> Literal['agents', 'model_router', 'default']
Get the Azure AI route for the given model.
methodlitellm.llms.azure_ai.common_utils.AzureFoundryModelInfo.get_models(api_key:str | None=None, api_base:str | None=None) -> list[str]
Returns a list of models supported by Azure AI.
methodlitellm.llms.azure_ai.common_utils.AzureFoundryModelInfo.strip_model_router_prefix(model:str) -> str
Strip the model_router prefix from model name.
classlitellm.llms.azure_ai.image_edit.mai_transformation.AzureFoundryMAIImageEditConfig
Azure AI Foundry MAI image editing (e.g.
funclitellm.llms.azure_ai.image_generation.cost_calculator.cost_calculator(model:str, image_response:Any) -> float
Azure AI image generation cost calculator
classlitellm.llms.azure_ai.ocr.transformation.AzureAIOCRConfig
Azure AI OCR transformation configuration.
funclitellm.llms.base_llm.base_model_iterator.convert_model_response_to_streaming(model_response:ModelResponse) -> ModelResponseStream
Convert a ModelResponse to ModelResponseStream.
methodlitellm.llms.base_llm.chat.transformation.BaseConfig.post_stream_processing(stream:Any) -> Any
Hook for providers to post-process streaming responses.
classlitellm.llms.base_llm.evals.transformation.BaseEvalsAPIConfig
Base configuration for Evals API providers
methodlitellm.llms.base_llm.evals.transformation.BaseEvalsAPIConfig.get_error_class(error_message:str, status_code:int, headers:dict) -> Exception
Get appropriate error class for the provider.
classlitellm.llms.base_llm.files.azure_blob_storage_backend.AzureBlobStorageBackend
Azure Blob Storage backend implementation.
methodlitellm.llms.base_llm.files.azure_blob_storage_backend.AzureBlobStorageBackend.download_file(storage_url:str) -> bytes
Download a file from Azure Blob Storage.
classlitellm.llms.base_llm.files.storage_backend.BaseFileStorageBackend
Abstract base class for file storage backends.
methodlitellm.llms.base_llm.files.storage_backend.BaseFileStorageBackend.delete_file(storage_url:str) -> None
Delete a file from the storage backend.
methodlitellm.llms.base_llm.files.storage_backend.BaseFileStorageBackend.download_file(storage_url:str) -> bytes
Download a file from the storage backend.
funclitellm.llms.base_llm.managed_resources.utils.decode_unified_id(encoded_unified_id:str) -> str | None
Decode a base64 encoded unified ID.
funclitellm.llms.base_llm.managed_resources.utils.encode_unified_id(unified_id_string:str) -> str
Encode a unified ID string to base64.
funclitellm.llms.base_llm.managed_resources.utils.extract_model_id_from_unified_id(unified_id:str) -> str | None
Extract model ID from a unified resource ID.
funclitellm.llms.base_llm.managed_resources.utils.extract_resource_type_from_unified_id(unified_id:str) -> str | None
Extract resource type from a unified resource ID.
funclitellm.llms.base_llm.managed_resources.utils.extract_unified_uuid_from_unified_id(unified_id:str) -> str | None
Extract the UUID from a unified resource ID.
funclitellm.llms.base_llm.managed_resources.utils.parse_unified_id(unified_id:str) -> dict | None
Parse a unified ID into its components.
classlitellm.llms.base_llm.ocr.transformation.BaseOCRConfig
Base configuration for OCR transformations.
methodlitellm.llms.base_llm.ocr.transformation.BaseOCRConfig.get_complete_url(api_base:str | None, model:str, optional_params:dict, litellm_params:dict | None=None, **kwargs) -> str
Get complete URL for OCR endpoint.
methodlitellm.llms.base_llm.ocr.transformation.BaseOCRConfig.get_error_class(error_message:str, status_code:int, headers:dict) -> Exception
Get appropriate error class for the provider.
methodlitellm.llms.base_llm.ocr.transformation.BaseOCRConfig.get_supported_ocr_params(model:str) -> list
Get supported OCR parameters for this provider.
classlitellm.llms.base_llm.ocr.transformation.OCRPage
Single page from OCR response.
classlitellm.llms.base_llm.ocr.transformation.OCRPageDimensions
Page dimensions from OCR response.
classlitellm.llms.base_llm.ocr.transformation.OCRPageImage
Image extracted from OCR page.
classlitellm.llms.base_llm.ocr.transformation.OCRRequestData
OCR request data structure.
classlitellm.llms.base_llm.ocr.transformation.OCRResponse
Standard OCR response format.
classlitellm.llms.base_llm.ocr.transformation.OCRUsageInfo
Usage information from OCR response.
classlitellm.llms.base_llm.sandbox.transformation.BaseSandboxConfig
Provider-agnostic sandbox operations.
classlitellm.llms.base_llm.sandbox.transformation.CodeExecutionResult
Passthrough of the sandbox's own execution output.
classlitellm.llms.base_llm.sandbox.transformation.ContainerHandle
A live sandbox container.
classlitellm.llms.base_llm.search.transformation.BaseSearchConfig
Base configuration for Search transformations.
methodlitellm.llms.base_llm.search.transformation.BaseSearchConfig.get_complete_url(api_base:str | None, optional_params:dict, data:dict | list[dict] | None=None, **kwargs) -> str
Get complete URL for Search endpoint.
methodlitellm.llms.base_llm.search.transformation.BaseSearchConfig.get_error_class(error_message:str, status_code:int, headers:dict) -> Exception
Get appropriate error class for the provider.
methodlitellm.llms.base_llm.search.transformation.BaseSearchConfig.get_http_method() -> Literal['GET', 'POST']
Get HTTP method for search requests.
methodlitellm.llms.base_llm.search.transformation.BaseSearchConfig.ui_friendly_name() -> str
UI-friendly name for the search provider.
methodlitellm.llms.base_llm.search.transformation.BaseSearchConfig.validate_environment(headers:dict, api_key:str | None=None, api_base:str | None=None, **kwargs) -> dict
Validate environment and return headers.
classlitellm.llms.base_llm.search.transformation.SearchResponse
Standard Search response format.
classlitellm.llms.base_llm.search.transformation.SearchResult
Single search result.
classlitellm.llms.base_llm.skills.transformation.BaseSkillsAPIConfig
Base configuration for Skills API providers
methodlitellm.llms.base_llm.skills.transformation.BaseSkillsAPIConfig.get_error_class(error_message:str, status_code:int, headers:dict) -> Exception
Get appropriate error class for the provider.
classlitellm.llms.bedrock.batches.handler.BedrockBatchesHandler
Handler for Bedrock Batches.
classlitellm.llms.bedrock.common_utils.BedrockEventStreamDecoderBase
Base class for event stream decoding for Bedrock
methodlitellm.llms.bedrock.common_utils.CommonBatchFilesUtils.extract_model_from_s3_file_path(s3_uri:str, optional_params:dict) -> str
Extract model ID from S3 file path.
methodlitellm.llms.bedrock.common_utils.CommonBatchFilesUtils.generate_unique_job_name(model:str, prefix:str='litellm') -> str
Generate a unique job name for AWS services.
methodlitellm.llms.bedrock.common_utils.CommonBatchFilesUtils.get_error_class(error_message:str, status_code:int, headers:dict | httpx.Headers) -> BaseLLMException
Get Bedrock-specific error class.
methodlitellm.llms.bedrock.common_utils.CommonBatchFilesUtils.parse_s3_uri(s3_uri:str) -> tuple
Parse S3 URI into bucket and key components.
funclitellm.llms.bedrock.common_utils.extract_model_name_from_bedrock_arn(model:str) -> str
Extract the model name from an AWS Bedrock ARN.
funclitellm.llms.bedrock.common_utils.get_bedrock_base_model(model:str) -> str
Get the base model from the given model name.
funclitellm.llms.bedrock.common_utils.remove_custom_field_from_tools(request_body:dict) -> None
Remove ``custom`` field from each tool in the request body.
funclitellm.llms.bedrock.common_utils.strip_bedrock_routing_prefix(model:str) -> str
Strip LiteLLM routing prefixes from model name.
funclitellm.llms.bedrock.files.transformation.extract_s3_uri_from_file_id(file_id:str) -> str
Resolve a Bedrock file id to its S3 URI.
classlitellm.llms.bedrock.image_edit.handler.BedrockImageEdit
Bedrock Image Edit handler
classlitellm.llms.bedrock.image_generation.image_handler.BedrockImageGeneration
Bedrock Image Generation handler

この情報について

掲載しているシグネチャは BerriAI/litellm の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る