MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 16 callersMethodget_rds_iam_token
Mint a fresh database token and update the configured DB URL env var. When the wrapper was constructed with an explicit `iam_endpoint`
litellm/proxy/db/prisma_client.py:524
↓ 16 callersMethodget_redis_lock_key
(cronjob_id: str)
tests/unit/proxy/common_utils/test_reset_budget_job.py:2583
↓ 16 callersMethodget_router_model_id
Extract the router deployment model_id from litellm_params. Checks both litellm_metadata and metadata for model_info.id. Used by cost
litellm/litellm_core_utils/litellm_logging.py:1167
↓ 16 callersMethodget_standard_logging_metadata
Clean and filter the metadata dictionary to include only the specified keys in StandardLoggingMetadata. Args: metadata (
litellm/litellm_core_utils/litellm_logging.py:7030
↓ 16 callersMethodget_supported_perplexity_optional_params
Get the set of Perplexity unified search parameters. These are the standard parameters that providers should transform from.
litellm/llms/base_llm/search/transformation.py:130
↓ 16 callersMethodget_team_id
(self, token: dict, default_value: str | None)
litellm/proxy/auth/handle_jwt.py:512
↓ 16 callersMethodhasKey
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 16 callersFunctionhash_token_if_needed
Hash the token if it's a string and starts with "sk-" Else return the token as is
litellm/proxy/utils.py:8582
↓ 16 callersFunctionhost_callback_names
(host: ScriptedHost)
tests/unit/test_router/core/construction_precall_helpers.py:54
↓ 16 callersFunctioni
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2hk8n3azev--d.js:1
↓ 16 callersFunctioni
litellm/proxy/_experimental/out/_next/static/chunks/3yrgf44a9g52e.js:1
↓ 16 callersFunctioniN
(e,t,r,n,i)
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:53
↓ 16 callersMethodinto_value
(self)
litellm-rust/crates/auth-types/src/lib.rs:40
↓ 16 callersFunctionis_cached_message
Returns true, if message is marked as needing to be cached. Used for anthropic/gemini context caching. Follows the anthropic format {"c
litellm/utils.py:9426
↓ 16 callersMethoditer_bytes
Given an iterator that yields lines, iterate over it & yield every event encountered
litellm/llms/sagemaker/common_utils.py:334
↓ 16 callersMethodkill
(self)
litellm/harness/sandbox/base.py:26
↓ 16 callersFunctionkt
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0cz1d0mv5g_q7.js:1
↓ 16 callersMethodlock
( &self, )
litellm-rust/crates/inference-messages/tests/support/mod.rs:144
↓ 16 callersFunctionm
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 16 callersMethodmap_reasoning_effort
( cls, reasoning_effort: REASONING_EFFORT | str | None, model: str, custom_llm
litellm/llms/anthropic/chat/transformation.py:1781
↓ 16 callersFunctionmarker_of
(request: Request)
tests/integration/providers/_api_base_trailing_slash_support.py:55
↓ 16 callersFunctionmask_credentials_in_payload
Return a copy of ``data`` where string values under sensitive-named keys are masked but every other value (``None``, ``int``, ``float``, ``bool``,
litellm/litellm_core_utils/sensitive_data_masker.py:177
↓ 16 callersFunctionmessage_json
(message_id: str, model: str, text: str)
tests/integration/_support/anthropic_sse.py:93
↓ 16 callersFunctionmessages
(cell: str)
tests/integration/observability/test_prometheus_provider_auth_failure.py:436
↓ 16 callersMethodmodel_dump
(self)
tests/unit/proxy/common_utils/test_registry_read_through.py:183
↓ 16 callersFunctionmonotonic
()
tests/unit/router_utils/test_kubernetes_pod_discovery.py:266
↓ 16 callersFunctionmount_auth
(server: &MockServer, expected: u64)
litellm-rust/crates/secrets-cyberark/tests/secret_manager/support.rs:74
↓ 16 callersFunctionnamed_row
(index: int, alias: str)
tests/integration/_support/daily_activity.py:182
↓ 16 callersFunctionnative_message
( identity: str, *, content: Sequence[Mapping[str, JsonValue]], stop_reason: str = "tool_use",
tests/integration/_support/safeguards_rig.py:617
↓ 16 callersMethodnonnegative
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2j7hjtph8n74b.js:1
↓ 16 callersFunctionnumber
(value: JsonValue)
tests/integration/spend/_background_responses.py:225
↓ 16 callersFunctionoauth_server
``mint(grant)``, when given, chooses each issued access token instead of a random one.
tests/integration/_support/oauth_server.py:84
↓ 16 callersFunctionobject_permission_cache_key
Cache key ``get_object_permission`` stores a permission row under.
litellm/proxy/common_utils/user_api_key_cache.py:511
↓ 16 callersFunctionone_outbound
(gateway: Gateway, identity: str)
tests/integration/compatibility/_status_code_audit.py:171
↓ 16 callersFunctionowned_config
( directory: Path, model_list: Sequence[JsonValue], *, litellm_settings: Mapping[str, JsonValu
tests/integration/providers/_cache_control_marks_support.py:461
↓ 16 callersMethodparse
()
litellm/proxy/_experimental/out/_next/static/chunks/2hk8n3azev--d.js:1
↓ 16 callersMethodpoll_logs_for_request_id
( self, request_id: str, *, min_rows: int = 1, predicate: RowsPredicat
tests/e2e/proxy_client.py:1194
↓ 16 callersFunctionprocess_sso_jwt_access_token
Process SSO JWT access token and extract team IDs and user role if available. This function decodes the JWT access token and extracts team I
litellm/proxy/management_endpoints/ui_sso.py:947
↓ 16 callersMethodquery_raw
(self, query: LiteralString, *args: object)
litellm/proxy/telemetry/store.py:24
↓ 16 callersFunctionread_response
(data: serde_json::Value)
litellm-rust/crates/secrets-hashicorp/tests/secret_manager/support.rs:41
↓ 16 callersMethodrecord
Append `label`, unless it repeats the previous step. A retrying helper (poll_cost_row) or a load test calling a decorated helper in a
tests/e2e/e2e_metadata.py:257
↓ 16 callersFunctionregister_client
(request: Request, mcp_server_name: str | None = None)
litellm/proxy/mcp_server/discoverable_endpoints.py:3480
↓ 16 callersMethodregister_plugin
(self, plugin: "CustomRoutingStrategyBase")
litellm/router_core.py:46
↓ 16 callersMethodreplaceWith
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 16 callersFunctionreplay_source
(root: Path)
tests/e2e_harness/test_provider_edge.py:326
↓ 16 callersMethodresolve
( self, hashed_token: str, *, auth_method: AuthMethod = AuthMethod.API_KEY,
litellm/proxy/auth/resolvers/store.py:79
↓ 16 callersFunctionresolve_model_group_alias
Resolve ``model`` through a ``model_group_alias`` map. Handles both supported entry shapes, the plain string form ``{"alias": "target"}`
litellm/litellm_core_utils/routing_common_utils.py:126
↓ 16 callersFunctionresolve_operation
Map a litellm ``call_type`` to a ``gen_ai.operation.name`` value. An unmapped call type still falls back to ``chat`` so every series keeps an
litellm/integrations/otel/model/semconv.py:489
↓ 16 callersMethodresolve_verified_claims
( self, claims: Mapping[str, object] )
litellm/proxy/agent_endpoints/identity_store.py:121
↓ 16 callersFunctionresourceKey
()
terraform/provider/litellm/resource_key.go:17
↓ 16 callersFunctionresourceLiteLLMJWTKeyMapping
()
terraform/provider/litellm/resource_jwt_key_mapping.go:7
↓ 16 callersFunctionresponse_cost_calculator
Returns - float or None: cost of response
litellm/cost_calculator.py:2502
↓ 16 callersFunctionresponse_timing_metrics
``_response_ms`` for the window starting at proxy receive time when stamped, else ``start_time``. On a cache hit the overhead is the total minus
litellm/litellm_core_utils/llm_response_utils/response_metadata.py:67
↓ 16 callersFunctionrouted_model_info
(value: object)
litellm/integrations/anthropic_cache_control_hook.py:99
↓ 16 callersFunctionrun
Runs the route with a secret source that knows nothing, so no environment leaks in.
litellm-rust/crates/inference-messages/tests/messages/main.rs:116
↓ 16 callersFunctionrun_basic_messaging_cell
Run the shared `basic_messaging_*` × <provider> cell body. When ``verify_streaming=True``, the cell additionally asserts that the proxy strea
tests/e2e/claude_code/_basic_messaging.py:80
↓ 16 callersFunctionsafe_convert_created_field
Safely convert a 'created' field value to an integer. Some providers (like SambaNova) return the 'created' field as a float (Unix timest
litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py:111
↓ 16 callersFunctionsanitizeUrl
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 16 callersFunctionsanitize_error_information_for_spend_logs
Sanitize ``error_information`` before it lands in ``LiteLLM_SpendLogs.metadata``. Provider errors are stored verbatim via ``str(original_exc
litellm/proxy/spend_tracking/spend_tracking_utils.py:1734
↓ 16 callersMethodsave_config
(self, new_config: dict[str, dict[str, object]])
tests/unit/proxy/agent_endpoints/test_endpoints.py:1318
↓ 16 callersMethodseek
(self, offset: int, /)
litellm/images/utils.py:25
↓ 16 callersFunctionselect_data_generator
( response, user_api_key_dict: UserAPIKeyAuth, request_data: dict, request: Request | None = N
litellm/proxy/proxy_server.py:11091
↓ 16 callersFunctionserve
( machine: HostedMachine<P>, services: S, interceptors: H, encoder: A, observers: Option<O
litellm-rust/crates/host-http/src/driver.rs:48
↓ 16 callersFunctionserved_from_cache
(obj: object)
litellm/litellm_core_utils/hidden_params.py:130
↓ 16 callersMethodset_cache
(self, key: str, value: float, *, ttl: int)
litellm/proxy/auth/login_throttle.py:74
↓ 16 callersMethodsettings
A cached snapshot, replaced when a changeset changes a setting.
litellm/router_rust/core.py:1927
↓ 16 callersMethodsetup_database
(use_migrate: bool, use_v2_resolver: bool)
tests/unit/litellm_proxy_extras/test_litellm_proxy_extras_utils.py:1803
↓ 16 callersMethodsetup_uoft_guardrail
Setup guardrail with all UofT patterns (mimics the policy template sub-guardrail)
tests/unit/proxy/guardrails/guardrail_hooks/content_filter/test_uoft_policy_e2e.py:19
↓ 16 callersMethodspawn
Runs work that follows this request's post-call batch, such as mirroring settled totals into memory, on the request's runtime, from any thread. `flush
litellm-rust/crates/redis-store/src/request.rs:102
↓ 16 callersFunctionspend_log_row_from_payload
( payload: StandardLoggingPayload | SpendLogPayload, kwargs: Mapping[str, object] )
litellm/integrations/clickhouse/clickhouse_spend_logger.py:146
↓ 16 callersMethodspend_session
(self, response_id: str)
tests/integration/observability/test_otel_conversation_id.py:249
↓ 16 callersMethodstart
(self)
tests/integration/observability/test_straiker_v3_platform.py:80
↓ 16 callersMethodstop
(self)
tests/integration/_support/process.py:1135
↓ 16 callersMethodstop
(&self)
litellm-rust/crates/redis-testing/src/cluster.rs:145
↓ 16 callersFunctionstore
(deployment: &RedisDeployment)
litellm-rust/crates/redis-store/tests/rate_limits.rs:130
↓ 16 callersFunctionstore_user_oauth_credential
Persist an OAuth2 access token for a user+server pair. The payload is JSON-serialised and stored encrypted in the same ``credential_b64`` col
litellm/proxy/mcp_server/db.py:1790
↓ 16 callersFunctionsupports_function_calling
Check if the given model supports function calling and return a boolean value. Parameters: model (str): The model name to be checked.
litellm/utils.py:3389
↓ 16 callersMethodsuspended
(self, pid: int)
tests/integration/_support/process.py:343
↓ 16 callersFunctiontool_call
(city: str, **fields: JsonValue)
tests/integration/providers/_cache_control_marks_support.py:73
↓ 16 callersMethodtransform_list_input_items_request
( self, response_id: str, api_base: str, litellm_params: GenericLiteLLMParams,
litellm/llms/openai/responses/transformation.py:1307
↓ 16 callersMethodtransform_request_body
( cls, text: str, optional_params: dict, )
litellm/llms/bedrock/image_generation/amazon_stability1_transformation.py:99
↓ 16 callersMethodtransform_text_to_speech_request
(self, model, input, voice, optional_params, litellm_params, headers)
tests/unit/llms/custom_httpx/test_llm_http_handler.py:5983
↓ 16 callersMethodtransform_usage
( self, usage: ConverseTokenUsageBlock, reasoning_content: str | None = None,
litellm/llms/bedrock/chat/converse_transformation.py:2644
↓ 16 callersMethodtranslate_thinking_to_reasoning
Convert Anthropic thinking param to Responses API reasoning param. ``thinking.budget_tokens`` is bucketed via the shared ``r
litellm/llms/anthropic/messages/responses_adapters/transformation.py:539
↓ 16 callersMethodtry_short_circuit_search
Short-circuit web-search-only requests by executing the search directly. Claude Code sends web search as a separate, standalone /v1/
litellm/integrations/websearch_interception/handler.py:313
↓ 16 callersMethodupload
( self, path: str, *, headers: BaseModel, form: BaseModel, fil
tests/e2e/transport.py:97
↓ 16 callersMethoduseContextCallback
(e,r)
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 16 callersMethoduseControlledProp
(e,r)
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 16 callersFunctionwarm_tokenizer
(model: str)
tests/unit/litellm_core_utils/event_loop_lag.py:12
↓ 16 callersFunctionwarn_dropped_reasoning
( param: str, value: object, model: str | None, reason: str, *, drop_params_gated: bool )
litellm/litellm_core_utils/reasoning_effort_utils.py:30
↓ 16 callersFunctionwith_prompt_cache_breakpoint
A breakpoint the client already wrote on the block wins, TTL included.
litellm/litellm_core_utils/prompt_templates/prompt_cache_breakpoint_utils.py:22
↓ 16 callersFunctionwrite_backup
(record: BackupRecord, backup_path: Path | None = None)
litellm/proxy/client/cli/commands/up.py:72
↓ 15 callersFunctionL
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 15 callersFunctionM
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0cz1d0mv5g_q7.js:1
↓ 15 callersMethod__anext__
(self)
litellm/litellm_core_utils/streaming_handler.py:2533
↓ 15 callersMethod__init__
(self, callback_name: str)
tests/unit/test_utils.py:5097
↓ 15 callersMethod__init__
(self, content: str)
tests/unit/test_router/test_router.py:2642
↓ 15 callersFunction_answer
(marker: str)
tests/integration/observability/test_akto_logging_only.py:87
↓ 15 callersFunction_answer
(choice: str = "SIMPLE")
tests/unit/router_strategy/complexity_router/test_jev_classifier.py:433
↓ 15 callersMethod_apply_litellm_settings_db_values
(self, db_values: Mapping[str, SettingsJsonValue])
litellm/proxy/proxy_server.py:8874
← previousnext →3,801–3,900 of 202,479, ranked by callers