MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions71,069 in github.com/BerriAI/litellm

↓ 19 callersMethodis_model_gpt_5_model
(cls, model: str)
litellm/llms/openai/chat/gpt_5_transformation.py:58
↓ 19 callersFunctionmake_response
Build a minimal ModelResponse-like dict.
tests/test_litellm/integrations/newrelic/test_newrelic.py:73
↓ 19 callersFunctionn
()
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 19 callersFunctionn
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 19 callersMethodparse
()
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:4
↓ 19 callersFunctionprocess_response_headers
`preserve_litellm_internal_headers` must only be True when the input is a LiteLLM-owned dict (e.g. `_hidden_params["additional_headers"]` tha
litellm/litellm_core_utils/core_helpers.py:233
↓ 19 callersMethodrecreate_prisma_client
Disconnect and reconnect the Prisma client with a new database URL. Kills the old engine subprocess directly (SIGTERM → SIGKILL) rather than
litellm/proxy/db/prisma_client.py:323
↓ 19 callersFunctionrelease_budget_reservation
(budget_reservation: Optional[dict])
litellm/proxy/spend_tracking/budget_reservation.py:190
↓ 19 callersFunctionrequire_successful_call
A call that should have succeeded but didn't is a hard failure, never a skip: if the proxy can't make a call it's expected to, the test must fail.
tests/e2e/e2e_http.py:151
↓ 19 callersMethodset
(...e)
litellm/proxy/_experimental/out/_next/static/chunks/0pidya1qvuvx8.js:1
↓ 19 callersMethodshould_call_route
Check if management route is disabled and raise exception
litellm/proxy/auth/route_checks.py:67
↓ 19 callersFunctionshould_redact_message_logging
Determine if message logging should be redacted. Priority order: 1. Dynamic parameter (turn_off_message_logging in request) 2. Heade
litellm/litellm_core_utils/redact_messages.py:217
↓ 19 callersMethodtransform_response
(self, *args, **kwargs)
tests/test_litellm/test_thinking_enabled.py:31
↓ 19 callersMethodtransform_search_response
Transform a TinyFish response to LiteLLM's unified ``SearchResponse``. Mappings (per-result): - ``title`` → ``SearchResult.t
litellm/llms/tinyfish/search/transformation.py:161
↓ 19 callersMethodtransform_video_create_request
Transform the video creation request for Veo API. Veo expects: { "instances": [ {
litellm/llms/gemini/videos/transformation.py:240
↓ 19 callersMethodtranslate_response
Translate an OpenAI ResponsesAPIResponse to AnthropicMessagesResponse.
litellm/llms/anthropic/experimental_pass_through/responses_adapters/transformation.py:384
↓ 19 callersMethodurl
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 19 callersFunctionv
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:39
↓ 19 callersMethodvalidate_environment
Expects LAGO_API_BASE, LAGO_API_KEY, LAGO_API_EVENT_CODE, Optional: LAGO_API_CHARGE_BY in t
litellm/integrations/lago.py:38
↓ 18 callersFunction_apply
Run the production call path: load from env, write to env.
tests/test_litellm/proxy/db/test_db_url_settings.py:26
↓ 18 callersFunction_assert_only
Assert `fired` was called exactly once and every other op seam was not.
tests/test_litellm/batches/test_main.py:98
↓ 18 callersMethod_common_logic
(self, kwargs: dict, response_obj)
litellm/integrations/openmeter.py:50
↓ 18 callersFunction_get_call_stack_info
Get the function names from the previous 1-2 functions in the call stack. Args: num_frames: Number of previous frames to include (de
litellm/caching/redis_cache.py:60
↓ 18 callersFunction_kwargs
(payload=None)
tests/test_litellm/integrations/otel/test_otel_v2_logger.py:94
↓ 18 callersFunction_make_guardrail
(apply_result: dict)
tests/test_litellm/llms/bedrock/passthrough/guardrail_translation/test_handler.py:28
↓ 18 callersFunction_make_mock_response
( json_data: dict | None = None, status_code: int = 200, request_url: str | None = None, text:
tests/test_litellm/llms/tinyfish/test_tinyfish_search.py:39
↓ 18 callersFunction_make_rate_limiter
()
tests/test_litellm/proxy/hooks/test_batch_file_validation.py:891
↓ 18 callersFunction_override_openai_response_model
Force the OpenAI-compatible `model` field in the response to match what the client requested. LiteLLM internally prefixes some provider/depl
litellm/proxy/common_request_processing.py:572
↓ 18 callersFunction_proxy_attrs_for_centralized_checks
Build the minimal proxy_server module attributes that _run_centralized_common_checks reads. ``master_key`` defaults to a non-None value becau
tests/test_litellm/proxy/auth/test_user_api_key_auth.py:2637
↓ 18 callersFunction_raw
(body: dict, status_code: int = 200)
tests/test_litellm/llms/bedrock/batches/test_transformation.py:52
↓ 18 callersFunction_redact_pii_matches
Redact match-like fields from a Bedrock ApplyGuardrail JSON payload. Delegates to :func:`redact_nested_match_and_regex_keys` (same rules as
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:119
↓ 18 callersFunction_scrub_db_overlay_remote_module_loads
Strip ``s3://`` / ``gcs://`` entries from the DB-overlay value for fields whose contents reach ``get_instance_fn``. The same scheme is allowed
litellm/proxy/proxy_server.py:3430
↓ 18 callersFunctionadd_server_prefix_to_name
Add server name prefix to any MCP resource name.
litellm/proxy/_experimental/mcp_server/utils.py:252
↓ 18 callersMethodasync_get_cache
- Check if the cache key is in-memory - Else: - add missing cache key from REDIS - update in-memory cache
litellm/proxy/hooks/batch_redis_get.py:93
↓ 18 callersMethodattempt_db_reconnect
Attempt to reconnect the Prisma client in a singleflight manner. Returns: bool: True if reconnection succeeded, else Fal
litellm/proxy/utils.py:4602
↓ 18 callersFunctionclean_headers
Removes litellm api key from headers Args: headers: Request headers litellm_key_header_name: Custom header name for LiteLLM
litellm/proxy/litellm_pre_call_utils.py:596
↓ 18 callersMethodclearTimeout
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 18 callersMethodclient_ack_messages
(self)
litellm/litellm_core_utils/realtime_streaming.py:1175
↓ 18 callersMethodclone
()
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 18 callersFunctionconvert_url_to_base64
(url: str)
litellm/litellm_core_utils/prompt_templates/image_handling.py:100
↓ 18 callersFunctioncreate_scratch_key
Seed a scratch-tagged key via /key/generate; returns its cleartext. Shared by the write-scenario matrices (key update/regenerate/delete). key
tests/proxy_behavior/management/conftest.py:102
↓ 18 callersMethoddefer
Register a teardown action for any resource the test just created.
tests/e2e/lifecycle.py:97
↓ 18 callersFunctioneI
(e)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 18 callersFunctioneJ
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 18 callersFunctionemit_vcr_classification_summary
Render the per-classification summary at session end. Output sections (only included when non-empty): * **Verdict counts** — full breakdown
tests/_vcr_conftest_common.py:1885
↓ 18 callersFunctionencrypt_callback_vars
Return a deep copy of metadata with callback_vars values encrypted at rest. Idempotent: a value that already decrypts cleanly is left unchanged s
litellm/proxy/common_utils/callback_utils.py:582
↓ 18 callersMethodexpand_permission_list
Expand a permission list of server_ids/names/aliases into concrete server_ids against the current region's config + DB registry union
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4192
↓ 18 callersMethodget_anthropic_headers
( self, api_key: Optional[str] = None, auth_token: Optional[str] = None, anthr
litellm/llms/anthropic/common_utils.py:555
↓ 18 callersMethodget_api_base
(api_base: Optional[str] = None)
litellm/llms/xai/common_utils.py:44
↓ 18 callersMethodget_attached_policies
Get list of policy names attached to the given context. Args: context: The request context to match against Ret
litellm/proxy/policy_engine/attachment_registry.py:87
↓ 18 callersFunctionget_key_model_tpm_limit
Get the model tpm limit for a given api key. Priority order (returns first found): 1. Key metadata (model_tpm_limit) 2. Key model_ma
litellm/proxy/auth/auth_utils.py:875
↓ 18 callersMethodget_mcp_server_by_name
Get the MCP Server from the server name. Uses priority-based matching to avoid collisions: 1. First pass: exact alias match
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4256
↓ 18 callersMethodget_redis_lock_key
(cronjob_id: str)
litellm/proxy/db/db_transaction_queue/pod_lock_manager.py:39
↓ 18 callersMethodinitialize_azure_sdk_client
( self, litellm_params: dict, api_key: Optional[str], api_base: Optional[str],
litellm/llms/azure/common_utils.py:513
↓ 18 callersMethoditer_lines
Mock iter_lines method for synchronous streaming.
tests/test_litellm/test_groq_streaming_encoding.py:32
↓ 18 callersMethodload_attachments
Load attachments from a configuration list. Args: attachments_config: List of attachment dictionaries from YAML.
litellm/proxy/policy_engine/attachment_registry.py:47
↓ 18 callersMethodmask_dict
( self, data: Dict[str, Any], depth: int = 0, max_depth: int = DEFAULT_MAX_REC
litellm/litellm_core_utils/sensitive_data_masker.py:104
↓ 18 callersFunctionmock_open
Helper to create a mock file object
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_model_armor.py:1428
↓ 18 callersMethodroute
Route a requested model to the corresponding llm deployments based on the regex pattern loop through all the patterns and find the m
litellm/router_utils/pattern_match_deployments.py:112
↓ 18 callersFunctionsN
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 18 callersMethodset_cache
(self, key, value, local_only: bool = False, **kwargs)
litellm/proxy/common_utils/user_api_key_cache.py:132
↓ 18 callersFunctionspend_log_error
Log a spend-tracking error, with the traceback gated on the env var. By default this behaves like ``verbose_proxy_logger.exception`` — the ac
litellm/proxy/spend_tracking/spend_log_error_logger.py:59
↓ 18 callersFunctiontf
(e,t,n=[])
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 18 callersFunctiontl
(t,e,r)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 18 callersFunctionto
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 18 callersMethodtransform_search_request
Transform a LiteLLM search request to TinyFish's querystring format. Maps LiteLLM's unified-spec params (see ``BaseSearchCon
litellm/llms/tinyfish/search/transformation.py:83
↓ 18 callersMethodupdate_many
( self, where: Dict[str, Any], data: Dict[str, Any] )
tests/test_litellm/proxy/common_utils/test_reset_budget_job.py:75
↓ 18 callersFunctionvcr_config_dict
()
tests/_vcr_conftest_common.py:1113
↓ 17 callersFunction_apply_credential_overrides_from_model_config
Walk the model_config precedence chain in team/project metadata. If a matching credential is found, set api_base/api_key/api_version on data
litellm/proxy/litellm_pre_call_utils.py:1847
↓ 17 callersMethod_build_container_id
Build a managed container ID with provider and model info encoded. Format: cntr_{base64("litellm:custom_llm_provider:{provider};model_id:{mod
litellm/responses/utils.py:502
↓ 17 callersFunction_build_key_filter_conditions
Build filter conditions for key listing. Visibility rules: - Users always see their own keys (user_id match) - Team admins see ALL keys f
litellm/proxy/management_endpoints/key_management_endpoints.py:5480
↓ 17 callersFunction_build_request
( headers: Optional[Dict[str, str]] = None, *, path: str = "/mcp-rest/test/tools/list", method
tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py:25
↓ 17 callersMethod_build_user_agent
Build the User-Agent string for Databricks API calls. If a custom user agent is provided, the partner name (part before /) i
litellm/llms/databricks/common_utils.py:136
↓ 17 callersMethod_create_guardrail_span
Creates a span for Guardrail, if any guardrail information is present in standard_logging_object
litellm/integrations/opentelemetry.py:1736
↓ 17 callersFunction_create_mock_client
Utility to create a mocked async httpx client for the given method.
tests/test_litellm/proxy/_experimental/mcp_server/test_openapi_to_mcp_generator.py:32
↓ 17 callersMethod_get_model_endpoint
Get the API endpoint for a given model.
litellm/llms/stability/image_edit/transformations.py:110
↓ 17 callersFunction_hash_cli_sso_secret
(secret: str)
litellm/proxy/management_endpoints/ui_sso.py:163
↓ 17 callersFunction_make_mock_response
Build a minimal mock ResponsesAPIResponse.
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:854
↓ 17 callersFunction_make_model_list
Build a router model_list from a compact spec. spec entry shape: { "model_name": str, "quality_tier": Optional[int],
tests/test_litellm/router_strategy/test_quality_router.py:27
↓ 17 callersFunction_make_perm
(**kwargs: Any)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_tool_search.py:40
↓ 17 callersFunction_make_server
( *, server_id: str = "abcdef-1234", server_name: str = "github_onprem", alias: str = "github_
tests/test_litellm/proxy/_experimental/mcp_server/test_short_mcp_tool_prefix.py:29
↓ 17 callersMethod_resolve_project_name
Resolve the target Phoenix/Arize project for this request. Proxy priority: ``user_api_key_auth_metadata.phoenix_project_name_overrid
litellm/integrations/arize/arize_phoenix.py:267
↓ 17 callersMethod_response_cost_calculator
Calculate response cost using result + logging object variables. used for consistent cost calculation across response headers + logg
litellm/litellm_core_utils/litellm_logging.py:1352
↓ 17 callersMethod_run_reconnect_cycle
Run a reconnect cycle with a single overall timeout budget. Uses the _engine_confirmed_dead flag (set by waitpid thread / pidfd / po
litellm/proxy/utils.py:4448
↓ 17 callersFunction_seed_token
( prisma, scratch_prefix: str, *, suffix: str = "tok", user_id: str, spend: float = 0.
tests/proxy_behavior/management/test_f7_key_coverage_push.py:34
↓ 17 callersFunction_spec
(config)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_resolver.py:41
↓ 17 callersMethod_transform_response_api_usage_to_chat_usage
Transforms ResponseAPIUsage or ImageUsage to a Usage object. Both have the same spec with input_tokens, output_tokens, and i
litellm/responses/utils.py:940
↓ 17 callersFunction_translate_messages
(messages: List[Any])
tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_transformation.py:180
↓ 17 callersMethod_try_transform_vertex_batch_output_to_openai
Try to transform Vertex AI batch output to OpenAI format. If conversion fails at any point, return the original content as-is.
litellm/llms/vertex_ai/files/transformation.py:652
↓ 17 callersFunction_verdict_response
Build a mocked Repello analyze response with the given verdict.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_repelloai.py:32
↓ 17 callersMethodacreate_sandbox
(self, **kwargs)
tests/test_litellm/integrations/code_interpreter_interception/test_handler.py:42
↓ 17 callersFunctionassert_server_span_attrs
The four required attributes on the SERVER span must all be set.
tests/test_litellm/integrations/open_telemetry/_helpers.py:33
↓ 17 callersMethodasync_function_with_fallbacks
Try calling the function_with_retries If it fails after num_retries, fall back to another model group
litellm/router.py:6222
↓ 17 callersFunctionbuild_inspection_messages
Synthesize a chat-style messages list for posting to a guardrail API. Each returned message has a plain-string ``content`` — multimodal text
litellm/proxy/guardrails/_content_utils.py:209
↓ 17 callersFunctioncall_retrieve
( harness: RetrieveHarness, batch_id: str, *, provider: Optional[str] = None, user: Option
tests/test_litellm/proxy/batches_endpoints/test_endpoints.py:910
↓ 17 callersMethodcheck_passthrough_route_access
Check if route is a passthrough route. Supports both exact match and prefix match.
litellm/proxy/auth/route_checks.py:657
↓ 17 callersMethodconnect
( self, *, key: str, model: str, timeout: float = 15.0 )
tests/e2e/realtime/realtime_client.py:291
↓ 17 callersFunctionconvert_file_document_to_url_document
Convert a file-type document dict to a document_url-type document dict with an inline base64 data URI. Accepts document dicts like:
litellm/ocr/main.py:467
↓ 17 callersMethoddatabricks_validate_environment
Validate and configure the Databricks environment. Authentication priority: 1. OAuth M2M (DATABRICKS_CLIENT_ID + DATABRICKS_
litellm/llms/databricks/common_utils.py:304
↓ 17 callersFunctiondecode_video_id_with_provider
Decode provider and model_id from encoded video_id.
litellm/types/videos/utils.py:59
← previousnext →801–900 of 71,069, ranked by callers