MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions68,180 in github.com/BerriAI/litellm

↓ 22 callersMethod_update_kwargs_before_fallbacks
Adds/updates to kwargs: - num_retries - litellm_trace_id - metadata
litellm/router.py:2762
↓ 22 callersFunctionadapt_messages_to_generic_oci_standard
Convert an OpenAI-format message array to OCI GENERIC format.
litellm/llms/oci/chat/generic.py:168
↓ 22 callersMethodaddObserver
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:143
↓ 22 callersMethodaread
(self)
tests/test_litellm/a2a_protocol/providers/watsonx_orchestrate/test_watsonx_orchestrate_transformation.py:86
↓ 22 callersMethodasync_success_handler
Implementing async callbacks, to handle asyncio event loop issues when custom integrations need to use async functions.
litellm/litellm_core_utils/litellm_logging.py:2324
↓ 22 callersMethodcalculate_usage
( self, usage_object: dict, reasoning_content: Optional[str], completion_respo
litellm/llms/anthropic/chat/transformation.py:2059
↓ 22 callersFunctioncheck_feature_access_for_user
Raise HTTP 403 if the user's role is blocked from accessing the given feature by the UI settings stored in general_settings. Args:
litellm/proxy/common_utils/rbac_utils.py:17
↓ 22 callersMethodcommon_processing_pre_call_logic
( self, request: Request, general_settings: dict, user_api_key_dict: UserAPIKe
litellm/proxy/common_request_processing.py:940
↓ 22 callersMethodcreate
(self, messages, model=None, **kwargs)
litellm/main.py:372
↓ 22 callersFunctioncreate_audit_log_for_update
Create an audit log for an object.
litellm/proxy/management_helpers/audit_logs.py:196
↓ 22 callersMethodcreate_rate_limit_keys
Create the rate limit keys for the given key and value.
litellm/proxy/hooks/parallel_request_limiter_v3.py:521
↓ 22 callersFunctionderiveErrorMessage
(errorData: any)
ui/litellm-dashboard/src/app/(dashboard)/hooks/router/useRouterFields.ts:23
↓ 22 callersMethodgetMutationCache
()
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 22 callersMethodgetValue
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 22 callersMethodget_bedrock_route
Get the bedrock route for the given model.
litellm/llms/bedrock/common_utils.py:892
↓ 22 callersFunctionget_current_spend
Read current spend from the cross-pod spend counter. Reads Redis FIRST (authoritative cross-pod value), not DualCache's async_get_cache
litellm/proxy/proxy_server.py:2002
↓ 22 callersMethodget_data
Check if key valid
litellm/proxy/db/base_client.py:12
↓ 22 callersFunctionget_optional_params_embeddings
( # 2 optional params model: str, user: Optional[str] = None, encoding_format: Optional[str] =
litellm/utils.py:3041
↓ 22 callersFunctionget_request_route
Resolve the request route from the ASGI scope, with ``root_path`` stripped. Prefer this over ``request.url.path`` for any auth, ACL, routing
litellm/proxy/auth/auth_utils.py:500
↓ 22 callersMethodinfo
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 22 callersMethodmap_openai_params
( self, non_default_params: Dict, optional_params: Dict, model: str, d
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:1085
↓ 22 callersMethodmatches
(self, path: str)
litellm/proxy/_lazy_features.py:50
↓ 22 callersFunctionnew_user
Use this to create a new INTERNAL user with a budget. Internal Users can access LiteLLM Admin UI to make keys, request access to models.
litellm/proxy/management_endpoints/internal_user_endpoints.py:341
↓ 22 callersMethodok
(self)
tests/e2e/e2e_http.py:112
↓ 22 callersFunctions
()
litellm/proxy/_experimental/out/_next/static/chunks/05btv.l5gro_..js:10
↓ 22 callersMethodsend_alert
Alerting based on thresholds: - https://github.com/BerriAI/litellm/issues/1298 - Responses taking too long - Requests are ha
litellm/integrations/SlackAlerting/slack_alerting.py:1271
↓ 22 callersMethodsubscribe
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:143
↓ 22 callersFunctionsupports_httpx_timeout
Helper function to know if a provider implementation supports httpx timeout
litellm/utils.py:2129
↓ 22 callersFunctiontest
()
tests/proxy_unit_tests/test_key_generate_prisma.py:250
↓ 22 callersMethodtranslate_anthropic_messages_to_openai
( self, messages: List[ Union[ AnthropicMessagesUserMessageParam,
litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py:353
↓ 22 callersMethodupdate_environment_variables
( self, litellm_params: Dict, optional_params: Dict, model: Optional[str] = No
litellm/litellm_core_utils/litellm_logging.py:530
↓ 22 callersMethoduse
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callersMethod_build_claims
Build JWT claims for the outbound MCP access token. Args: user_api_key_dict: LiteLLM auth context for the current reques
litellm/proxy/guardrails/guardrail_hooks/mcp_jwt_signer/mcp_jwt_signer.py:653
↓ 21 callersFunction_build_model_response
(content: str)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_xecguard.py:64
↓ 21 callersMethod_callback_capabilities
Inspect ``litellm.callbacks`` once and answer the per-hook capability questions used to short-circuit no-op work on the chat-completi
litellm/proxy/utils.py:1601
↓ 21 callersFunction_gate
Call review_gate with safe defaults for the injectable hooks.
tests/test_litellm/test_github_review_gate.py:101
↓ 21 callersMethod_get_client
Returns the appropriate client based on the given deployment, kwargs, and client_type. Parameters: deployment (dict): Th
litellm/router.py:9658
↓ 21 callersFunction_make_env_var_server
Lightweight server stand-in for the per-user env-var endpoints. The handlers only read ``server_id``/``server_name``/``alias``/``env_vars``/
tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py:4050
↓ 21 callersFunction_make_pr
(**overrides)
tests/test_litellm/test_github_review_gate.py:75
↓ 21 callersFunction_make_response
(payload: Dict[str, Any], status_code: int = 200)
tests/test_litellm/llms/soniox/audio_transcription/test_soniox_audio_transcription_handler.py:22
↓ 21 callersFunction_make_row
Build a Prisma-like row object.
tests/test_litellm/proxy/memory/test_memory_endpoints.py:25
↓ 21 callersFunction_simple_chunk
(model: str = "gpt-4", content: str = "hi")
tests/test_litellm/proxy/proxy_server/test_streaming_helpers.py:48
↓ 21 callersMethod_transform_request
( self, model: str, messages: List[AllMessageValues], optional_params: dict,
litellm/llms/bedrock/chat/converse_transformation.py:1633
↓ 21 callersFunction_transform_request_body
Common transformation logic across sync + async Gemini /generateContent calls.
litellm/llms/vertex_ai/gemini/transformation.py:1085
↓ 21 callersFunction_update_metadata_fields
Helper function to update all metadata fields (both premium and standard). Args: updated_kv: The key-value dict being used for the u
litellm/proxy/management_endpoints/common_utils.py:575
↓ 21 callersMethodarerank
(self, model: str, **kwargs)
litellm/router.py:3854
↓ 21 callersMethodasync_service_failure_hook
Arize is used mainly for LLM I/O tracing, sending router+caching metrics adds bloat to arize logs
litellm/integrations/arize/arize.py:127
↓ 21 callersMethodbasename
()
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 21 callersMethodbudget_alerts
( self, type: Literal[ "token_budget", "user_budget", "sof
litellm/proxy/utils.py:1822
↓ 21 callersMethodclose
(self)
tests/test_litellm/test_streaming_connection_cleanup.py:129
↓ 21 callersMethodcompletion_function
(self)
tests/llm_translation/base_llm_unit_tests.py:74
↓ 21 callersMethodcopyMetaAndAttributes
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callersMethoddefaultQueryOptions
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 21 callersFunctioneY
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 21 callersFunctionee
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 21 callersFunctionej
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 21 callersMethodemit
(self, record)
tests/test_litellm/test_cost_calculation_log_level.py:30
↓ 21 callersFunctionemit_cassette_cache_session_banner
Call from ``pytest_terminal_summary``. No-op on xdist workers.
tests/_vcr_conftest_common.py:1997
↓ 21 callersMethodexists
Check if a record exists.
litellm/repositories/base_repository.py:110
↓ 21 callersMethodget
(self, key, default=None)
litellm/types/router.py:304
↓ 21 callersFunctionhandle_streamable_http_mcp
Handle MCP requests through StreamableHTTP.
litellm/proxy/_experimental/mcp_server/server.py:3412
↓ 21 callersMethodimage_generation
( self, model: str, prompt: str, api_key: Optional[str], api_base: Opt
tests/local_testing/test_custom_llm.py:231
↓ 21 callersFunctionisReferenceLikeElement
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callersMethodis_callback_disabled_dynamically
Check if a callback is disabled via the x-litellm-disable-callbacks header or via `litellm_disabled_callbacks` in standard_callback_dynam
enterprise/litellm_enterprise/enterprise_callbacks/callback_controls.py:16
↓ 21 callersMethodlist
(self, thread_id)
tests/local_testing/test_assistants.py:189
↓ 21 callersFunctionmodelAvailableCall
( accessToken: string, userID: string, userRole: string, return_wildcard_routes: boolean = false, te
ui/litellm-dashboard/src/components/networking.tsx:1869
↓ 21 callersMethodremove
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 21 callersMethodresult
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 21 callersMethodsafe_get_vertex_ai_project
Safely get Vertex AI project without mutating the litellm_params dict. Unlike get_vertex_ai_project(), this does NOT pop values from
litellm/llms/vertex_ai/vertex_llm_base.py:1150
↓ 21 callersMethodserialize
Encode a value for DualCache / Redis (``json.dumps``-safe). If ``model_type`` is set, the payload is validated with that model, then
litellm/proxy/common_utils/cache_pydantic_utils.py:40
↓ 21 callersMethodshould_run_guardrail
Returns True if the guardrail should be run on the event_type
litellm/integrations/custom_guardrail.py:555
↓ 21 callersFunctiont
()
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 21 callersMethodtoHexString
()
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 21 callersMethodtrace
(self, name, **kwargs)
litellm/litellm_core_utils/dd_tracing.py:40
↓ 21 callersMethodtransform_anthropic_messages_request
No transformation is needed for Anthropic messages This takes in a request in the Anthropic /v1/messages API spec -> transforms it
litellm/llms/anthropic/experimental_pass_through/messages/transformation.py:256
↓ 21 callersMethodtransform_request
( self, model: str, messages: List[Dict[str, str]], # type: ignore optional_p
litellm/llms/sap/chat/transformation.py:319
↓ 21 callersMethodtranslate_request
Translate a full Anthropic /v1/messages request dict to litellm.responses() / litellm.aresponses() kwargs.
litellm/llms/anthropic/experimental_pass_through/responses_adapters/transformation.py:278
↓ 21 callersFunctiontu
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 21 callersFunctionut
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 20 callersMethod_bedrock_converse_messages_pt_async
( messages: List, model: str, llm_provider: str, user_continue_message: Option
litellm/litellm_core_utils/prompt_templates/factory.py:4293
↓ 20 callersFunction_check_and_merge_model_level_guardrails
Check if the model has guardrails defined and merge them with existing guardrails in the request data. Args: data: The request data
litellm/proxy/utils.py:5572
↓ 20 callersFunction_clear_url_env
(monkeypatch)
tests/test_litellm/proxy/utils/helpers/test_url_helpers.py:19
↓ 20 callersMethod_get_token_and_url
Internal function. Returns the token and url for the call. Handles logic if it's google ai studio vs. vertex ai. Returns
litellm/llms/vertex_ai/vertex_llm_base.py:670
↓ 20 callersFunction_get_tools_from_mcp_servers
Helper method to fetch tools from MCP servers based on server filtering criteria. Args: user_api_key_auth: User authenti
litellm/proxy/_experimental/mcp_server/server.py:1465
↓ 20 callersMethod_handle_error
(self, e: Exception, provider_config: Any)
litellm/interactions/http_handler.py:53
↓ 20 callersMethod_is_adaptive_thinking_model
Whether ``model`` uses adaptive thinking (``output_config.effort``). Sourced solely from the model cost map's ``supports_adaptive_thinking``
litellm/llms/anthropic/common_utils.py:375
↓ 20 callersFunction_make_request
(**overrides)
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:25
↓ 20 callersFunction_make_response
Build a stub httpx-like response.
tests/test_litellm/interactions/test_agents_http_handler.py:41
↓ 20 callersFunction_redact_prompt_leaks_in_error_string
Strip echoed request input from provider error strings. Provider validation errors (e.g. OpenAI ``RateLimitError`` carrying 178 pydantic
litellm/proxy/spend_tracking/spend_tracking_utils.py:740
↓ 20 callersMethodaspeech
Example Usage: ``` from litellm import Router client = Router(model_list = [ { "model_na
litellm/router.py:3740
↓ 20 callersMethodasync_get_available_deployment
Async implementation of 'get_available_deployments'. Allows all cache calls to be made async => 10x perf impact (8rps -> 100 rps).
litellm/router.py:10237
↓ 20 callersMethodasync_post_call_success_hook
(self, data, user_api_key_dict, response)
tests/test_litellm/proxy/test_model_level_guardrails.py:338
↓ 20 callersFunctioncan_modify_verification_token
Check if user has permission to modify (delete/regenerate) a verification token. Rules: - Proxy admin can modify any key - Internal
litellm/proxy/management_endpoints/key_management_endpoints.py:3679
↓ 20 callersFunctioncreate_pass_through_route
( endpoint, target: str, custom_headers: Optional[Mapping[str, Any]] = None, _forward_headers:
litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:1484
↓ 20 callersFunctioncreate_tool_function
Create a tool function for an OpenAPI operation. This function creates an async tool function that can be called with keyword arguments. Para
litellm/proxy/_experimental/mcp_server/openapi_to_mcp_generator.py:329
↓ 20 callersFunctioneZ
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:106
↓ 20 callersMethodembedding
( self, model: str, input: Union[str, List], is_async: Optional[bool] = False,
litellm/router.py:4517
↓ 20 callersFunctioner
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 20 callersFunctionget_bedrock_base_model
Get the base model from the given model name. Handle model names like: - "us.meta.llama3-2-11b-instruct-v1:0" -> "meta.llama3-2-11b-inst
litellm/llms/bedrock/common_utils.py:651
↓ 20 callersMethodget_custom_loggers_for_type
Get all custom loggers that are instances of the given class type
litellm/litellm_core_utils/logging_callback_manager.py:380
← previousnext →601–700 of 68,180, ranked by callers