MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 14 callersMethodget_arize_phoenix_config
Retrieves the Arize Phoenix configuration based on environment variables. Returns:
litellm/integrations/arize/arize_phoenix.py:389
↓ 14 callersFunctionget_azure_ai_auth_headers
Build the auth headers for an Azure AI Foundry route. Prefers the API key when one is configured, and otherwise falls back to Entra ID / OAu
litellm/llms/azure_ai/common_utils.py:163
↓ 14 callersFunctionget_bedrock_chat_config
Helper function to get the appropriate Bedrock chat config based on model and route. Args: model: The model name/identifier Ret
litellm/llms/bedrock/common_utils.py:2280
↓ 14 callersMethodget_complete_url
Get the complete A2A agent endpoint URL. A2A agents use JSON-RPC 2.0 at the base URL, not specific paths. The method (messag
litellm/llms/a2a/chat/transformation.py:195
↓ 14 callersFunctionget_config_param
Cached read of a LiteLLM_Config row; returns row, _ConfigRow shim, or None.
litellm/proxy/utils.py:5517
↓ 14 callersFunctionget_custom_labels_from_metadata
Get custom labels from metadata
litellm/integrations/prometheus.py:5126
↓ 14 callersMethodget_deployment_by_model_group_name
(self, model_group_name: str)
litellm/router_deprecated.py:464
↓ 14 callersFunctionget_mock_user_token
Create a mock UserAPIKeyAuth token for testing
tests/unit/proxy/test_enforce_user_param.py:29
↓ 14 callersFunctionget_org_object
- Check if org id in proxy Org Table - if valid, return LiteLLM_OrganizationTable object - if not, then raise an error Args:
litellm/proxy/auth/auth_checks.py:4576
↓ 14 callersFunctionget_pre_routing_selection
The model a pre-routing hook selected for this request, if one did.
litellm/router_utils/fallback_event_handlers.py:351
↓ 14 callersFunctionget_prompt_cache_min_tokens
Returns the smallest prefix `model` will actually cache. Resolution order is an explicitly configured `MINIMUM_PROMPT_CACHE_TOKEN_COUNT`, th
litellm/utils.py:11768
↓ 14 callersMethodget_provider_vector_stores_config
v2 vector store config, use this for new vector store integrations
litellm/utils.py:11049
↓ 14 callersMethodget_routing_group
The routing group callable as ``model_name``: a deployment model_name or an alias of the same name shadows it.
litellm/router_rust/surface/registry.py:1738
↓ 14 callersMethodget_settings
(self)
litellm/router_deprecated.py:654
↓ 14 callersFunctionget_stored_api_key
Get the stored API key. If expected_base_url is provided, the key is only returned when it was originally issued for that URL. This prevents
litellm/proxy/client/cli/commands/auth.py:291
↓ 14 callersMethodgroups
(&self, connection: &Connection)
litellm-rust/crates/redis-client/src/pipeline.rs:64
↓ 14 callersMethodhandle_callback_failure
Handle callback logging failures by incrementing Prometheus metrics. Call this method in exception handlers within your callback whe
litellm/integrations/custom_logger.py:968
↓ 14 callersMethodhandle_existing_user_by_email
Check if a user with the given email already exists and update them if found. The matched row keeps its existing user_id even when t
litellm/proxy/management_endpoints/scim/scim_v2.py:191
↓ 14 callersFunctionhandle_list
Plan, execute, count, serialize, envelope. Failures reach the client as RFC 9457 problems.
litellm/proxy/list_api/list_framework.py:605
↓ 14 callersMethodhits
(self, deployment: str, marker: str)
tests/integration/routing/test_ptu_shares.py:306
↓ 14 callersMethodinc
(self, *args, **kwargs)
litellm/types/integrations/prometheus.py:1188
↓ 14 callersMethodincrement_cache
Key - the key in cache Value - int - the value you want to increment by Returns - int - the incremented value
litellm/caching/dual_cache.py:156
↓ 14 callersFunctioninitialize_pass_through_endpoints
1. Create a global list of pass-through endpoints (db + config) 2. Clear all existing pass-through endpoints from the FastAPI app routes
litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:4320
↓ 14 callersFunctionis_base64_encoded_unified_id
Check if a resource ID is a base64 encoded unified ID. Args: resource_id: The resource ID to check prefix: The expected pref
litellm/llms/base_llm/managed_resources/utils.py:43
↓ 14 callersMethodis_database_connection_error
True only for a database that is temporarily unreachable and is expected to come back on its own. This is the gate for ``allow_reques
litellm/proxy/db/exception_handler.py:132
↓ 14 callersMethodis_database_transport_error
Returns True only for transport/connectivity failures where a reconnect attempt makes sense (e.g. DB is unreachable, connection dropp
litellm/proxy/db/exception_handler.py:240
↓ 14 callersFunctionis_recordable_span
True if ``obj`` is a live span with a valid context (safe to parent under).
litellm/integrations/otel/plumbing/context.py:393
↓ 14 callersMethodis_shutting_down
Whether this worker has begun graceful shutdown.
litellm/proxy/shutdown/graceful_shutdown_manager.py:55
↓ 14 callersFunctionitems_by_index
(events: Sequence[Mapping[str, JsonValue]], kind: str)
tests/integration/streaming/faked_responses_case.py:209
↓ 14 callersMethodjson
(self)
tests/unit/sandbox/test_e2b_sandbox.py:32
↓ 14 callersFunctionju
({model:e,activities:t})
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:333
↓ 14 callersFunctionl
()
litellm/proxy/_experimental/out/_next/static/chunks/0_6jqgnorqxl2.js:1
↓ 14 callersFunctionl
()
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 14 callersFunctionl
(e,t,r,n,a)
litellm/proxy/_experimental/out/_next/static/chunks/2aatum0yo4cv8.js:1
↓ 14 callersFunctionlegacy_send
(marker: str, text: str = "synthetic ping", method: str = "message/send")
tests/integration/compatibility/_a2a_peers.py:252
↓ 14 callersFunctionload_config
Load CLI config from file; returns {} if missing or unreadable
litellm/proxy/client/cli/commands/config.py:30
↓ 14 callersMethodlock
( &self, )
litellm-rust/crates/inference-responses/tests/support/mod.rs:144
↓ 14 callersFunctionlookup_mcp_server_auth_in_headers
Resolve server-specific auth headers with case-insensitive matching. Tries the raw alias/server_name (lowercased) and the header-safe saniti
litellm/proxy/mcp_server/utils.py:196
↓ 14 callersFunctionmake_handler
()
tests/unit/llms/claude_code/harness/test_transformation.py:201
↓ 14 callersFunctionmake_inputs_with_tools
Create GenericGuardrailAPIInputs with tool_calls.
tests/unit/integrations/rubrik_test_helpers.py:19
↓ 14 callersMethodmapResult
(e,t=1)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 14 callersMethodmap_openai_params
( self, non_default_params: dict, optional_params: dict, model: str, d
litellm/llms/baseten/chat.py:77
↓ 14 callersFunctionmarker_of
(request: Request)
tests/integration/routing/_reasoning_effort_levels_support.py:55
↓ 14 callersMethodmerge_litellm_metadata
Merge both litellm_metadata and metadata from litellm_params. litellm_metadata contains model-related fields, metadata contains user
litellm/litellm_core_utils/litellm_logging.py:6998
↓ 14 callersFunctionmint_proxy_credential
Mint the ``lite login`` credential for a consented grant. Membership is checked live against the database row, so a team the user left between con
litellm/proxy/mcp_server/proxy_api_credentials.py:50
↓ 14 callersFunctionmixed_burst
Fire `per_surface` requests on every surface; returns (response id, x-litellm-call-id) per request.
tests/integration/observability/_s3_v2_support.py:336
↓ 14 callersMethodmodel_dump
(self)
tests/unit/caching/test_redis_semantic_cache.py:625
↓ 14 callersFunctionmodel_response
( *, content: str | None = None, tool_calls: tuple[dict[str, object], ...] = (), prompt_tokens
tests/unit/harness/handlers/test_tool_loop_handler.py:33
↓ 14 callersMethodnodeAt
(e)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 14 callersFunctionnormalize_email
(value: str | None)
litellm/proxy/roi_calculator/analytics.py:23
↓ 14 callersFunctionnow
()
litellm-rust/crates/cache-azure-blob/tests/cache.rs:44
↓ 14 callersFunctionnow
()
litellm-rust/crates/gateway-auth/tests/keys.rs:33
↓ 14 callersFunctionopenai_error_stream
(identity: str, code: str, message: str)
tests/integration/_support/responses_stream.py:47
↓ 14 callersFunctionoverflow_total
(samples: Sequence[Sample], name: str)
tests/integration/_support/prometheus_series.py:263
↓ 14 callersFunctionpaginated_mcp_peer
( *, page_size: int = 1, ttl_ms: int = 0, repeat_cursor: bool = False, fail_listing: bool
tests/integration/_support/mcp.py:801
↓ 14 callersFunctionpatch_user
Patch a user according to SCIM v2 protocol
litellm/proxy/management_endpoints/scim/scim_v2.py:2761
↓ 14 callersMethodpost
( self, url: str, data: dict | str | bytes | None = None, json: dict | str | l
litellm/llms/custom_httpx/http_handler.py:1698
↓ 14 callersMethodpost_call_success_hook
(self)
litellm/proxy/guardrails/guardrail_endpoints.py:2373
↓ 14 callersMethodposted_hosts
(self)
tests/unit/llms/bedrock/count_tokens/test_bedrock_token_counter.py:39
↓ 14 callersFunctionprefetch_auth_objects
Best effort: any failure leaves the per-object getters to fetch as before. ``before_read`` runs right before a Redis read goes out, so a caller ca
litellm/proxy/auth/auth_object_prefetch.py:300
↓ 14 callersMethodpreflight_token_exchange
Mint an exchange-backed server's upstream credential at the transport edge. Single-server routes call this before the MCP session opens, wher
litellm/proxy/mcp_server/mcp_server_manager.py:4323
↓ 14 callersFunctionprepare_data_with_credentials
Update data dictionary with model credentials (in-place). Args: data: Data dictionary to update credentials: Credentials fro
litellm/proxy/openai_files_endpoints/common_utils.py:811
↓ 14 callersFunctionpriced_model
(scenario: Scenario, wire: Wire)
tests/integration/spend/_partial_stream.py:93
↓ 14 callersFunctionprisma_command_timeout
Seconds any single Prisma command may run for.
litellm-proxy-extras/litellm_proxy_extras/prisma_toolchain.py:103
↓ 14 callersMethodprocess_input_messages
Process input text fields ('query' and 'instruction') by applying guardrails and writing the sanitized values back. Args:
litellm/llms/cohere/rerank/guardrail_translation/handler.py:44
↓ 14 callersFunctionprompt_factory
( model: str, messages: list, custom_llm_provider: str | None = None, api_key: str | None = No
litellm/litellm_core_utils/prompt_templates/factory.py:6210
↓ 14 callersMethodprovider_calls
(self, marker: str, requests: tuple[Request, ...])
tests/integration/observability/test_straiker_v3_platform.py:413
↓ 14 callersFunctionproxy_exception_from_route_error
(exc: Exception)
litellm/proxy/common_request_processing.py:865
↓ 14 callersFunctionptu_config_error
Why this PTU configuration cannot be honoured, else None. Both the model endpoints and config.yaml registration ask this, so a deployment that
litellm/litellm_core_utils/ptu_pricing.py:237
↓ 14 callersMethodquery_raw
(self, query: str, *args: object)
litellm/proxy/management_endpoints/model_management_endpoints.py:293
↓ 14 callersMethodquery_raw
(self, query: str, *args: object)
litellm/proxy/db/create_views.py:17
↓ 14 callersFunctionr
()
litellm/proxy/_experimental/out/_next/static/chunks/1f2vcab0yti03.js:37
↓ 14 callersFunctionrate_limited_stream
(identity: str)
tests/integration/_support/responses_stream.py:101
↓ 14 callersFunctionread
(router: Router, name: str)
tests/unit/test_router/core/test_deprecated_members.py:40
↓ 14 callersMethodreceived
(self, wire: Wire, marker: str)
tests/integration/providers/test_bedrock_passthrough_guardrail_config_wire.py:289
↓ 14 callersMethodrecord_turn
Attribute feedback to the previous response and response signals to the current model.
litellm/router_strategy/adaptive_router/adaptive_router.py:369
↓ 14 callersMethodregister
(self, scenario: Scenario, wire: Wire)
tests/integration/providers/test_responses_minted_reasoning_replay_wire.py:46
↓ 14 callersMethodregister_agent
Register an agent and, on success, wait until the data plane serves it. /v1/agents is a control-plane route; the /a2a/{agent_id} routes that
tests/e2e/a2a/a2a_client.py:186
↓ 14 callersFunctionreject
(path: ModelEditFieldName, message: string)
ui/litellm-dashboard/src/components/ModelInfoEditForm.tsx:150
↓ 14 callersMethodrelease_upstream_sessions
(self, gateway_session_id: str)
litellm/proxy/mcp_server/mcp_server_manager.py:6489
↓ 14 callersFunctionrender_subtitle_tokens_as_srt
Render tokens as an SRT document; empty string when no token has timestamp data.
litellm/litellm_core_utils/audio_utils/subtitle_utils.py:222
↓ 14 callersFunctionrequest
( model: &'a str, provider: Option<&'a str>, messages: Value, optional_params: Value, )
litellm-rust/crates/inference-chat/tests/request.rs:13
↓ 14 callersFunctionresolve_copilot_user_session
( user_id: str, github_token: str, credential_name: str, endpoints: GithubHostEndpoints, )
litellm/llms/github_copilot/per_user_auth.py:371
↓ 14 callersFunctionresolve_mcp_server
( server_id: str, *, manager: MCPServerRegistry, db_lookup: Callable[[str], Awaitable[LiteLLM_
litellm/proxy/mcp_server/server_resolution.py:43
↓ 14 callersFunctionresponse_id
(response: object)
tests/test_litellm_rust/support/results.py:9
↓ 14 callersFunctionresume
( logging: &mut LegacyLogging, step: HookStep<LegacyLogging, T>, py: Python<'_>,
litellm-rust/crates/callbacks-legacy-python/src/adapter.rs:711
↓ 14 callersFunctionroute
(batch: Batch)
litellm/redis/stores/_route.py:72
↓ 14 callersMethodrouter_kwargs
(self)
tests/unit/proxy/batches_endpoints/test_endpoints.py:172
↓ 14 callersFunctionrun_async_function
Helper utility to run an async function in a sync context. Handles the case where there is an existing event loop running. Args:
litellm/litellm_core_utils/asyncify.py:84
↓ 14 callersFunctionrun_hosted
( machine: HostedMachine<P>, host: Host<'_, S, H, C>, )
litellm-rust/crates/host-native/src/in_process.rs:57
↓ 14 callersFunctionrun_turn
( handler: ToolLoopHandler, ctx: SessionContext, prompt: str, allow: bool = True, )
tests/unit/harness/handlers/test_tool_loop_handler.py:106
↓ 14 callersMethodsafe_get_vertex_ai_location
Safely get Vertex AI location without mutating the litellm_params dict. Unlike get_vertex_ai_location(), this does NOT pop values fr
litellm/llms/vertex_ai/vertex_llm_base.py:1273
↓ 14 callersMethodscan_message_for_secrets
(self, message_content: str)
enterprise/litellm_enterprise/enterprise_callbacks/secret_detection.py:620
↓ 14 callersMethodscope
(&self, operation: impl FnOnce() -> T)
litellm-rust/crates/tracing/src/lib.rs:83
↓ 14 callersMethodsecret
(&self, name: &str)
litellm-rust/crates/llms/src/base_llm/ocr/transformation.rs:142
↓ 14 callersFunctionsend
(gateway: Gateway, cell: str, model: str | None = None, key: str | None = None)
tests/integration/observability/test_prometheus_provider_auth_failure.py:440
↓ 14 callersFunctionsession
()
tests/integration/routing/test_responses_websocket_turn_admission.py:297
↓ 14 callersFunctionset
(rows: TierRow[], fallback?: string)
ui/litellm-dashboard/src/components/add_model/tier_rows.test.ts:84
↓ 14 callersFunctionsettle_propagation
Block until PROPAGATION_TIMEOUT has elapsed since `written_at`, a `time.monotonic()` stamp taken the moment a control-plane write returned. C
tests/e2e/e2e_config.py:310
↓ 14 callersMethodsignal
(self, action: signal.Signals)
tests/integration/_support/redis_process.py:113
← previousnext →4,501–4,600 of 202,479, ranked by callers