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
↓ 6 callers
Method
_get_model_param_value
Handles getting the value for the 'model' param from kwargs 1. If caching groups are set, then return the caching group as the model
litellm/caching/caching.py:488
↓ 6 callers
Method
_get_parsed_response
Parse AgentCore response based on content type. Args: raw_response: Raw HTTP response from AgentCore Returns:
litellm/llms/bedrock/chat/agentcore/transformation.py:471
↓ 6 callers
Method
_get_prisma_dir
Get the path to the migrations directory Set os.environ["LITELLM_MIGRATION_DIR"] to a custom migrations directory, to support baseli
litellm-proxy-extras/litellm_proxy_extras/utils.py:255
↓ 6 callers
Method
_get_spend_logs_row_count
Get the row count from LiteLLM_SpendLogs table using PostgreSQL system statistics.
litellm/proxy/utils.py:8193
↓ 6 callers
Function
_get_top_route_choice
Extract the top RouteChoice from SemanticRouter result. SemanticRouter.__call__ can return RouteChoice or List[RouteChoice].
litellm/proxy/guardrails/guardrail_hooks/semantic_guard/semantic_guard.py:168
↓ 6 callers
Function
_get_value
(obj: object, key: str)
litellm/proxy/spend_tracking/budget_reservation.py:1758
↓ 6 callers
Function
_get_vector_store_request_for_spend_logs_payload
If user does not want to store prompts and responses, then remove the content from the vector store request metadata
litellm/proxy/spend_tracking/spend_tracking_utils.py:2113
↓ 6 callers
Function
_given
(**kwargs)
tests/unit/proxy/router_entry_point_stubs.py:37
↓ 6 callers
Function
_global_env_var_server_request
(env_vars)
tests/unit/proxy/mcp_server/test_mcp_env_vars.py:1345
↓ 6 callers
Function
_gpt41
()
tests/integration/routing/test_ptu_shares.py:98
↓ 6 callers
Method
_gpt_turn
(reasoning_summary_deltas: list, encrypted_content: str | None = None)
tests/unit/llms/anthropic/messages/responses_adapters/test_responses_adapters_streaming_iterator.py:132
↓ 6 callers
Method
_grounding_frame
One server frame carrying grounding metadata, the way Live reports it.
tests/unit/proxy/pass_through_endpoints/test_vertex_ai_live_passthrough.py:397
↓ 6 callers
Function
_group
(access_group_id: str, skills: list[str], assigned_key_ids: list[str] | None = None)
tests/unit/proxy/anthropic_endpoints/test_claude_code_skill_access.py:146
↓ 6 callers
Function
_grouped_row
(*, prompt_tokens: str = "100", completion_tokens: str = "200", **dimensions: str)
tests/unit/proxy/management_endpoints/test_model_insights_endpoints.py:18
↓ 6 callers
Function
_guardrail
(litellm_params: LitellmParams)
tests/unit/proxy/guardrails/guardrail_hooks/test_conduct.py:124
↓ 6 callers
Function
_guardrail_entry
(*, start, end)
tests/unit/integrations/otel/test_otel_v2_logger.py:2918
↓ 6 callers
Function
_guardrail_g
( style: type[_CountedGuardrail] = ApplyGuardrailG, default_on: bool = False, run_in_parallel: bool = Fals
tests/unit/integrations/test_custom_guardrail_post_call_once.py:204
↓ 6 callers
Method
_handle
(self, response_body: dict, logging_obj: MagicMock)
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_tinyfish_passthrough_logging_handler.py:115
↓ 6 callers
Method
_handle_api_error_with_logging
Handle API errors with fail-open/fail-closed logic.
litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:840
↓ 6 callers
Method
_handle_failure
Log the failure event as an MLflow span. Note that this method is called *synchronously* unlike the success handler.
litellm/integrations/mlflow.py:98
↓ 6 callers
Method
_handle_provider_config_message
Process a backend message when a provider_config is set (transformed path).
litellm/litellm_core_utils/realtime_streaming.py:1761
↓ 6 callers
Method
_handle_sensitive_data_route_exception
Handle SensitiveDataRouteException by rerouting the current request to the target model and, when sticky_session_routing is enabled,
litellm/proxy/utils.py:3510
↓ 6 callers
Function
_handler_with_release
( started: asyncio.Event, release: asyncio.Event, )
tests/unit/proxy/middleware/test_admission_control_middleware.py:55
↓ 6 callers
Method
_has
(data: dict)
tests/unit/proxy/guardrails/test_deferred_guardrail_logging.py:210
↓ 6 callers
Function
_has_explicit_allowed_fails_policy_for_exception
True if this deployment has an explicit, deployment-level allowed_fails_policy entry matching *original_exception*'s type. `_is_cooldown_requ
litellm/router_utils/cooldown_handlers.py:250
↓ 6 callers
Function
_has_file_search_tool
Return True if any tool in the list has type 'file_search'.
litellm/responses/main.py:149
↓ 6 callers
Method
_has_guardrail_params_changed
Check if guardrail params or name have changed compared to in-memory version. Returns True if params/name changed or guardrail doesn'
litellm/proxy/guardrails/guardrail_registry.py:1069
↓ 6 callers
Function
_hashed
(key: str)
tests/integration/management/test_scim_group_delete.py:88
↓ 6 callers
Function
_headers
(call: _Call)
tests/integration/messages_endpoint/chat_bridge/test_chat_bridge_mid_stream_failure_bookkeeping_wire.py:130
↓ 6 callers
Function
_hello_chat_body
(model: str, tags: list[str] | None = None)
tests/e2e/router/test_auto_router_regressions_e2e.py:181
↓ 6 callers
Function
_holds_a_secret
Whether the record carries anything that would sign someone in as this user
litellm/litellm_core_utils/cli_token_utils.py:635
↓ 6 callers
Method
_hook_response
(router: "litellm.Router", request_kwargs: dict)
tests/unit/test_router/test_router.py:9524
↓ 6 callers
Method
_http
(self, client: AsyncHTTPHandler | None)
litellm/llms/opensandbox/sandbox/transformation.py:56
↓ 6 callers
Function
_http_error
(status_code: int, message: str)
litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:102
↓ 6 callers
Function
_http_request
(client_host: str | None = "10.1.2.3", headers: dict[str, str] | None = None)
tests/unit/proxy/auth/test_auth_exception_handler.py:801
↓ 6 callers
Function
_http_streams
(url: str, headers: dict[str, str])
tests/integration/mcp/test_proxy_mcp_e2e.py:453
↓ 6 callers
Function
_id_jag_server
(**overrides)
tests/unit/proxy/mcp_server/outbound_credentials/test_adapter.py:83
↓ 6 callers
Function
_identified_output_message
(item_id: str, text: str)
tests/unit/responses/litellm_completion_transformation/test_session_handler.py:1098
↓ 6 callers
Function
_identity
(label: str)
tests/integration/spend/test_key_metadata_recovery_dropped_connection.py:95
↓ 6 callers
Function
_identity_fetches
(requests: tuple[Request, ...], resource: str)
tests/integration/providers/test_azure_entra_token_reuse_wire.py:213
↓ 6 callers
Function
_image_edit_client
(monkeypatch, captured: Dict[str, Any])
tests/unit/proxy/image_endpoints/test_endpoints.py:134
↓ 6 callers
Method
_import_patches
(existing_servers, create_mock, mock_manager)
tests/unit/proxy/management_endpoints/test_mcp_management_endpoints.py:8250
↓ 6 callers
Function
_in_progress_interaction_kwargs
(reservation: dict)
tests/unit/proxy/hooks/test_proxy_track_cost_callback.py:1727
↓ 6 callers
Method
_increment_media_generation_metrics
Increment video-seconds and images-generated counters from ``standard_logging_payload["metadata"]["usage_object"]``. Video pr
litellm/integrations/prometheus.py:1983
↓ 6 callers
Function
_increment_of
(operation: ReservationOperation)
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:114
↓ 6 callers
Method
_increment_spend_in_current_window
Increment spend within existing budget window Runs once the budget start time exists in Redis Cache (on the 2nd and subsequent reque
litellm/router_strategy/budget_limiter.py:464
↓ 6 callers
Method
_inherit_with
(payload_credentials, **server_overrides)
tests/unit/proxy/management_endpoints/test_mcp_management_endpoints.py:2112
↓ 6 callers
Method
_initialize
(self, name: str, params: dict)
tests/unit/proxy/guardrails/test_guardrail_registry.py:1116
↓ 6 callers
Method
_input_to_messages
Normalise the ``input`` field of a ``response.create`` event to a list of Responses API message dicts.
litellm/responses/streaming_iterator.py:3310
↓ 6 callers
Function
_input_tokens
(router: Router, model: str)
tests/unit/proxy/spend_tracking/test_budget_reservation.py:463
↓ 6 callers
Function
_insert_spend_log
( conn: "psycopg.Connection[tuple[object, ...]]", request_id: str, day: str, table: str = "LiteLLM_SpendLo
tests/integration/database/migrations/test_request_log_indexes.py:110
↓ 6 callers
Function
_install
(counters: FakeSpendCounters)
tests/unit/proxy/test_budget_reservation.py:2224
↓ 6 callers
Function
_install_converted_stream_callbacks
(monkeypatch: pytest.MonkeyPatch)
tests/unit/test_utils.py:5462
↓ 6 callers
Function
_invalidation_message
(cache_key: str)
tests/unit/proxy/common_utils/test_auth_cache_invalidation_pubsub.py:156
↓ 6 callers
Function
_invoke_realtime_route
( data: dict, llm_router, route_type: str = "acreate_realtime_client_secret", )
tests/unit/proxy/test_route_llm_request.py:741
↓ 6 callers
Function
_invoke_sagemaker_chat
Drive one sagemaker_chat completion against an injected transport. A Bedrock API key short-circuits SigV4 inside `BaseAWSLLM._sign_request`, whic
tests/unit/llms/sagemaker/test_sagemaker_chat_transformation.py:270
↓ 6 callers
Function
_invoke_version
(cli_runner: CliRunner, *args: str)
tests/unit/proxy/client/cli/test_global_options.py:109
↓ 6 callers
Function
_io_counters_since
(router: Router, first_minute: str)
tests/unit/test_router/test_io_token_rate_limits.py:1335
↓ 6 callers
Function
_is_bounded
(tool_call_id: object)
tests/unit/llms/vertex_ai/gemini/test_thought_signature_in_tool_call_id.py:365
↓ 6 callers
Function
_is_discovery_probe
(request: Request)
tests/integration/management/test_prompt_management.py:47
↓ 6 callers
Function
_is_discovery_probe
(request: Request)
tests/integration/compatibility/test_prompt_management_routes.py:18
↓ 6 callers
Function
_is_namespace
(tool: JsonValue)
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:582
↓ 6 callers
Function
_is_object_dict
( value: object, )
litellm/responses/utils.py:85
↓ 6 callers
Method
_is_titan_v2_embed_model
True iff `model` refers to Amazon Titan Text Embeddings V2. Resolution order: 1. `model_prices_and_context_window.json` vi
litellm/llms/bedrock/files/transformation.py:825
↓ 6 callers
Function
_isolate_otlp_tls_env
(monkeypatch: pytest.MonkeyPatch)
tests/unit/integrations/test_opentelemetry.py:2400
↓ 6 callers
Function
_isolate_v2_otlp_tls_env
(monkeypatch: pytest.MonkeyPatch)
tests/unit/integrations/otel/test_otel_v2_components.py:1691
↓ 6 callers
Function
_isolated
(gateway: Gateway, config: Path, tmp_path: Path, database_url: str | None = None)
tests/integration/spend/test_spend_logs_metadata_fields.py:310
↓ 6 callers
Function
_item_create
(item: object)
tests/unit/litellm_core_utils/test_realtime_guardrails.py:76
↓ 6 callers
Method
_iter_sse_events
Yield the event-data dicts in one stream chunk. Handles both formats this stream can carry (see ``get_streaming_string_so_far``): raw
litellm/llms/anthropic/chat/guardrail_translation/handler.py:775
↓ 6 callers
Function
_job
(**overrides)
tests/unit/llms/mistral/batches/test_mistral_batches_transformation.py:33
↓ 6 callers
Method
_job
(api_key=sha256(b"sk-alice").hexdigest(), team_id=None, created_by="alice")
tests/unit/proxy/common_utils/test_check_batch_cost.py:4488
↓ 6 callers
Function
_job_record
(job: ActiveShadowEvalJob, target_type="key", target_id="key-hash")
tests/unit/integrations/test_shadow_eval_logger.py:80
↓ 6 callers
Function
_json
(response: httpx.Response)
tests/integration/providers/test_gemini_anyof_null_branches_wire.py:193
↓ 6 callers
Function
_json
(body: dict[str, JsonValue], status: int = 200)
tests/integration/spend/test_background_response_poll_retirement.py:79
↓ 6 callers
Function
_json_reply
(status: int, payload: Mapping[str, JsonValue])
tests/integration/providers/test_count_tokens_model_wire.py:140
↓ 6 callers
Function
_json_reply
(status: int, payload: Mapping[str, JsonValue])
tests/integration/providers/test_bedrock_mantle_count_tokens_wire.py:152
↓ 6 callers
Function
_json_request_body
(request: Request)
litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py:265
↓ 6 callers
Function
_json_safe
Copy `value` into something `json.dumps` accepts, dropping only what cannot cross. `request_data` carries live Python objects — an OpenTelem
litellm/proxy/guardrails/guardrail_hooks/alice/alice.py:327
↓ 6 callers
Function
_json_with_upstream_headers
(payload: dict)
tests/unit/llms/custom_httpx/test_llm_http_handler.py:5835
↓ 6 callers
Function
_kept_search
(*calls: tuple[str, str, Event])
tests/integration/providers/test_anthropic_tool_search_result_matrix_wire.py:272
↓ 6 callers
Function
_key
(scenario: Scenario, **limits: JsonValue)
tests/integration/management/test_batch_file_usage_caps_chaos.py:100
↓ 6 callers
Function
_key_metadata
(api_key_metadata: Mapping[str, KeyMetadataRow] | None, api_key: str | None)
litellm/proxy/management_endpoints/common_daily_activity.py:194
↓ 6 callers
Function
_key_metadata
(token: str)
tests/integration/management/test_batch_limit_metadata_admin_only.py:33
↓ 6 callers
Function
_key_with_models
(models: List[str])
tests/unit/proxy/auth/test_router_override_fallback_auth.py:27
↓ 6 callers
Function
_kill_switch_app
( role: LitellmUserRoles, http_client: _FakeKillSwitchClient, audit_log: _AuditLogRecorder | None
tests/unit/proxy/agent_endpoints/test_endpoints.py:1551
↓ 6 callers
Function
_kubernetes_pod_router
( discovery_enabled: bool | None = True, api_base: str = "http://vllm-headless.ns.svc.cluster.local:80
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:64
↓ 6 callers
Function
_kwargs
(wire: Wire)
tests/integration/sdk/test_responses_bridge_tool_search_sdk.py:56
↓ 6 callers
Function
_kwargs_with_connection
( token: str = "gho_user_token", github_host: str | None = "github.com", )
tests/unit/llms/github_copilot/test_per_user_auth.py:463
↓ 6 callers
Method
_langfuse
(host: str)
tests/unit/integrations/otel/test_otel_v2_destinations.py:4949
↓ 6 callers
Function
_latest_turn_config
(tmp_path: Path)
tests/integration/spend/test_spend_log_latest_turn.py:23
↓ 6 callers
Function
_limited_router
(**io_limits: int)
tests/unit/test_router/test_router_helper_utils.py:991
↓ 6 callers
Function
_limiter
(initial: int = 4, floor: int = 1, ceiling: int = 16)
tests/unit/integrations/test_adaptive_concurrency.py:11
↓ 6 callers
Method
_list_scope
What ``get_model_list`` lists beyond the deployments: the aliases (read here, where an alias item that is no mapping or lacks ``hidden`` raise
litellm/router_rust/surface/registry.py:1636
↓ 6 callers
Function
_listings
(peer: McpPeer)
tests/integration/mcp/test_mcp_credentials.py:341
↓ 6 callers
Method
_litellm_resource
The Resource every provider on this logger is built with, frozen at first use. ``Resource.create`` scans every installed distribution's entry
litellm/integrations/opentelemetry.py:524
↓ 6 callers
Function
_live_iterator
( logging_obj: LitellmLogging, upstream: object = None, background: bool = False )
tests/unit/responses/test_responses_streaming_iterator.py:464
↓ 6 callers
Function
_live_listing
()
tests/unit/test_lint_base_counts.py:307
↓ 6 callers
Function
_load_access_group
(access_group_id: str, *, check_db_only: bool = False)
litellm/proxy/agent_endpoints/auth/agent_access_groups.py:48
↓ 6 callers
Function
_load_beta_headers_config
Load the beta headers configuration. Uses caching to avoid repeated fetches/file reads. This function is called by all public API functi
litellm/anthropic_beta_headers_manager.py:182
↓ 6 callers
Function
_load_script
(name: str)
tests/unit/proxy/proxy_server/test_harness_smoke.py:134
← previous
next →
11,901–12,000 of 202,479, ranked by callers