MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 9 callersFunctionapply_runtime_general_settings_flags
Copy the UI settings that gate runtime behavior into ``general_settings``. Returns what was applied.
litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py:1869
↓ 9 callersMethodapply_to_env
Write the assembled URL(s) into ``os.environ``. Returns True iff this call set ``DATABASE_URL`` (token mint, or password auth that as
litellm/proxy/db/db_url_settings.py:625
↓ 9 callersFunctionapprox_equal
Within 1% or 1e-9 absolute - spend math, not exact float identity.
tests/e2e/quota_management/spend_tracking/cost_rows.py:104
↓ 9 callersMethodargs
(&self)
litellm-rust/crates/callbacks-legacy-python/src/call.rs:38
↓ 9 callersMethodas_str
(&self)
litellm-rust/crates/llms/src/bedrock/chat/converse_transformation.rs:87
↓ 9 callersMethodas_str
(&self)
litellm-rust/crates/redis-client/src/namespace.rs:10
↓ 9 callersFunctionasgi_server
( app: ASGIApp, *, before_stop: Callable[[], None] | None = None, port: int = 0, keepalive_seconds: int =
tests/integration/_support/asgi.py:17
↓ 9 callersFunctionassert_charged_once
(rig: BudgetRig, key: str, marker: str, response_id: str | None)
tests/integration/management/test_budget_reset_windows.py:244
↓ 9 callersFunctionassert_compact_rows
(key: str, texts: frozenset[str])
tests/integration/authorization/_responses_compact.py:363
↓ 9 callersFunctionassert_file_object
(file: FileObject, *, provider: str)
tests/e2e/batches/test_batches_e2e.py:222
↓ 9 callersFunctionassert_landed
(candidate: Gateway, team: str, users: Sequence[str])
tests/integration/_support/scim.py:164
↓ 9 callersMethodassert_only
(self, handler_name: str)
tests/unit/videos/test_main.py:81
↓ 9 callersMethodassert_only_copilot_discovery
(self, access_token: str)
tests/integration/_support/device_login.py:259
↓ 9 callersFunctionassert_provider_request
( received: tuple[Request, ...], endpoint: str, headers: Mapping[str, str], request: Mapping[s
tests/integration/translation/runner.py:70
↓ 9 callersFunctionassistant_from
(response: httpx.Response, stream: bool)
tests/integration/providers/_tool_search_support.py:288
↓ 9 callersMethodasync_delete_secret
Async function to delete a secret from AWS Secrets Manager Args: secret_name: Name of the secret to delete r
litellm/secret_managers/aws_secret_manager_v2.py:590
↓ 9 callersMethodasync_get_available_deployment
( self, model: str, messages: list[dict[str, str]] | None = None, # mutab
tests/unit/test_router/core/test_selection.py:640
↓ 9 callersMethodasync_get_azure_client
( self, api_key: str | None, api_base: str | None, api_version: str | None,
litellm/llms/azure/assistants.py:66
↓ 9 callersMethodasync_get_cache
(self, key: str)
litellm/proxy/mcp_server/outbound_credentials/dual_cache_token_backend.py:29
↓ 9 callersMethodasync_get_cache
(self, key: str, **kwargs: object)
tests/unit/proxy/hooks/test_model_max_budget_limiter.py:239
↓ 9 callersFunctionasync_io_token_pre_call_check
( dual_cache: DualCache, deployment: dict, parent_otel_span: Span | None = None, )
litellm/router_utils/pre_call_checks/io_token_rate_limit_check.py:658
↓ 9 callersMethodasync_moderation_hook
( self, data: dict[str, object], # mutable-ok: the hook writes the guarded messages back into
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:2746
↓ 9 callersMethodasync_post_agentic_loop_response_hook
( self, response: object, plan: AgenticLoopPlan, kwargs: dict )
litellm/integrations/code_interpreter_interception/handler.py:700
↓ 9 callersMethodasync_post_call_success_hook
Runs on response from LLM API call It can be used to reject a response Uses Enkrypt AI guardrails to check the response for
litellm/proxy/guardrails/guardrail_hooks/unified_guardrail/unified_guardrail.py:362
↓ 9 callersMethodasync_realtime
( self, model: str, websocket: "WebSocket", logging_obj: LiteLLMLogging,
litellm/llms/openai/realtime/handler.py:189
↓ 9 callersMethodasync_response_api_handler
Async version of the responses API handler. Uses async HTTP client to make requests.
litellm/llms/custom_httpx/llm_http_handler.py:3244
↓ 9 callersMethodasync_success_handler
(self, *args, **kwargs)
tests/unit/responses/test_streaming_iterator.py:1487
↓ 9 callersFunctionattach_github_copilot_user_session
( kwargs: dict[str, object], # mutable-ok: kwargs is the request mutation channel )
litellm/llms/github_copilot/per_user_auth.py:773
↓ 9 callersFunctionattach_object_permission_to_dict
Helper method to attach object_permission to a dictionary if object_permission_id is set. This function: 1. Checks if the dictionary has
litellm/proxy/management_helpers/object_permission_utils.py:36
↓ 9 callersFunctionauth_error
(model: str = "gpt-4o")
tests/unit/test_router/core/scripted_host.py:151
↓ 9 callersFunctionauto_router_availability
( *, others: Sequence[Mapping[str, object]], existing: Mapping[str, object] | None, candidate:
litellm/proxy/management_helpers/auto_router_availability.py:84
↓ 9 callersMethodawait_registered
Wait for every configured replica to list the server and return its row.
tests/e2e/mcp/mcp_client.py:260
↓ 9 callersFunctionaws_chunks
(events: Sequence[Event])
tests/integration/_support/anthropic_thinking.py:116
↓ 9 callersFunctionazure_deployment_image_generation_json_body
Build the JSON body for Azure OpenAI image generation POSTs. For ``.../openai/deployments/{deployment}/images/generations``, routing uses th
litellm/llms/azure/image_generation/http_utils.py:6
↓ 9 callersMethodazure_speech_passthrough_handler
( httpx_response: httpx.Response, response_body: Mapping[str, object] | Sequence[object] | Non
litellm/proxy/pass_through_endpoints/llm_provider_handlers/azure_speech_passthrough_logging_handler.py:122
↓ 9 callersFunctionbackend
(model: str, identity: str, *, stream: bool, text: str | None = None)
tests/integration/messages_endpoint/safeguards/test_safeguard_results_bridges.py:51
↓ 9 callersMethodbackend
(&self)
litellm-rust/crates/python-bridge/src/secrets/runtime.rs:33
↓ 9 callersFunctionbatch_error
(status_code: int, message: str)
litellm/proxy/batches_endpoints/litellm_executed_batches.py:329
↓ 9 callersFunctionbedrock_capability_model
The model id to look capabilities up by: the deployment's ``base_model`` for an application inference profile ARN, since the ARN names no model, e
litellm/llms/bedrock/common_utils.py:1211
↓ 9 callersFunctionbedrock_request_needs_converse
Whether a request on the native Chat Completions route must still be served by Converse. The route is the default for GPT 5.6 and newer (``bedroc
litellm/llms/bedrock/common_utils.py:1393
↓ 9 callersMethodbedrock_sse_wrapper
Bedrock invoke does not return SSE formatted data. This function is a wrapper to ensure litellm chunks are SSE formatted. Bedrock's
litellm/llms/bedrock/messages/invoke_transformations/anthropic_claude_transformation.py:944
↓ 9 callersFunctionbilling_periods_starting_within
Monthly periods anchored on `anchor`'s day of month whose start lies inside [start_date, end_date].
litellm/proxy/spend_tracking/subscription_billing_periods.py:38
↓ 9 callersFunctionbody
(ttl="5m", texts=("private cache prefix",))
tests/unit/proxy/hooks/test_prompt_cache_observer.py:24
↓ 9 callersFunctionbody_of
(request: Request)
tests/integration/routing/_reasoning_effort_levels_support.py:61
↓ 9 callersFunctionbudget_window_seconds
(started_at: float, budget_duration: str)
litellm/router_strategy/budget_limiter.py:145
↓ 9 callersFunctionbuild
(progress: Progress)
litellm/proxy/management_endpoints/roi_observed_endpoints.py:351
↓ 9 callersFunctionbuild_bulk_upsert
The single statement writing one merged batch, plus its positional arguments.
litellm/proxy/db/daily_spend_bulk_upsert.py:186
↓ 9 callersFunctionbuild_inference
(config: &Config)
litellm-rust/crates/gateway/src/lib.rs:31
↓ 9 callersFunctionbuild_metric_payload
Aggregates records into one Metric API envelope for the flush window.
litellm/integrations/newrelic/newrelic_metrics.py:176
↓ 9 callersFunctionbuild_otel_v2_logger
( config: OpenTelemetryV2Config, callback_name: str | None = None, tracer_provider: TracerProvider
litellm/integrations/otel/logger.py:1090
↓ 9 callersFunctionbuild_safeguards_evaluator
( *, safeguards: object, messages: Sequence[Mapping[str, object]], litellm_metadata: Mapping[s
litellm/llms/anthropic/messages/safeguards.py:284
↓ 9 callersFunctionbuild_tool_usage_transaction
None when the request invoked no tools. Realtime sessions carry invoked tools in kwargs["realtime_tool_calls"] (OpenAI tool_calls shape) rather th
litellm/proxy/db/spend_log_tool_index.py:133
↓ 9 callersMethodbuild_url
Assemble the connection URL, inserting ``token`` verbatim as the password. User, database name, and schema are normalized rather than encoded
litellm/proxy/db/token_auth.py:101
↓ 9 callersFunctionbuild_vertex_schema
This is a modified version of https://github.com/google-gemini/generative-ai-python/blob/8f77cc6ac99937cd3a81299ecf79608b91b06bbb/google/generati
litellm/llms/vertex_ai/common_utils.py:836
↓ 9 callersFunctionbundled_codex_stock
()
litellm/proxy/common_utils/codex_catalog_source.py:61
↓ 9 callersFunctionc
({code:e,copyKey:t,title:r,className:l=""})
litellm/proxy/_experimental/out/_next/static/chunks/2k-fkubkt19cc.js:26
↓ 9 callersFunctionc
(e,s,t,i)
litellm/proxy/_experimental/out/_next/static/chunks/2jxpy6eth1zvy.js:1
↓ 9 callersFunctioncache
(endpoint: &str)
litellm-rust/crates/cache-s3/tests/support/mod.rs:43
↓ 9 callersMethodcache_file_name
(self, base_point: str)
scripts/lint_base_counts.py:66
↓ 9 callersFunctioncalculate_img_tokens
Calculate the number of tokens for an image. Args: data (str): The URL or base64 encoded string of the image. mode (Literal[
litellm/litellm_core_utils/token_counter.py:364
↓ 9 callersFunctioncall
(server: RecordingServer, *, asynchronous: bool = True, **kwargs: object)
tests/test_litellm_rust/chat_completions/data.py:18
↓ 9 callersFunctioncall
(credential: str)
tests/unit/proxy/test_admin_mcp.py:256
↓ 9 callersFunctioncall
(index: int)
tests/e2e/quota_management/spend_tracking/spend_reconciliation.py:64
↓ 9 callersFunctioncall_options
(asynchronous: bool)
litellm-rust/crates/host-python/tests/support/mod.rs:67
↓ 9 callersMethodcall_types
(self)
tests/unit/test_router/core/test_parity_cooldown_service_model.py:572
↓ 9 callersMethodcan_team_member_execute_key_management_endpoint
Main handler for checking if a team member can update a key
litellm/proxy/management_helpers/team_member_permission_checks.py:57
↓ 9 callersFunctioncast_exception_status_to_int
(exception_status: object)
litellm/router_utils/cooldown_handlers.py:819
↓ 9 callersMethodcatch
(e)
litellm/proxy/_experimental/out/_next/static/chunks/1f2vcab0yti03.js:2
↓ 9 callersFunctionchat_body
(group: str, marker: str, **extra: JsonValue)
tests/integration/routing/test_payment_required_mapping.py:107
↓ 9 callersMethodcheck
()
tests/integration/mcp/test_proxy_mcp_e2e.py:1048
↓ 9 callersFunctioncheck_complete_credentials
if 'api_base' in request body. Check if complete credentials given. Prevent malicious attacks. Supplying an ``api_key`` is necessary but not
litellm/proxy/auth/auth_utils.py:141
↓ 9 callersFunctioncheck_freshness
(root: Path, *, now: datetime, profile: MatchProfile = "legacy")
tests/e2e/fixture_bundle.py:262
↓ 9 callersMethodcheck_user_access_to_response_id
( self, response_id_user_id: str | None, response_id_team_id: str | None, user
litellm/proxy/hooks/responses_id_security.py:266
↓ 9 callersFunctionchunk
(choice_index: int, tool_call: ChatCompletionDeltaToolCall)
tests/unit/litellm_core_utils/test_streaming_chunk_builder_utils.py:1412
↓ 9 callersMethodchunk_parser
(self, chunk: dict)
litellm/llms/ollama/completion/transformation.py:571
↓ 9 callersFunctionclaims
(**overrides: object)
tests/unit/proxy/agent_endpoints/test_managed_identity.py:32
↓ 9 callersFunctionclassify
(category: str, changed: list[str])
tests/unit/test_circleci_path_filter.py:32
↓ 9 callersFunctionclaude_backend
(message: Mapping[str, JsonValue], delta_fields: Mapping[str, JsonValue])
tests/integration/messages_endpoint/safeguards/test_safeguard_results_synthesized_streams.py:167
↓ 9 callersFunctionclearTokenCookies
()
ui/litellm-dashboard/src/utils/cookieUtils.ts:27
↓ 9 callersMethodclient
(self, guardrail: str, attempts: int = 1)
tests/integration/providers/test_bedrock_passthrough_aws_errors.py:139
↓ 9 callersFunctionclient_for
( worker: Worker, *, role: str | None = None, logged_in: bool = True, email: str = "alice@example.com" )
tests/unit/enterprise/proxy/test_liteadmin.py:43
↓ 9 callersFunctioncloneShallow
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 9 callersMethodclose
(self)
litellm/proxy/roi_calculator/gitlab.py:127
↓ 9 callersMethodclose
(self, code: int = 1000, reason: str | None = None)
tests/unit/litellm_core_utils/test_realtime_errors.py:77
↓ 9 callersMethodclose
(self)
tests/unit/llms/azure/test_azure_common_utils.py:2360
↓ 9 callersFunctionclose_litellm_async_clients
Close all cached async HTTP clients to prevent resource leaks. This function iterates through all cached clients in litellm's in-memory cach
litellm/llms/custom_httpx/async_client_cleanup.py:9
↓ 9 callersMethodclosed
Resolves once the peer closes the connection, discarding anything it still sends.
litellm-rust/crates/gateway-forward/tests/support/mod.rs:300
↓ 9 callersFunctioncodex_model_list_body
The `/v1/models?client_version=...` body, logging the models Codex's byte limit left out. `stock` and `instructions` are the requesting Codex rele
litellm/proxy/common_utils/codex_model_catalog.py:704
↓ 9 callersMethodcollect
(self)
tests/integration/observability/test_langtrace_delivery.py:204
↓ 9 callersMethodcollect_and_combine_usage_from_realtime_stream_results
Collect and combine usage from realtime stream results
litellm/cost_calculator.py:3547
↓ 9 callersFunctioncomplete
(request: ChatCompletionsRequest<'_>)
litellm-rust/crates/inference-chat/tests/chat_completions.rs:19
↓ 9 callersMethodcompletions_stream
Create a streaming chat completion. Args: model (str): The model to use for completion messages (List[Dict[s
litellm/proxy/client/chat.py:125
↓ 9 callersFunctionconnect
( config: &Config, lookup: &dyn Lookup, resources: &Resources, )
litellm-rust/crates/gateway/src/redis/mod.rs:75
↓ 9 callersMethodconnections
(self)
tests/integration/_support/wire.py:91
↓ 9 callersFunctionconstruct_database_url_from_env_vars
Construct a DATABASE_URL from individual environment variables. Returns: Optional[str]: The constructed DATABASE_URL or None if requi
litellm/proxy/utils.py:10007
↓ 9 callersFunctioncontent_to_text
Collapse a message ``content`` (str or list-of-parts) to plain text. For the multimodal list shape, joins ``{type: "text", text: ...}`` parts
litellm/proxy/guardrails/guardrail_hooks/content_text.py:21
↓ 9 callersFunctionconverse_body
(litellm_params_value, optional_params=None)
tests/unit/llms/bedrock/test_request_metadata.py:43
↓ 9 callersFunctioncosts
(expected: float)
tests/integration/spend/_background_responses.py:259
↓ 9 callersFunctioncount
(model: str, api_key: str, body: Mapping[str, JsonValue])
litellm/proxy/common_utils/cache_aware_routing.py:302
↓ 9 callersFunctioncount
(ask: Ask)
litellm-rust/crates/coroutine/tests/coroutine.rs:42
← previousnext →7,901–8,000 of 202,479, ranked by callers