MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 11 callersMethodget_prompt
Get a prompt template by ID and optional version. Args: prompt_id: The base prompt ID version: Optional vers
litellm/integrations/dotprompt/prompt_manager.py:284
↓ 11 callersMethodget_prompt_text_for_dlp
Concatenate text from every chat message (all roles) for pre-call DLP. Evaluates the same payload the model receives, not only the trailing u
litellm/proxy/guardrails/guardrail_hooks/microsoft_purview/base.py:470
↓ 11 callersMethodget_provider_evals_api_config
Get provider-specific Evals API configuration Args: provider: The LLM provider Returns: Provider-sp
litellm/utils.py:10805
↓ 11 callersMethodget_provider_model_info
( # noqa: C901 # provider dispatch table, one branch per provider model: str | None, provide
litellm/utils.py:10837
↓ 11 callersFunctionget_request_body
Read the request body and parse it as JSON.
litellm/proxy/common_utils/http_parsing_utils.py:665
↓ 11 callersMethodget_request_tags
( litellm_params: dict[str, object], proxy_server_request: Mapping[str, object], )
litellm/litellm_core_utils/litellm_logging.py:7643
↓ 11 callersFunctionget_response_headers
Sets the Appropriate OpenAI headers for the response and forward all headers as llm_provider-{header} Note: _response_headers Passed here s
litellm/litellm_core_utils/llm_response_utils/get_headers.py:32
↓ 11 callersMethodget_router_deployment_model_info
See deployment_pricing_model_info; None means fall back to the global cost map.
litellm/litellm_core_utils/litellm_logging.py:1226
↓ 11 callersFunctionget_server_root_path
Get the server root path from the environment variables. - If SERVER_ROOT_PATH is set, return it. - Otherwise, default to "/".
litellm/proxy/utils.py:9957
↓ 11 callersMethodget_session_affinity_cache_key
Session pins are scoped by the caller's hashed API key so two callers reusing the same client-supplied session_id cannot read or steer each ot
litellm/router_utils/pre_call_checks/deployment_affinity_check.py:269
↓ 11 callersMethodget_supported_openai_params
(self, model: str)
litellm/llms/maritalk.py:45
↓ 11 callersMethodget_supported_openai_params
(self, model)
litellm/llms/sap/chat/transformation.py:209
↓ 11 callersFunctionget_tag_objects_batch
Batch fetch multiple tag objects from cache and db. Optimizes for latency by: 1. Serving already-cached tags without touching the DB
litellm/proxy/auth/auth_checks.py:2615
↓ 11 callersMethodget_url_and_signed_request
Build the AgentCore URL, construct a JSON-RPC envelope, and sign the request. Args: request_id: A2A JSON-RPC request ID
litellm/a2a_protocol/providers/bedrock_agentcore/transformation.py:138
↓ 11 callersFunctionget_virtual_tool_definitions
()
litellm/proxy/mcp_server/tool_search.py:457
↓ 11 callersFunctionguardrails_usage_overview
Return guardrail performance overview for the dashboard.
litellm/proxy/guardrails/usage_endpoints.py:561
↓ 11 callersFunctionh
litellm/proxy/_experimental/out/_next/static/chunks/2jxpy6eth1zvy.js:1
↓ 11 callersFunctionhandle_elicitation_request
( context: object, params: ElicitRequestParams, downstream_session: _DownstreamElicitSession | Non
litellm/proxy/mcp_server/elicitation_handler.py:55
↓ 11 callersMethodheader
(self, key: str)
tests/unit/llms/nvidia_riva/audio_transcription/test_handler.py:56
↓ 11 callersFunctionheader_value
Read one header as ``str | None``; ``httpx.Headers.get`` itself is typed ``Any``.
litellm/llms/custom_httpx/http_handler.py:541
↓ 11 callersFunctionhidden
(group: str)
tests/integration/authorization/_hidden_alias_budget.py:295
↓ 11 callersFunctionhoist_images_from_tool_messages
Move image, file and audio content out of role:"tool" messages into a user message inserted after the run of consecutive tool messages it bel
litellm/litellm_core_utils/prompt_templates/common_utils.py:1441
↓ 11 callersFunctionhooks
(log: &Log, script: HookScript)
litellm-rust/crates/host-python/tests/support/mod.rs:332
↓ 11 callersFunctioni
(t)
litellm/proxy/_experimental/out/_next/static/chunks/14v3irtjifjt2.js:1
↓ 11 callersMethodimage_edit
(self, optional_params: dict[str, object], **kwargs: object)
tests/unit/images/test_main.py:737
↓ 11 callersFunctionincr_by
`RedisCache.increment_cache`: `INCRBY`, then `TTL`, then `EXPIRE` only when the key has no TTL, each its own round trip.
litellm-rust/crates/redis-client/src/commands.rs:305
↓ 11 callersMethodinitialize_secret_manager
Initialize the relevant secret manager if `key_management_system` is provided
litellm/proxy/proxy_server.py:7783
↓ 11 callersMethodinsert
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 11 callersMethodinsert_data
(self, *, data: Mapping[str, object], table_name: str)
tests/unit/proxy/proxy_server/test_proxy_config.py:1154
↓ 11 callersFunctioninstrument_fastapi_app
Attach OTel server-span instrumentation to the proxy FastAPI app. Safe no-op when the V2 gate is off or ``opentelemetry-instrumentation-fastapi``
litellm/integrations/otel/mount.py:133
↓ 11 callersMethodinvoke_stream
(self, guardrail: str, marker: str, model: str = CLAUDE)
tests/integration/observability/test_bedrock_invoke_stream_post_call_guardrail.py:246
↓ 11 callersFunctionis_anthropic_native_web_search_tool
Check if a tool is an Anthropic-native ``web_search_*`` tool. Native clients (Anthropic SDK, Claude Desktop, Anthropic Console) send too
litellm/integrations/websearch_interception/tools.py:221
↓ 11 callersFunctionis_cli_token_fresh
Check whether a cached CLI token is still within its expiration window. Used by `lite auth print-token` to skip asking the proxy while the cached
litellm/litellm_core_utils/cli_token_utils.py:450
↓ 11 callersMethodis_database_capacity_error
True iff Postgres refused the pool a new connection (SQLSTATE 53300: ``too many clients already``, a reserved slot, or a per-role limit) or
litellm/proxy/db/exception_handler.py:309
↓ 11 callersMethodis_internal_ip
Check if a client IP is from an internal/private network. Handles X-Forwarded-For comma chains (takes leftmost = original client).
litellm/proxy/auth/ip_address_utils.py:117
↓ 11 callersMethodis_management_route
Check if route is a management route
litellm/proxy/auth/route_checks.py:561
↓ 11 callersFunctionis_model_info_probe
(request: Request)
tests/integration/routing/test_payment_required_mapping.py:40
↓ 11 callersFunctionis_ok
(result: Result[R])
tests/e2e/e2e_http.py:246
↓ 11 callersMethodis_recording
(self)
litellm/integrations/otel/mount.py:103
↓ 11 callersMethodisatty
(self)
tests/unit/test_logging.py:1323
↓ 11 callersFunctioniter_exception_tree
Yield ``exc`` and every exception reachable from it, explicit links first: each node's ``raise ... from`` cause subtree, then ``ExceptionGroup`` m
litellm/proxy/mcp_server/faults/traversal.py:17
↓ 11 callersFunctioniteratorValue
(s,o,i,a)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 11 callersFunctionjoin_paths
(base_path: str, route: str)
litellm/proxy/utils.py:9895
↓ 11 callersFunctionjson
(response: Response)
litellm-rust/crates/gateway-inference/tests/support/mod.rs:150
↓ 11 callersMethodjson
(self)
litellm/secret_managers/hashicorp_secret_manager.py:71
↓ 11 callersMethodjson
(self)
litellm/llms/deepgram/audio_transcription/transformation.py:36
↓ 11 callersFunctionkey_counter
(token: str)
litellm/redis/stores/spend_counters/types.py:16
↓ 11 callersFunctionkey_hash_identity
The identity for the scripted client that mints under a presented virtual key.
litellm/proxy/mcp_server/outbound_credentials/envelope.py:119
↓ 11 callersFunctionkey_reader_returning
(pem: str | None)
tests/unit/llms/base_llm/auth/test_internal_issuer.py:53
↓ 11 callersFunctionkimi_k3_tokens
( encoding: tiktoken.Encoding, model: str, messages: Sequence[AllMessageValues], tools: Sequen
litellm/llms/bedrock/count_tokens/kimi_k3.py:472
↓ 11 callersMethodkwargs
The keyword view the legacy path currently reads: the caller's copy until `function_setup`, then each rewrite (setup, deployment hook, the driver's pr
litellm-rust/crates/callbacks-legacy-python/src/call.rs:45
↓ 11 callersFunctionlabelWithHint
(label: React.ReactNode, hint: React.ReactNode)
ui/litellm-dashboard/src/components/shared/form/LabelWithHint.tsx:10
↓ 11 callersFunctionlanded_all_once
(key: str, markers: frozenset[str])
tests/integration/authorization/_hidden_alias_budget.py:264
↓ 11 callersMethodlast
(self, header: str)
tests/unit/llms/base_llm/chat/test_attribution_headers.py:67
↓ 11 callersMethodlist
( self, key: str, params: Mapping[str, str] | None = None, headers: Mapping[st
tests/integration/management/test_vector_store_file_list_managed_ids.py:397
↓ 11 callersFunctionlist_shadow_eval_jobs
List shadow eval jobs, newest first, each target with its attempt count so status is accurate. Judged counts, spend, and results ride the detail e
litellm/proxy/management_endpoints/auto_router_endpoints.py:1935
↓ 11 callersMethodlitellm_credential_header_names
Lowercased header names user_api_key_auth accepts as a litellm key. Every header here authenticates the caller, so any code that forwards a
litellm/types/proxy/auth/special_headers.py:18
↓ 11 callersFunctionliteral_eval
(text: &str)
litellm-rust/crates/python-compat/src/literal.rs:23
↓ 11 callersFunctionloaded
(document: Value)
litellm-rust/crates/model-catalog/tests/catalog.rs:21
↓ 11 callersMethodlock
(&self)
litellm-rust/crates/host-http/tests/serve.rs:132
↓ 11 callersFunctionlog_request
(request: Request, next: Next)
litellm-rust/crates/gateway/src/lib.rs:165
↓ 11 callersFunctionlogging_metadata_config_error
Validate every ``logging`` entry of a team/key metadata payload.
litellm/proxy/common_utils/callback_config_validation.py:275
↓ 11 callersFunctionlookup
( kwargs: &Bound<'py, PyDict>, bound: &Bound<'py, PyDict>, name: &str, )
litellm-rust/crates/host-python/src/argument.rs:3
↓ 11 callersMethodmachine
(self, request: OcrCall, observers: Option<ObservationSender>)
litellm-rust/crates/inference-ocr/src/route.rs:56
↓ 11 callersFunctionmanaged_write_fields
( incoming: Mapping[str, object], existing: AgentResponse | None, updated_by: str, )
litellm/proxy/agent_endpoints/managed_identity.py:88
↓ 11 callersMethodmap_extra_body_params
( self, optional_params: Mapping[str, object], model: str )
litellm/llms/fireworks_ai/completion/transformation.py:59
↓ 11 callersMethodmap_failure
(&self, py: Python<'_>, error: PyErr)
litellm-rust/crates/python-bridge/src/routes/ocr/host.rs:71
↓ 11 callersMethodmap_openai_params
( self, non_default_params: dict, optional_params: dict, model: str, d
litellm/llms/oci/chat/transformation.py:417
↓ 11 callersMethodmark_texts_scanned
Record the hashes of all text segments present on a successful (non-blocked) scan. Called only after the guardrail allows the request, so a b
litellm/integrations/custom_guardrail.py:750
↓ 11 callersFunctionmatch_known_server_prefix
Return ``(matched_prefix, bare_name)`` when ``name`` carries a known prefix. Candidates are normalized and tried LONGEST first, so a prefix that
litellm/proxy/mcp_server/utils.py:460
↓ 11 callersMethodmaybe_get_model_id
Get model_id from logging object or request metadata. The router sets model_info.id when selecting a deployment. This tries multiple
litellm/proxy/common_request_processing.py:5329
↓ 11 callersFunctionmerge_by_conflict_key
Batch entries keyed by the conflict tuple, in a deterministic order. The queue keys transactions by their raw field values, so two entries differ
litellm/proxy/db/daily_spend_bulk_upsert.py:142
↓ 11 callersFunctionmessage_item
(identity: str, text: str = ANSWER)
tests/integration/streaming/faked_responses_case.py:63
↓ 11 callersFunctionmock_request
()
tests/unit/proxy/pass_through_endpoints/test_pass_through_endpoints.py:12224
↓ 11 callersFunctionmock_stream
()
tests/unit/proxy/guardrails/guardrail_hooks/openai/test_moderations.py:334
↓ 11 callersFunctionmodel_access_group_cache_key
Cache key one model access group budget row is stored under; shared so auth, spend tracking and the management endpoints cannot drift.
litellm/proxy/common_utils/user_api_key_cache.py:536
↓ 11 callersFunctionmodel_access_group_counter
(access_group: str)
litellm/redis/stores/spend_counters/types.py:56
↓ 11 callersMethodmodel_dump
(self, *, exclude_none: bool)
litellm/llms/vertex_ai/gemini/transformation.py:275
↓ 11 callersFunctionmodel_has_no_cost_mapping
(model: str | None, llm_router: Router | None)
litellm/proxy/auth/auth_checks.py:820
↓ 11 callersFunctionmodel_ids
The ``model_info.id`` of every deployment on the model list, in order.
tests/unit/test_router/core/gaps_l11100_helpers.py:88
↓ 11 callersFunctionmodels_counted_for
The names to count a request for `model` from `team_id` with, keeping the largest count, one per deployment routing would serve it from: the team'
litellm/proxy/spend_tracking/input_tokens.py:147
↓ 11 callersFunctionmw
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:10
↓ 11 callersFunctionnH
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:57
↓ 11 callersFunctionnY
(e)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 11 callersFunctionnearest_declared_reasoning_effort
Rounding up takes the weakest declared level at least as strong as the request, else the strongest declared, so the caller gets no less reasoning
litellm/litellm_core_utils/reasoning_effort_strength.py:20
↓ 11 callersFunctionnormalize_error
Return a stable cluster key for ``exc``. ``status_code`` and ``message`` are the values ``get_error_information`` already extracted, so the s
litellm/litellm_core_utils/error_normalization.py:190
↓ 11 callersFunctionnormalize_request_route
Normalize request routes by replacing dynamic path parameters with placeholders. This prevents high cardinality in Prometheus metrics by col
litellm/proxy/auth/auth_utils.py:1113
↓ 11 callersMethodof_misconfigured
(detail: str)
litellm/proxy/mcp_server/outbound_credentials/types.py:156
↓ 11 callersFunctiononly_request
(wire: Wire)
tests/integration/providers/test_chat_completions_tool_search_wire.py:406
↓ 11 callersFunctionopen
(breaker: &litellm_circuit_breaker::Breaker)
litellm-rust/crates/redis-connect/src/hosts.rs:149
↓ 11 callersFunctionopen_state
(token: str, *, purpose: str, now: int)
litellm/proxy/mcp_server/state_tokens.py:66
↓ 11 callersMethodoutbound
(self)
tests/integration/routing/test_model_capability_flags.py:57
↓ 11 callersFunctionp
(e)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 11 callersMethodparse
(key: &str)
litellm-rust/crates/redis-store/src/spend_counters/keys.rs:51
↓ 11 callersMethodparse
(value: &str)
litellm-rust/crates/core-utils/src/url_utils.rs:22
↓ 11 callersMethodparts
(&self)
litellm-rust/crates/host-python/src/driver.rs:145
↓ 11 callersMethodpipeline
(&self)
litellm-rust/crates/redis-client/src/client.rs:158
↓ 11 callersFunctionpolicy
(max_bytes: u64, max_redirects: usize)
litellm-rust/crates/http/src/media.rs:459
↓ 11 callersFunctionpolicy_for_model
The compression policy of the auto router marker `model_alias` resolves to for this caller. Pre-call arming and the routing hook both resolve thr
litellm/proxy/guardrails/auto_router_compression.py:80
↓ 11 callersMethodpoll
Return if request can be processed. Returns: - True: * If healthy deployments are available * OR If
litellm/scheduler.py:87
← previousnext →6,301–6,400 of 202,479, ranked by callers