MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 46 callersMethodget_provider_chat_config
Returns the provider config for a given provider. Uses O(1) dictionary lookup for fast provider resolution. Python classes t
litellm/utils.py:10162
↓ 46 callersFunctionget_utc_datetime
()
litellm/utils.py:6674
↓ 46 callersFunctiongroup
( *ids: str, **params: object )
tests/unit/test_router/core/test_retries_health_characterization_cooldowns.py:40
↓ 46 callersFunctionjson_body
(response: httpx.Response)
tests/integration/_support/safeguards_rig.py:345
↓ 46 callersMethodmap_openai_params
( self, non_default_params: dict, optional_params: dict, model: str, d
litellm/llms/anthropic/chat/transformation.py:1976
↓ 46 callersFunctionp
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 46 callersFunctionregister
( gateway: Gateway, scenario: Scenario, provider: Provider, wire: Wire, *, backend: st
tests/integration/providers/_gemini_long_decode_support.py:178
↓ 46 callersMethodreset_budget_for_litellm_budget_table
Resets the spend a budget tier gates (end users, team members, keys, orgs, tags, model access groups) and advances the tier's
litellm/proxy/common_utils/reset_budget_job.py:966
↓ 46 callersFunctionuser_api_key_auth_builder
( request: Request, api_key: str, azure_api_key_header: str, anthropic_api_key_header: str | N
litellm/proxy/auth/user_api_key_auth.py:2445
↓ 45 callersFunction_make_access_group_record
( access_group_id: str = "ag-123", access_group_name: str = "test-group", description: str | None
tests/unit/proxy/management_endpoints/test_access_group_endpoints.py:25
↓ 45 callersFunction_mock_prisma
()
tests/unit/proxy/mcp_server/test_mcp_partial_update.py:33
↓ 45 callersMethod_pre_call
( self, rules: list[dict[str, str]], on_disallowed_action: Literal["block", "rewrite"]
tests/unit/proxy/guardrails/guardrail_hooks/test_tool_permission.py:1924
↓ 45 callersFunction_prisma_client_passthrough_managed
Return a MagicMock prisma_client with async db methods.
tests/unit/proxy/pass_through_endpoints/test_managed_id_rewriter.py:356
↓ 45 callersFunction_prompt_of
(body: dict[str, JsonValue])
tests/integration/providers/test_ollama_prompt_tools_wire.py:140
↓ 45 callersFunction_response
(status: str, with_usage: bool)
tests/unit/interactions/test_background_cost_polling.py:96
↓ 45 callersMethod_run_pre_call
( self, guardrail: ToolPermissionGuardrail, data: dict[str, object], call_type: CallTypesLiteral )
tests/unit/proxy/guardrails/guardrail_hooks/test_tool_permission.py:1939
↓ 45 callersFunction_server
(**kwargs)
tests/unit/proxy/mcp_server/outbound_credentials/test_adapter.py:79
↓ 45 callersMethodas_f64
(self)
litellm-rust/crates/redis-store/src/number.rs:22
↓ 45 callersFunctionchooseSelectOption
( user: Pick<ReturnType<typeof userEvent.setup>, "click">, trigger: HTMLElement, optionName: string | Re
ui/litellm-dashboard/tests/test-utils.tsx:56
↓ 45 callersMethodload_attachments
Load attachments from a configuration list. Args: attachments_config: List of attachment dictionaries from YAML.
litellm/proxy/policy_engine/attachment_registry.py:83
↓ 45 callersFunctionmake_spend_log_row
Factory for fake LiteLLM_SpendLogs rows.
tests/unit/proxy/utils/prisma_and_spend/conftest.py:296
↓ 45 callersFunctionowned_redis
( directory: Path, choose_port: Callable[[], int] = allocate_port, inherited: Mapping[str, str] =
tests/integration/_support/redis_process.py:135
↓ 45 callersFunctionr
(e)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 45 callersMethodrequest_head
Reads one request head, or `None` when the peer closed the connection first.
litellm-rust/crates/gateway-forward/tests/support/mod.rs:201
↓ 45 callersMethodsetOpen
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/2kd01k7_ccb0k.js:1
↓ 45 callersFunctionstr_to_bool
Converts a string to a boolean if it's a recognized boolean string. Returns None if the string is not a recognized boolean value. :param
litellm/secret_managers/main.py:132
↓ 45 callersFunctionteam_membership_reservation_cache_key
Cache key the pre-call budget reservation stores the same ``LiteLLM_TeamMembership`` row under. Deliberately not unified with ``team_membership_a
litellm/proxy/common_utils/user_api_key_cache.py:570
↓ 45 callersMethodupdate
(self, where=None, data=None)
tests/unit/proxy/common_utils/test_reset_budget_job.py:3761
↓ 45 callersFunctionupdate_mcp_server
Update a new mcp server record in the db Returns McpIdentifierConflict instead of writing when the update would put ``server_name``/``al
litellm/proxy/mcp_server/db.py:1303
↓ 45 callersMethodupsert_deployment
(self, deployment: Deployment)
litellm/router_rust/core.py:2288
↓ 45 callersFunctionwrite_self_signed_cert
Write a loopback certificate valid for `names` and 127.0.0.1; returns (cert path, key path).
tests/integration/_support/tls.py:13
↓ 44 callersFunction_posted_payload
(g: StraikerGuardrail)
tests/unit/proxy/guardrails/guardrail_hooks/test_straiker.py:73
↓ 44 callersFunction_resp
(body: dict, status_code: int = 200)
tests/unit/proxy/guardrails/guardrail_hooks/test_vigil_guard.py:30
↓ 44 callersFunction_rig
( gateway: Gateway, directory: Path, upstream: Callable[[Request], Reply], *, callbacks: S
tests/integration/observability/_openinference_support.py:746
↓ 44 callersFunction_simple_messages
()
tests/unit/llms/anthropic/messages/context_management/test_compact.py:61
↓ 44 callersFunction_wire_tx
Model the prisma seam the cleanup job actually uses. Every statement the job issues runs inside db.tx() so it can carry a SET LOCAL stat
tests/unit/proxy/test_spend_log_cleanup.py:54
↓ 44 callersMethodasync_get_cache
(self, key, **kwargs)
tests/unit/caching/test_dual_cache.py:598
↓ 44 callersMethodclone
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 44 callersFunctionconnect
(deployment: &RedisDeployment, namespace: &str, timeout: Duration)
litellm-rust/crates/redis-client/tests/support/mod.rs:39
↓ 44 callersMethodcount
(self, mount: str, name: str)
tests/e2e/provider_cache.py:540
↓ 44 callersFunctioncurrent_service_target
()
litellm/_internal_context.py:106
↓ 44 callersFunctiondaily_rows
(rows: Sequence[DailyRow], *, database_url: str | None = None)
tests/integration/_support/daily_activity.py:145
↓ 44 callersMethoddecode
(self, blob: str)
litellm/proxy/mcp_server/outbound_credentials/token_cache_codec.py:43
↓ 44 callersMethodfailures_this_minute
Failures counted against a deployment this minute (was ``get_deployment_failures_for_current_minute``).
litellm/router_api.py:1383
↓ 44 callersFunctiongenerate_key_fn
Generate an API key based on the provided data. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optio
litellm/proxy/management_endpoints/key_management_endpoints.py:2354
↓ 44 callersFunctionget_known_models_from_wildcard
( wildcard_model: str, litellm_params: LiteLLM_Params | None = None, routes_to_model: Callable[[st
litellm/proxy/auth/model_checks.py:494
↓ 44 callersFunctionget_request_base_url
Get the base URL for the request, considering X-Forwarded-* headers. Resolution order: ``PROXY_BASE_URL`` env var, then X-Forwarded-* when
litellm/proxy/mcp_server/oauth_utils.py:224
↓ 44 callersMethodlist_tools
(self, server_id: str | None = None)
tests/integration/_support/mcp.py:712
↓ 44 callersFunctionload_cli_token
Load the stored CLI credential, or None when this machine has none
litellm/litellm_core_utils/cli_token_utils.py:157
↓ 44 callersMethodparse
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 44 callersMethodread
(self)
litellm/proxy/common_utils/http_parsing_utils.py:42
↓ 44 callersMethodreceived
(self, request_nonce: str)
tests/integration/_support/safeguards_rig.py:275
↓ 44 callersFunctionresolve_supported_reasoning_efforts
None = nothing is known about this deployment, so it must not narrow its group; () = a known model that accepts no effort level, which correctly e
litellm/litellm_core_utils/reasoning_effort_capability.py:483
↓ 44 callersFunctionservice_target
Name what the datastore calls inside this block are for; ``None`` clears an inherited target.
litellm/_internal_context.py:97
↓ 44 callersMethodshutdown
(self)
tests/unit/integrations/langfuse/test_langfuse_sdk.py:914
↓ 44 callersMethodto_dict
Converts the ProxyException instance to a dictionary.
litellm/proxy/_types.py:3937
↓ 44 callersMethodtransform_responses_api_request_to_chat_completion_request
Transform a Responses API request into a Chat Completion request
litellm/responses/litellm_completion_transformation/transformation.py:1213
↓ 44 callersMethodtranslate_request
Translate a full Anthropic /v1/messages request dict to litellm.responses() / litellm.aresponses() kwargs. ``include_encrypt
litellm/llms/anthropic/messages/responses_adapters/transformation.py:596
↓ 44 callersFunctionuser_row
(user: str | None, api_key: str, date: str)
tests/integration/_support/daily_activity.py:239
↓ 44 callersMethodvalues
(self)
litellm/router_strategy/budget_limiter.py:118
↓ 44 callersMethodwait
( self, timeout_seconds: float, clock: Callable[[], float] = time.monotonic )
litellm/proxy/client/cli/commands/pkce_login.py:142
↓ 43 callersFunction_batch_writes
Writes that were committed to the DB, optionally narrowed to one op.
tests/unit/proxy/common_utils/test_reset_budget_job.py:261
↓ 43 callersFunction_guardrail
(**overrides)
tests/unit/proxy/guardrails/guardrail_hooks/test_repelloai.py:62
↓ 43 callersFunction_make_client
(auth: UserAPIKeyAuth)
tests/unit/proxy/memory/test_memory_endpoints.py:220
↓ 43 callersFunction_only_generate
(wire: Wire)
tests/integration/providers/test_ollama_prompt_tools_wire.py:133
↓ 43 callersFunction_patch_prisma
Patch the endpoint module's _require_prisma to return our fake.
tests/unit/proxy/memory/test_memory_endpoints.py:249
↓ 43 callersFunction_runtime_count_targets
(wire: Wire)
tests/integration/providers/test_bedrock_mantle_count_tokens_wire.py:336
↓ 43 callersFunction_text
()
tests/integration/providers/test_sagemaker_embedding_wire.py:147
↓ 43 callersMethodappend
(self, descriptor: RateLimitDescriptor, /)
litellm/proxy/hooks/parallel_request_limiter_v3.py:430
↓ 43 callersMethodas_dict
The runtime-updatable settings and routing groups as plain values (was ``get_settings``).
litellm/router_api.py:1281
↓ 43 callersMethodasync_log_success_event
(self, kwargs, response_obj, start_time, end_time)
tests/unit/integrations/arize/test_arize_utils.py:386
↓ 43 callersFunctiondelete_scenario
(handle: ScenarioHandle)
tests/integration/_support/upstream.py:889
↓ 43 callersFunctionencode_file_id_with_model
Encode a file/batch ID with model routing information. Format: <prefix><base64(litellm:<original_id>;model,<model_name>)> The result pre
litellm/proxy/openai_files_endpoints/common_utils.py:235
↓ 43 callersMethodget_azure_openai_client
( self, api_key: str | None, api_base: str | None, api_version: str | None = N
litellm/llms/azure/common_utils.py:734
↓ 43 callersMethodget_cache
( self, key: str, parent_otel_span: Span | None = None, local_only: bool = Fal
litellm/proxy/common_utils/user_api_key_cache.py:190
↓ 43 callersMethodget_error_class
(self, error_message, status_code, headers)
tests/unit/llms/base_llm/batches/test_transformation.py:84
↓ 43 callersFunctionget_server_prefix
Return the prefix for a server. When the short-prefix mode is enabled (``LITELLM_USE_SHORT_MCP_TOOL_PREFIX``) a three-character base62 ID is
litellm/proxy/mcp_server/utils.py:333
↓ 43 callersFunctionheader
( server: &str, name: &str, value: &str, )
litellm-rust/crates/gateway-mcp/src/configured.rs:166
↓ 43 callersFunctionis_model_cost_zero
Check if a model has zero cost (no configured pricing). Uses the router registry's group info to get pricing information. Args:
litellm/proxy/auth/auth_checks.py:560
↓ 43 callersFunctionmake_logger
Instantiate NewRelicLogger with NR agent calls mocked out.
tests/unit/integrations/newrelic/test_newrelic.py:56
↓ 43 callersFunctionopen_stream
(core: RouterCore, **request: object)
tests/unit/test_router/core/test_streaming_characterization_chat.py:50
↓ 43 callersFunctionredis_store
()
tests/integration/caching/response_cache_case.py:278
↓ 43 callersFunctionrequest_body
( endpoint: Endpoint, model: str, stream: bool, extra: Mapping[str, JsonValue] = NO_CACHE,
tests/integration/providers/_gemini_long_decode_support.py:232
↓ 43 callersFunctionsave_cli_token
Store a freshly minted credential. Reports where its secret material ended up, and why. The token file is what makes a keychain-backed credential
litellm/litellm_core_utils/cli_token_utils.py:165
↓ 43 callersMethodsend
(self)
tests/e2e/perf/setup/locustfile.py:240
↓ 43 callersMethodshould_run_guardrail
Returns True if the guardrail should be run on the event_type
litellm/integrations/custom_guardrail.py:1406
↓ 43 callersMethodtransform_request
Translate messages to anthropic format.
litellm/llms/anthropic/chat/transformation.py:2453
↓ 42 callersFunction_bridge_mock_request
(cookie: str | None = None)
tests/unit/proxy/mcp_server/test_discoverable_endpoints.py:5602
↓ 42 callersFunction_core
gpt (a, b), emb (e), the openai/* wildcard (w), team TA's ``pub`` (t1, internal name ``int``).
tests/unit/test_router/core/test_registry_characterization_writes.py:32
↓ 42 callersFunction_drive_stream
(handler, guardrail, chunks, request_route="/v1/chat/completions")
tests/unit/proxy/guardrails/guardrail_hooks/unified_guardrails/test_unified_guardrail.py:992
↓ 42 callersFunction_generate_reply
(text: str)
tests/integration/providers/test_ollama_prompt_tools_wire.py:79
↓ 42 callersFunction_kwargs
(payload=None)
tests/unit/integrations/otel/test_otel_v2_logger.py:120
↓ 42 callersFunction_make_team
(team_id, mcp_servers, *, org_id=None, tool_perms=None, members=("sso-user",), toolsets=None)
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:8832
↓ 42 callersFunction_openai_deployment
(scenario: Scenario, scenario_id: str, *, model: str = TRANSCRIBE_MODEL)
tests/integration/providers/test_realtime_transcription_guardrail_session_update.py:397
↓ 42 callersFunction_request_body
()
tests/unit/proxy/test_budget_reservation.py:83
↓ 42 callersFunction_validate_update_key_data
Validate permissions and constraints for key update.
litellm/proxy/management_endpoints/key_management_endpoints.py:3717
↓ 42 callersMethodadd_litellm_metadata_from_request_headers
Add litellm metadata from request headers Relevant issue: https://github.com/BerriAI/litellm/issues/14008
litellm/proxy/litellm_pre_call_utils.py:1949
↓ 42 callersMethodatranscription
(self, *args: object, **kwargs: object)
litellm/router_rust/core.py:2596
↓ 42 callersMethodbackend_to_client_send_messages
(self)
litellm/litellm_core_utils/realtime_streaming.py:1952
↓ 42 callersMethodbody
(self)
litellm/proxy/mcp_server/server.py:1685
← previousnext →1,001–1,100 of 202,479, ranked by callers