MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 7 callersMethod_drop_unsupported_tools
DeepSeek's /chat/completions only accepts tools of type "function". Requests bridged from /v1/responses can carry responses-API-nati
litellm/llms/deepseek/chat/transformation.py:255
↓ 7 callersFunction_drops_params
(kwargs: Mapping[str, object])
litellm/decisions/call.py:248
↓ 7 callersFunction_due_row
(table: str, identifier: str)
tests/unit/proxy/common_utils/test_reset_budget_job.py:2950
↓ 7 callersFunction_dump
(model: BaseModel)
tests/integration/providers/test_anthropic_refusal_stop_details_wire.py:261
↓ 7 callersFunction_echo
(marker: str)
tests/integration/routing/test_model_capability_flags.py:75
↓ 7 callersFunction_edge
(upstream: Callable[[Request], Reply], hold: _Hold | None = None)
tests/integration/providers/test_azure_entra_token_reuse_wire.py:195
↓ 7 callersFunction_edit
( gateway: Gateway, fields: Mapping[str, str], files: Sequence[tuple[str, tuple[str, bytes, str]]]
tests/integration/providers/test_openai_image_edit_wire.py:101
↓ 7 callersFunction_edits
(spec: JsonValue)
tests/unit/llms/anthropic/messages/context_management/test_inference_view.py:129
↓ 7 callersFunction_embedding_router
()
tests/unit/llms/litellm_proxy/skills/test_skill_search.py:61
↓ 7 callersMethod_emit_semantic_logs
(self, kwargs, response_obj, span: Span)
litellm/integrations/opentelemetry.py:1947
↓ 7 callersFunction_emit_team_members_metric
Update the Prometheus team members gauge after a membership change. No-ops when the Prometheus callback is not registered, and never lets a m
litellm/proxy/management_endpoints/team_endpoints.py:3475
↓ 7 callersFunction_emitted_async
Drive the async auth flow one request at a time, replying via ``respond`` when given.
tests/unit/proxy/mcp_server/outbound_credentials/test_resolver.py:439
↓ 7 callersFunction_empty_identity_redirect_patches
( custom_sso: Callable[[CustomOpenID], Awaitable[Mapping[str, object] | None]] | None, user_info_from_
tests/unit/proxy/management_endpoints/test_ui_sso.py:1648
↓ 7 callersFunction_end_user_chat
( runtime: _EndUserClaimRuntime, token: str, *, body_user: str | None = None, header_user: str | None = No
tests/integration/authorization/test_jwt_key_mapping_lifecycle.py:1030
↓ 7 callersFunction_ended_in_band
(response: httpx.Response, status: int)
tests/integration/streaming/test_chat_stream_guardrail_error_events.py:277
↓ 7 callersMethod_ended_sse_chunks
()
tests/unit/llms/anthropic/chat/guardrail_translation/test_anthropic_guardrail_handler.py:275
↓ 7 callersMethod_ended_stream_events
()
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:2424
↓ 7 callersMethod_ended_tool_use_sse_chunks
()
tests/unit/llms/anthropic/chat/guardrail_translation/test_anthropic_guardrail_handler.py:377
↓ 7 callersFunction_endpoint
(**overrides)
tests/unit/proxy/db/test_token_auth.py:43
↓ 7 callersFunction_enforce_user_info_access
Re-validate that the caller may read the resolved ``user_id`` after URL-decoding has been finalized. The route-level check in ``RouteChecks.n
litellm/proxy/management_endpoints/internal_user_endpoints.py:804
↓ 7 callersFunction_engine_and_exporter
(config=None)
tests/unit/integrations/otel/test_otel_v2_baggage.py:50
↓ 7 callersMethod_ensure_headers
(self)
litellm/integrations/galileo.py:206
↓ 7 callersMethod_ensure_thinking_for_clear_thinking_context_management
Bedrock rejects ``clear_thinking_20251015`` context-management edits unless extended thinking is ``enabled`` or ``adaptive``. Claude
litellm/llms/bedrock/messages/invoke_transformations/anthropic_claude_transformation.py:330
↓ 7 callersMethod_env
(name: str, default: str | None = None)
litellm/proxy/management_endpoints/sso/saml_sso.py:121
↓ 7 callersMethod_env_after_boot
( name: str, config: Path | None = None, config_file_path_env: Path | None = None,
tests/unit/proxy/test_proxy_cli.py:4282
↓ 7 callersFunction_error_message
(response: httpx.Response)
tests/integration/providers/test_bedrock_runtime_chat_completions_sad_wire.py:83
↓ 7 callersFunction_event_frame
(event_type: str, payload: dict)
tests/unit/llms/bedrock/passthrough/test_bedrock_passthrough_transformation.py:557
↓ 7 callersMethod_events_for_chunk
Translate a single upstream Responses API chunk into the list of Interactions API events it should produce. Returning a list
litellm/interactions/litellm_responses_transformation/streaming_iterator.py:126
↓ 7 callersFunction_exception
(frames: Sequence[Frame])
tests/integration/observability/test_bedrock_converse_stream_post_call_guardrail.py:679
↓ 7 callersFunction_exchange_native
(client_id, minter, exchanger, cache=None, **overrides)
tests/unit/proxy/mcp_server/test_gateway_dcr_flow.py:2798
↓ 7 callersFunction_execution
(*, body: JsonValue = None, markdown: str = "same", user_agent: str | None = None)
tests/rust-python-harness/shared/parity/test_parity.py:41
↓ 7 callersFunction_expect_other
( rig: CapRig, key: Key, calls: Sequence[Call], response_ids: Sequence[str], before: Sequence[Sample] )
tests/integration/observability/test_prometheus_series_cap.py:75
↓ 7 callersMethod_expected_cost
(model, prompt_tokens, completion_tokens)
tests/unit/proxy/test_common_request_processing.py:10420
↓ 7 callersFunction_export_one_span
(cfg: OpenTelemetryV2Config)
tests/unit/integrations/otel/test_otel_v2_components.py:928
↓ 7 callersMethod_extract_bucket_and_object_from_file_id
Validate and extract bucket name and object path from file_id. Expected format: gs://bucket-name/litellm-vertex-files/path/to/file
litellm/llms/vertex_ai/files/handler.py:79
↓ 7 callersFunction_extract_credential_from_entry
Extract litellm_credentials from a model_config entry. Entry structure: {"azure": {"litellm_credentials": "name"}, ...} When provider i
litellm/proxy/litellm_pre_call_utils.py:3879
↓ 7 callersMethod_extract_response_block
Detect whether the webhook moderated the response text or tool calls. The after_completion webhook rewrites the response in place with no
litellm/integrations/rubrik.py:1178
↓ 7 callersMethod_extract_server_side_tool_invocations
Extract server-side tool invocations (toolCall/toolResponse) from parts. These are returned by Gemini when context circulation is enabled
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:2186
↓ 7 callersMethod_extract_tool_call_args_from_message
(cls, message: object)
litellm/proxy/guardrails/guardrail_hooks/repelloai/repelloai.py:81
↓ 7 callersMethod_extract_tool_result_output_items
Extract pre-built code_interpreter_call output items from provider_specific_fields. Provider transformers (e.g. Anthropic) convert their nati
litellm/responses/litellm_completion_transformation/transformation.py:3590
↓ 7 callersFunction_fail_request
(logger: ProxyDBLogger, failure: Mapping[str, object])
tests/unit/proxy/hooks/test_proxy_track_cost_callback.py:2779
↓ 7 callersFunction_failed
(error: BaseException)
tests/unit/redis/stores/spend_counters_double.py:23
↓ 7 callersFunction_failed_row
(status_code=500, model="gpt-4o")
tests/unit/batches/test_batch_utils.py:61
↓ 7 callersFunction_fake_migrate_deploy_failure
(returncode: int, stderr: str)
litellm-proxy-extras/tests/test_setup_database_fail_fast.py:21
↓ 7 callersFunction_fake_prisma_client_with_models
(rows)
tests/unit/proxy/test_route_llm_request.py:1952
↓ 7 callersFunction_feed
(collector: PassthroughStreamCollector, stream: bytes, chunk_size: int = 16384)
tests/unit/llms/bedrock/passthrough/test_bedrock_passthrough_transformation.py:631
↓ 7 callersFunction_fetch_cost_breakdown
The passthrough call's logged row, polled until it carries a cost. Asserts (not skips) that a 2xx passthrough call produced a costed row - the
tests/e2e/llm_translation/test_passthrough_e2e.py:43
↓ 7 callersFunction_file_search_tool
(vector_store_ids: Optional[List[str]] = None)
tests/unit/llms/test_file_search_responses.py:49
↓ 7 callersFunction_file_verdict
A post mock: file checks answer with verdict, every other check allows.
tests/unit/proxy/guardrails/guardrail_hooks/akto/test_akto.py:1177
↓ 7 callersMethod_filter_detections_by_threshold
Filter detections based on score threshold. Args: detections: List of detections Returns: Filtered
litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:280
↓ 7 callersFunction_finalize_model_cost_map
Extract fallback generalizations out of the raw map, then expand aliases. The ``fallback_generalizations`` block is installed into the generaliza
litellm/litellm_core_utils/get_model_cost_map.py:658
↓ 7 callersMethod_find_blocks
Find all fenced code blocks in text. Returns list of (start, end, language_tag, block_content, confidence, action_taken).
litellm/proxy/guardrails/guardrail_hooks/block_code_execution/block_code_execution.py:382
↓ 7 callersFunction_finish
(identity: str)
tests/integration/messages_endpoint/chat_bridge/test_chat_bridge_multi_tool_call_blocks_wire.py:201
↓ 7 callersFunction_first_non_cancelled_cause
(exc: BaseException, cleanup_errors: tuple[Exception, ...] = ())
litellm/mcp_client/client.py:210
↓ 7 callersFunction_first_turn
( gateway: Gateway, model: str, prompt: str, tools: Sequence[dict[str, JsonValue]], *, stream: bool )
tests/integration/providers/test_responses_bridge_history_replay_wire.py:76
↓ 7 callersFunction_fixture
(provider: str)
tests/rust-python-harness/strategies/trace_parity/sdk/messages/case.py:15
↓ 7 callersMethod_flat_function_tool
(self)
tests/unit/llms/openai/responses/test_openai_responses_transformation.py:2705
↓ 7 callersFunction_flush_queued_spend_logs
(prisma: MagicMock)
tests/unit/proxy/db/test_db_spend_update_writer.py:4764
↓ 7 callersFunction_forget_customers
(scenario: Scenario, end_users: tuple[str, ...])
tests/integration/spend/test_disable_end_user_cost_tracking.py:400
↓ 7 callersFunction_forward
( gateway: Gateway, upstream_model: str, sent: Mapping[str, JsonValue], *, deployment: Map
tests/integration/messages_endpoint/providers/anthropic/reasoning/test_anthropic_reasoning_request_translation_wire.py:19
↓ 7 callersFunction_forwarded_bodies
(requests: tuple[Request, ...])
tests/integration/observability/test_guardrail_effects.py:530
↓ 7 callersFunction_forwarded_tool_result
(body: Mapping[str, JsonValue])
tests/integration/messages_endpoint/test_tool_result_text_wire.py:343
↓ 7 callersFunction_framed_kimi_with_custom_tokenizer
(monkeypatch: pytest.MonkeyPatch, identifier: str)
tests/unit/proxy/test_proxy_token_counter.py:2377
↓ 7 callersFunction_frames
(raw: bytes)
tests/integration/routing/test_vllm_passthrough_stream_relay.py:98
↓ 7 callersFunction_function_calls
(events: tuple[Event, ...])
tests/integration/providers/test_bedrock_nova_sonic_realtime_tool_calls.py:259
↓ 7 callersFunction_gcs_logger_with_upload_status
(monkeypatch: pytest.MonkeyPatch, status_code: int)
tests/unit/integrations/gcs_bucket/test_gcs_bucket.py:177
↓ 7 callersFunction_gemini_tool_result_fixture
( content: str, )
tests/unit/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_factory.py:2513
↓ 7 callersFunction_generate
( gateway: Gateway, model: str, *, key: str | None = None, extra: Mapping[str, JsonValue] | None = None )
tests/integration/spend/test_vertex_image_regional_uplift.py:181
↓ 7 callersFunction_get_agents_api_config
(custom_llm_provider: str)
litellm/interactions/agents/main.py:64
↓ 7 callersMethod_get_assembly_transcript
Get the transcript details from AssemblyAI API Args: response_body (dict): Response containing the transcript ID
litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py:166
↓ 7 callersFunction_get_cached_temporary_mcp_server_or_404
( server_id: str, user_api_key_dict: UserAPIKeyAuth, request: Request | None = None,
litellm/proxy/management_endpoints/mcp_management_endpoints.py:2397
↓ 7 callersFunction_get_combined_custom_metadata_from_standard_logging_payload
Combine the metadata sources that can supply custom Prometheus labels. Includes top-level scalar fields from the standard logging metadata (
litellm/integrations/prometheus.py:5158
↓ 7 callersFunction_get_cost_breakdown_from_logging_obj
Extract discount, margin, and per-component cost information from logging object's cost breakdown. A cache hit reports every component as zero. A
litellm/proxy/common_request_processing.py:2000
↓ 7 callersFunction_get_default_team_param
Returns a default value for the given field from litellm.default_team_params config. Returns None if no default is configured. For list
litellm/proxy/management_endpoints/team_endpoints.py:1029
↓ 7 callersFunction_get_deployment_cooldown_policy
Return (allowed_fails_policy, allowed_fails) from deployment model_info, or (None, None). `model_info` is the only supported location for these t
litellm/router_utils/cooldown_handlers.py:157
↓ 7 callersMethod_get_deployment_limits
Extract TPM and RPM limits from a deployment configuration. Checks in order: 1. Top-level 'tpm'/'rpm' fields 2. lite
litellm/router_utils/pre_call_checks/model_rate_limit_check.py:224
↓ 7 callersMethod_get_extra_header_tags
Extract additional header tags for spend tracking based on config.
litellm/litellm_core_utils/litellm_logging.py:7619
↓ 7 callersMethod_get_output_file_id_from_vertex_ai_batch_response
Gets the output file id from the Vertex AI Batch response, None until Vertex reports outputInfo
litellm/llms/vertex_ai/batches/transformation.py:319
↓ 7 callersFunction_get_provider_handlers
()
litellm/llms/pass_through/guardrail_translation/handler.py:237
↓ 7 callersFunction_get_provider_request_id
(original_exception: Exception)
litellm/litellm_core_utils/litellm_logging.py:360
↓ 7 callersFunction_get_schemas
Return the list of SCIM Schema definitions per RFC 7643 Section 7.
litellm/proxy/management_endpoints/scim/scim_v2.py:1372
↓ 7 callersMethod_get_session_id_from_request_data
Extract session_id from request data.
litellm/integrations/custom_guardrail.py:687
↓ 7 callersFunction_get_settings_with_schema
Common utility function to get settings with schema information. Args: settings_key: The key in litellm_settings to get sett
litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py:872
↓ 7 callersMethod_get_team_object_permission
Get team object_permission - automatically loaded by get_team_object() in main auth flow. Note: object_permission is automatically p
litellm/proxy/mcp_server/auth/user_api_key_auth_mcp.py:2930
↓ 7 callersMethod_get_tracer_for
Return a tracer for *project_name*, creating/caching a provider on miss.
litellm/integrations/arize/arize_phoenix.py:155
↓ 7 callersFunction_git
(cwd: Path, *args: str)
tests/unit/test_circleci_checkout.py:117
↓ 7 callersFunction_group
( name: str, models: list[str], strategy: str, **extra: object )
tests/unit/test_router/core/test_gaps_l0001.py:31
↓ 7 callersMethod_guarded_stream
(cls, guardrail: CustomGuardrail, *texts: str)
tests/unit/proxy/guardrails/guardrail_hooks/unified_guardrails/test_unified_guardrail.py:3066
↓ 7 callersFunction_guardrail_entry
(response: httpx.Response)
tests/integration/observability/test_azure_content_safety_dispatch.py:68
↓ 7 callersFunction_guardrails_table
(prisma_client: "PrismaClient")
litellm/proxy/guardrails/guardrail_endpoints.py:115
↓ 7 callersFunction_guess
(throttle, username: str = "admin", password: str = "wrong")
tests/unit/proxy/auth/test_login_utils.py:695
↓ 7 callersFunction_handle
(endpoint_name: str, client, **overrides)
tests/unit/llms/custom_httpx/test_container_handler.py:42
↓ 7 callersMethod_handle_accumulated_json_chunk
Handle partial JSON chunks by accumulating them until valid JSON is received. This fixes network fragmentation issues where SSE data
litellm/llms/anthropic/chat/handler.py:1463
↓ 7 callersMethod_handle_failure
Trigger failure handlers before bubbling the exception. Only calls handlers once even if called multiple times.
litellm/responses/streaming_iterator.py:1077
↓ 7 callersMethod_handle_json_mode_chunk
If JSON mode is enabled, convert the tool call to a message. Anthropic returns the JSON schema as part of the tool call Open
litellm/llms/anthropic/chat/handler.py:1281
↓ 7 callersMethod_handle_logging_failed_response
Handle logging for RESPONSE_FAILED events by routing to failure handlers. Unlike _handle_logging_completed_response (which calls suc
litellm/responses/streaming_iterator.py:754
↓ 7 callersFunction_handle_stale_mcp_session
Inspect the incoming ``mcp-session-id`` header **before** the request reaches the MCP SDK. If the session is stale (not known
litellm/proxy/mcp_server/server.py:1718
↓ 7 callersMethod_has_trusted_issuer_normalized_claim
(self, token: dict, claim: str)
litellm/proxy/auth/handle_jwt.py:406
↓ 7 callersFunction_heuristic_first_router
(mock_router_instance, **config_overrides)
tests/unit/router_strategy/test_complexity_router.py:14025
↓ 7 callersFunction_history
(marker: str, answers: Sequence[Mapping[str, JsonValue]])
tests/integration/providers/test_responses_bridge_tool_search_replay_wire.py:176
← previousnext →10,001–10,100 of 202,479, ranked by callers