Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BerriAI/litellm
/ functions
Functions
202,479 in github.com/BerriAI/litellm
⨍
Functions
202,479
◇
Types & classes
26,341
↳
Endpoints
5,595
↓ 11 callers
Function
_drain_streaming_hook
( guardrail: BedrockGuardrail, request_data: dict[str, object] | None = None )
tests/unit/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py:3129
↓ 11 callers
Function
_eden_video
Live `/v3/videos` body: OpenAI's video object plus Eden's top-level `provider` and `cost`.
tests/unit/llms/edenai/videos/test_edenai_video_transformation.py:28
↓ 11 callers
Function
_enforce_upperbound_key_params
Enforce upperbound limits on key parameters. For key generation (fill_defaults=True): fills None values with upperbound defaults. For ke
litellm/proxy/management_endpoints/key_management_endpoints.py:1344
↓ 11 callers
Method
_ensure_access_token_async
Async version of _ensure_access_token
litellm/llms/vertex_ai/vertex_llm_base.py:1155
↓ 11 callers
Function
_evaluate
(row: UserSpendRow, args: SlackAlertingArgs, thresholds: bool = True, anomalies: bool = True)
tests/unit/integrations/SlackAlerting/test_user_spend_alerts.py:35
↓ 11 callers
Function
_existing_row
(auth_type: str, credentials: dict | None = None)
tests/unit/proxy/mcp_server/test_mcp_partial_update.py:528
↓ 11 callers
Function
_expected
(gateway: Gateway, model: str, location: _Location)
tests/integration/spend/test_vertex_regional_uplift_spend.py:153
↓ 11 callers
Function
_expected_body
(endpoint: Endpoint, *contents: Mapping[str, JsonValue])
tests/integration/providers/test_gemini_thinking_replay_wire.py:499
↓ 11 callers
Function
_expected_generation
(route: respx.Route, fixture_name: str, trace_id: str)
tests/unit/integrations/langfuse/test_langfuse.py:100
↓ 11 callers
Function
_exporting_provider
()
tests/unit/integrations/otel/test_otel_v2_mount.py:366
↓ 11 callers
Method
_extract_tags
(self, log: StandardLoggingPayload)
litellm/integrations/datadog/datadog_cost_management.py:173
↓ 11 callers
Method
_extract_text_from_messages
Extract text content from the last user message for routing. Handles tool-call conversations (where the last message may be an
litellm/router_strategy/auto_router/auto_router.py:183
↓ 11 callers
Function
_failure_information
(call_id: str)
tests/integration/observability/test_bedrock_error_request_id.py:165
↓ 11 callers
Function
_failure_tracking_logging_obj
()
tests/unit/responses/test_streaming_iterator.py:286
↓ 11 callers
Function
_fake_model_info
(**fields: object)
tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py:1639
↓ 11 callers
Function
_fake_redis
A RedisCache backed by a fakeredis client; two DualCaches can share it.
tests/unit/proxy/credential_endpoints/test_user_provider_credentials.py:50
↓ 11 callers
Function
_fallback_router
( fallbacks: list[dict[str, list[str]]] | None = None, default_fallbacks: list[str] | None = None, )
tests/unit/test_router/test_router_fallbacks.py:607
↓ 11 callers
Function
_fallback_unavailable_response
(status_code: int = 503)
tests/unit/test_router/test_router_fallbacks.py:655
↓ 11 callers
Method
_fan_out
(self)
tests/unit/integrations/otel/test_otel_v2_destinations.py:4080
↓ 11 callers
Function
_final_response
( events: Sequence[ResponsesAPIStreamingResponse], terminal: str = "response.completed" )
tests/unit/responses/mcp/test_aresponses_api_with_mcp.py:2533
↓ 11 callers
Function
_finish
( rig: Rig, gateway: Gateway, request: pytest.FixtureRequest, *, secrets: Sequence[Canary]
tests/integration/security/test_stored_config_slots.py:179
↓ 11 callers
Function
_finish
(index: int)
tests/integration/routing/test_vllm_passthrough_stream_relay.py:78
↓ 11 callers
Function
_fire_mcp_tool_call_logging
Fire post-call logging for an executed MCP tool call, returning the result to send. The returned result is what the caller must forward to the cl
litellm/proxy/mcp_server/operations.py:2750
↓ 11 callers
Function
_flags
(value: JsonValue)
tests/integration/routing/test_model_capability_flags.py:83
↓ 11 callers
Function
_folded_format
(delivery: _Delivery)
tests/integration/providers/test_vertex_anthropic_structured_output_wire.py:628
↓ 11 callers
Method
_forward_client_to_bedrock
Forward messages from client WebSocket to Bedrock stream. Returns once the client is gone; provider failures (input stream or readiness) prop
litellm/llms/bedrock/realtime/handler.py:820
↓ 11 callers
Function
_fresh_cache
()
tests/unit/proxy/ui_crud_endpoints/test_latest_release_endpoints.py:110
↓ 11 callers
Function
_gate_verdict
(authorizer: _FrameAuthorizer, model: str)
tests/unit/proxy/test_openai_ws_passthrough_routes.py:408
↓ 11 callers
Function
_gen
()
tests/unit/llms/anthropic/messages/responses_adapters/test_responses_adapters_streaming_iterator.py:41
↓ 11 callers
Function
_generate_key_and_get_persisted_row
(data: GenerateKeyRequest, mock_insert_data)
tests/unit/proxy/management_endpoints/test_key_management_endpoints.py:19951
↓ 11 callers
Function
_generated
(gateway: Gateway, path: str, body: Mapping[str, JsonValue], beta: str | None)
tests/integration/providers/test_vertex_anthropic_inline_tools_beta_wire.py:161
↓ 11 callers
Method
_get_cache_logic
Common 'get_cache_logic' across sync + async redis client implementations
litellm/caching/redis_cache.py:1551
↓ 11 callers
Method
_get_email_params
Get common email parameters used across different email sending methods Args: email_event: Type of email event
enterprise/litellm_enterprise/enterprise_callbacks/send_emails/base_email.py:711
↓ 11 callers
Method
_get_guardrail_overhead_seconds
Seconds of additive guardrail time (pre/post-call only) on the payload. during_call guardrails run concurrently with the LLM call, so their
litellm/integrations/prometheus.py:1538
↓ 11 callers
Function
_get_marketplace_over_http
( headers: Mapping[str, str] = MappingProxyType({}), params: Mapping[str, str] = MappingProxyType({}) )
tests/unit/proxy/anthropic_endpoints/test_claude_code_marketplace.py:1021
↓ 11 callers
Function
_get_session_id_for_spend_log
Resolve the session id for the spend log row: `omit` honors only metadata.session_id, batch sessions outrank everything, then the conversation id
litellm/proxy/spend_tracking/spend_tracking_utils.py:1063
↓ 11 callers
Method
_get_span_context
(self, kwargs, default_span: Span | None = None)
litellm/integrations/opentelemetry.py:3071
↓ 11 callers
Method
_get_tracer_with_dynamic_headers
Create (or reuse) a tracer whose OTLP headers come from a per-request credential set.
litellm/integrations/opentelemetry.py:1268
↓ 11 callers
Function
_group
( name: str, models: list[str], strategy: str, **extra: object )
tests/unit/test_router/core/test_selection_characterization_groups.py:37
↓ 11 callers
Method
_handle_failure
(self, kwargs, response_obj, start_time, end_time)
litellm/integrations/opentelemetry.py:2195
↓ 11 callers
Method
_handle_non_streaming_allm_passthrough_route
( self, response: _UpstreamHttpResponse, proxy_logging_obj: "ProxyLogging", us
litellm/proxy/common_request_processing.py:4229
↓ 11 callers
Function
_hash
(key: str)
tests/integration/authorization/test_jwt_auto_register_map_existing_key.py:32
↓ 11 callers
Function
_header
(call: dict[str, object], name: bytes)
tests/integration/mcp/test_mcp_credentials.py:42
↓ 11 callers
Method
_http_server
(self, **overrides: Any)
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:11613
↓ 11 callers
Function
_identity
()
tests/integration/security/test_hide_secrets_tool_compatibility.py:35
↓ 11 callers
Function
_increment
(increment_value: float)
tests/unit/router_strategy/test_budget_limiter_hotpath.py:422
↓ 11 callers
Method
_increment_remaining_budget_metrics
( self, user_api_team: str | None, user_api_team_alias: str | None, user_api_k
litellm/integrations/prometheus.py:2200
↓ 11 callers
Function
_index_key
``value`` as a key of the router's name and id indexes: a dict lookup hashes any key and only a string can match, so another hashable key finds no
litellm/router_rust/surface/registry.py:579
↓ 11 callers
Function
_index_oids
index name -> oid for every index on the SpendLogs parent or one of its partitions; a rebuild changes the oid.
tests/integration/database/migrations/test_request_log_indexes.py:251
↓ 11 callers
Method
_init_non_llm_configs
Initialize non-LLM configs eg. MCP tools, vector stores, etc.
litellm/proxy/proxy_server.py:7650
↓ 11 callers
Method
_initialize
( self, mode: str | list[str] | Mode, scope: LoggingOnlyScope | None, callback
tests/unit/proxy/guardrails/test_guardrail_registry.py:1269
↓ 11 callers
Function
_invoke_card_stream
()
tests/unit/llms/bedrock/passthrough/guardrail_translation/test_handler.py:3333
↓ 11 callers
Function
_issuer_anchored_oauth_server
(issuer: str | None = "https://idp.example.com")
tests/unit/proxy/mcp_server/test_discoverable_endpoints.py:4854
↓ 11 callers
Function
_json_login
(client, path, username="admin", password="wrong")
tests/unit/proxy/proxy_server/test_routes_login_sso.py:533
↓ 11 callers
Function
_json_object
(value: object)
litellm/responses/litellm_completion_transformation/compaction_items.py:24
↓ 11 callers
Function
_judge_router
Router double, injected via router_provider, that serves the judge model and returns a canned verdict.
tests/unit/proxy/guardrails/test_llm_as_a_judge.py:181
↓ 11 callers
Function
_key
(scenario: Scenario, team_id: str, user_id: str, model: str)
tests/integration/authorization/test_responses_id_ownership.py:99
↓ 11 callers
Function
_key_restricted_to
(*models: str)
tests/unit/proxy/batches_endpoints/test_endpoints.py:3278
↓ 11 callers
Function
_kyma_chat_body
(usage: dict[str, object])
tests/unit/llms/openai_like/test_kyma_provider.py:38
↓ 11 callers
Function
_list_files_as_test_user
(path: str, params: dict[str, str], headers: dict[str, str])
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:6299
↓ 11 callers
Function
_load_endpoints_config
Load the endpoints configuration from JSON file.
litellm/containers/endpoint_factory.py:42
↓ 11 callers
Function
_local
(gateway: Gateway, provider: SharedProvider, parts: Sequence[JsonValue])
tests/integration/messages_endpoint/providers/anthropic/test_pdf_document_count_tokens_wire.py:73
↓ 11 callers
Function
_logged_once
(call_id: str)
tests/integration/providers/test_malformed_tools_wire.py:555
↓ 11 callers
Function
_logging_obj_with_reservation
(reservation: dict)
tests/unit/interactions/test_background_cost_polling.py:69
↓ 11 callers
Function
_make_audit_log
( action: str = "created", table_name: LitellmTableNames = LitellmTableNames.TEAM_TABLE_NAME, )
tests/unit/proxy/management_helpers/test_audit_log_callbacks.py:33
↓ 11 callers
Function
_make_client
Build a minimal stand-in for PrismaClient that exposes only the surface `call_with_db_reconnect_retry` actually pokes at.
tests/unit/proxy/db/test_exception_handler_reconnect_retry.py:21
↓ 11 callers
Function
_make_gemma_vertex_response
Build a minimal but valid Vertex Gemma `predictions` response body.
tests/unit/llms/vertex_ai/vertex_gemma_models/test_vertex_gemma_transformation.py:36
↓ 11 callers
Function
_make_guardrail
()
tests/unit/proxy/utils/proxy_logging/test_guardrail_pipeline.py:103
↓ 11 callers
Function
_make_guardrail
()
tests/unit/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py:1956
↓ 11 callers
Function
_make_iterator
(initial_chunks, max_agentic_loops: int | str | None = None)
tests/unit/responses/mcp/test_mcp_streaming_iterator.py:110
↓ 11 callers
Method
_make_iterator
Create a minimal LiteLLMCompletionStreamingIterator for testing.
tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py:4266
↓ 11 callers
Function
_make_logging_obj
()
tests/unit/responses/test_responses_streaming_iterator.py:89
↓ 11 callers
Function
_make_mock_proxy_config
()
tests/unit/proxy/management_endpoints/test_config_override_endpoints.py:44
↓ 11 callers
Function
_make_module_with_source
(tmp_path, src: str, name: str)
tests/unit/test_vcr_classification.py:200
↓ 11 callers
Method
_make_proxy_logging
(self, mock_hook)
tests/unit/llms/bedrock/passthrough/guardrail_translation/test_handler.py:919
↓ 11 callers
Function
_make_routing_ctx
The candidates come in as healthy_deployments, so the router itself configures none.
tests/unit/router_strategy/test_router_tag_regex_routing.py:107
↓ 11 callers
Function
_make_server
( server_id: str, max_concurrent_requests: Optional[int], auth_type: MCPAuth = MCPAuth.none, )
tests/unit/proxy/mcp_server/test_mcp_max_concurrent_requests.py:99
↓ 11 callers
Function
_mapped_token
(claim_name: str, claim_value: str)
tests/integration/authorization/test_jwt_auto_register_map_existing_key.py:97
↓ 11 callers
Function
_mappings
(value: JsonValue)
tests/unit/llms/base_llm/chat/test_provider_chat_translation.py:626
↓ 11 callers
Method
_marked_user_turns
(count: int)
tests/unit/integrations/test_anthropic_cache_control_hook.py:3183
↓ 11 callers
Function
_membership_user_ids
(team_id: str)
tests/integration/management/test_team_delete_large_membership.py:89
↓ 11 callers
Function
_merge_query_params_into_data
For GET/DELETE endpoints that cannot carry a JSON body, read a JSON-encoded ``litellm_params_template`` query parameter and merge its con
litellm/proxy/google_endpoints/agents_endpoints.py:75
↓ 11 callers
Function
_merge_token_tags
Zip transformed rows with the row-aligned source and add token keys to each row's Tags; degrades to unchanged on any mismatch.
litellm/integrations/ternary/export_engine.py:93
↓ 11 callers
Function
_mock_guardrail
(returned_texts)
tests/unit/llms/gemini/google_genai/guardrail_translation/test_google_genai_guardrail_handler.py:22
↓ 11 callers
Function
_mock_prisma
()
tests/unit/proxy/management_endpoints/test_jwt_key_mapping.py:416
↓ 11 callers
Method
_model_has_route_prefix
Whether a route prefix (e.g. ``mantle/``) appears as a leading path segment. A route token is only valid at the start of the model id or imme
litellm/llms/bedrock/common_utils.py:2190
↓ 11 callers
Function
_model_response
(content: str)
tests/unit/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py:2473
↓ 11 callers
Function
_models
Distinct body.model values, mirroring how the rate limiter collects the models from a streamed batch file before the access check.
tests/unit/proxy/hooks/test_batch_file_validation.py:18
↓ 11 callers
Function
_new_model
( scenario: Scenario, name: str, *, model: str = "openai/gpt-4o-mini", model_info: Mapping
tests/integration/compatibility/test_codex_model_catalog.py:187
↓ 11 callers
Function
_object_list
Return ``value`` as an opaque sequence when it is a list.
litellm/proxy/guardrails/guardrail_hooks/tool_permission.py:114
↓ 11 callers
Function
_oci_tool_params
(model, tools, tool_choice, drop_params)
tests/unit/llms/oci/chat/test_oci_chat_transformation.py:1995
↓ 11 callers
Function
_ocr_response
(model: str, pages_processed: int, credits: float | None = None)
tests/unit/test_cost_calculator.py:5833
↓ 11 callers
Function
_only_request
(wire: Wire)
tests/integration/sdk/test_openai_sdk_client_sessions_wire.py:88
↓ 11 callers
Function
_openai_client
(gateway: Gateway)
tests/integration/providers/test_ollama_prompt_tools_wire.py:190
↓ 11 callers
Function
_openai_responses_response
(model, output, usage=None, tools=None)
tests/unit/litellm_core_utils/llm_cost_calc/test_tool_call_cost_tracking.py:552
↓ 11 callers
Function
_opened_principal
(payload)
tests/unit/proxy/mcp_server/test_gateway_dcr_flow.py:1045
↓ 11 callers
Function
_opening
(call: _Call, arguments: str)
tests/integration/messages_endpoint/chat_bridge/test_chat_bridge_multi_tool_call_blocks_wire.py:167
↓ 11 callers
Function
_optional_attr
(obj: object, name: str)
litellm/llms/anthropic/messages/adapters/streaming_iterator.py:91
↓ 11 callers
Function
_outcome_from_rpc
(response: httpx.Response)
tests/integration/_support/mcp.py:631
↓ 11 callers
Function
_outgoing_messages
( model: str, messages: list[AllMessageValues], optional_params: dict[str, object], drop_params: bool = Fa
tests/unit/llms/databricks/chat/test_databricks_chat_transformation.py:607
← previous
next →
5,901–6,000 of 202,479, ranked by callers