MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 16 callersFunction_sync_client
( oauth_status: int = 200, oauth_payload: object = _DEFAULT_OAUTH_RESPONSE, graph_status: int = 20
tests/unit/llms/microsoft_365_copilot/chat/test_handler.py:48
↓ 16 callersFunction_team_provider_router
()
tests/unit/proxy/rag_endpoints/test_rag_endpoints.py:338
↓ 16 callersFunction_text
(marker: str)
tests/integration/providers/test_responses_bridge_input_audio_wire.py:83
↓ 16 callersFunction_text_reply
(marker: str, backend: str = _HAIKU)
tests/integration/providers/test_bedrock_mantle_claude_chat_wire.py:108
↓ 16 callersFunction_texts
(item: dict)
tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py:3681
↓ 16 callersMethod_to_ns
(self, dt)
litellm/integrations/opentelemetry.py:3033
↓ 16 callersFunction_token
(text: str, is_final: bool = True, **fields: object)
tests/unit/llms/soniox/realtime/test_soniox_realtime_transformation.py:58
↓ 16 callersMethod_transform
(self, model: str, messages: list)
tests/unit/llms/sap/chat/test_sap_transformation.py:650
↓ 16 callersFunction_turn_frames
()
tests/unit/responses/test_responses_websocket_all_providers.py:1598
↓ 16 callersFunction_u
(name: str)
tests/unit/proxy/mcp_server/test_mcp_env_vars.py:26
↓ 16 callersFunction_upstream_body
(request: Request, clef_name: str = "clef")
tests/integration/providers/test_cloudflare_clef_images_wire.py:162
↓ 16 callersFunction_upstream_calls
(gateway: Gateway, handle: ScenarioHandle)
tests/integration/providers/test_decisions_wire.py:262
↓ 16 callersFunction_validate_key_alias_format
Validate the format of the key_alias. Path traversal and control characters are always rejected. The alias then has to stay within ``_KE
litellm/proxy/management_endpoints/key_management_endpoints.py:8480
↓ 16 callersFunction_verdicts
(results: Sequence[Mapping[str, object]])
tests/unit/llms/anthropic/messages/test_safeguards.py:98
↓ 16 callersFunction_vllm_server
(respond: Callable[[Request], Reply])
tests/integration/providers/test_hosted_vllm_reasoning_content_wire.py:82
↓ 16 callersFunction_wire_body
(request: Request, *, stream: bool = False)
tests/integration/providers/test_responses_bridge_prompt_cache_breakpoint_wire.py:114
↓ 16 callersFunction_write_health_state_to_router_cache
Write deployment health states to the router's health state cache for health-check-driven routing. No-op if the feature is disabled. `mo
litellm/proxy/proxy_server.py:4842
↓ 16 callersFunctiona
()
litellm/proxy/_experimental/out/_next/static/chunks/1f2vcab0yti03.js:29
↓ 16 callersMethodadd_deployment
- Check db for new models - Check if model id's in router already - If not, add to router Serialized against every o
litellm/proxy/proxy_server.py:8920
↓ 16 callersMethodadd_litellm_callback
(self, cb)
tests/unit/proxy/guardrails/guardrail_hooks/test_presidio.py:844
↓ 16 callersMethodallm_passthrough_route
(self, **kwargs)
tests/unit/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py:7848
↓ 16 callersFunctionanswer
(marker: str)
tests/integration/routing/_reasoning_effort_levels_support.py:51
↓ 16 callersFunctionapply_toolset_scope
Pin a principal's MCP permissions to a single toolset for /toolset/{name}/mcp. A virtual key (and an admin session) has its object_p
litellm/proxy/mcp_server/server.py:1812
↓ 16 callersFunctionas_object_list
(value: object)
litellm/litellm_core_utils/core_helpers.py:108
↓ 16 callersFunctionassert_bfl_polling_url
Validate that a polling URL points to a BFL-controlled host. BFL returns polling URLs on subdomains like ``gateway.bfl.ai`` that differ from
litellm/llms/black_forest_labs/common_utils.py:26
↓ 16 callersFunctionassert_wire
(request: Request, expected: Mapping[str, JsonValue], *, streaming: bool)
tests/integration/providers/_mantle_gpt_prompt_cache_support.py:386
↓ 16 callersMethodasync_get_available_deployment
( self, model: str, messages: list[dict[str, str]] | None = None, input: str |
tests/unit/test_router/test_router.py:18121
↓ 16 callersMethodasync_get_model_id
Find the deployment that last served this prefix, walking back from the breakpoint the same way the provider cache does, so a breakpo
litellm/router_utils/prompt_caching_cache.py:448
↓ 16 callersMethodasync_logging_hook
( self, kwargs: dict[str, object], result: object, call_type: str )
tests/unit/litellm_core_utils/test_litellm_logging.py:9103
↓ 16 callersMethodasync_post_call_success_deployment_hook
(self, request_data, response, call_type)
tests/unit/test_router/test_io_token_rate_limits.py:2107
↓ 16 callersMethodasync_post_call_success_hook
Check tool usage permissions after the LLM call Args: data: Request data user_api_key_dict: User API key inf
litellm/proxy/guardrails/guardrail_hooks/tool_permission.py:1598
↓ 16 callersMethodasync_pre_call_deployment_hook
(self, *args: object, **kwargs: object)
tests/unit/rust_bridge/test_detectors.py:456
↓ 16 callersMethodasync_send_batch
Sends the in memory logs queue to datadog api Logs sent to /api/v2/logs DD Ref: https://docs.datadoghq.com/api/latest/logs/
litellm/integrations/datadog/datadog.py:364
↓ 16 callersMethodasync_transform_request
(self, model, messages, optional_params, litellm_params, headers)
tests/unit/llms/custom_httpx/test_llm_http_handler.py:4697
↓ 16 callersFunctionazure_storage_environment
(sink_url: str, cert_file: Path)
tests/integration/observability/_azure_storage_support.py:187
↓ 16 callersMethodbatch
(&self, send: Send<'_>)
litellm-rust/crates/redis-store/src/rate_limits/mod.rs:290
↓ 16 callersMethodblob
(&self, name: &str)
litellm-rust/crates/cache-azure-blob/tests/support/mod.rs:56
↓ 16 callersMethodbody
(self, model: str, text: str)
tests/integration/security/test_request_path_slots.py:69
↓ 16 callersFunctionbuild_agent_env
Return a copy of base_env wired to route the agent through the proxy. Anthropic clients (Claude Code) append /v1/messages to ANTHROPIC_BASE_URL,
litellm/proxy/client/cli/commands/agents.py:126
↓ 16 callersMethodbuild_akto_payload
Bodies are sent as {"body": "<JSON string>"}.
litellm/proxy/guardrails/guardrail_hooks/akto/akto.py:529
↓ 16 callersFunctionbuild_bug_report
( exc: BaseException, *, surface: Surface, call_type: str | None = None, custom_llm_provid
litellm/litellm_core_utils/bug_report.py:94
↓ 16 callersFunctionbuild_langfuse_tracing
Wire the provider from litellm's own settings so a host's ``OTEL_*`` variables do not steer it. An unset sampler or span limit falls back to ``OT
litellm/integrations/langfuse/langfuse_sdk.py:1007
↓ 16 callersFunctionbuild_proxy_client
The ProxyClient every suite's client is built from: a SplitTransport that routes LLM calls to the data plane (PROXY_BASE_URL) and management/admin
tests/e2e/proxy_client.py:1229
↓ 16 callersFunctioncache_key_object
( hashed_token: str, user_api_key_obj: UserAPIKeyAuth, user_api_key_cache: UserApiKeyCache, pr
litellm/proxy/auth/auth_checks.py:3438
↓ 16 callersFunctioncall_host
(call: HostCall)
litellm-rust/crates/python-bridge/src/router/host.rs:520
↓ 16 callersMethodcallback_capabilities
Inspect ``litellm.callbacks`` once and answer the per-hook capability questions used to short-circuit no-op work on the chat-completi
litellm/proxy/utils.py:3654
↓ 16 callersMethodchat
(self, model: str, role: str | None, behavior: Behavior, marker: str, **extra: JsonValue)
tests/integration/routing/test_ptu_shares.py:268
↓ 16 callersFunctionchat_body
( model: str, marker: str, tools: Sequence[Mapping[str, JsonValue]], stream: bool, **extra: JsonValue )
tests/integration/providers/test_chat_completions_tool_search_wire.py:289
↓ 16 callersFunctionchat_body
(prompt: str)
tests/e2e_harness/test_provider_edge.py:356
↓ 16 callersFunctioncheck_tools_allowlist
Enforce key/team tool allowlist (metadata.allowed_tools). No DB in hot path — effective allowlist is read from valid_token.metadata and valid
litellm/proxy/auth/auth_checks.py:1021
↓ 16 callersMethodchunk_creator
(self, chunk: Any)
litellm/litellm_core_utils/streaming_handler.py:1798
↓ 16 callersFunctionclassify_strategy_router_model
Classify a ``litellm_params.model`` string the way the Router does. Returns None for regular provider models. Mirrors Router registration exa
litellm/router_strategy/auto_router/auto_router_model_naming.py:73
↓ 16 callersMethodclear
()
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 16 callersMethodclient
(self)
tests/unit/llms/openai_like/test_zerogpu_provider.py:61
↓ 16 callersFunctioncodex_models_response_json
Codex's `ModelsResponse` body for `rows`, in listing order, cut to Codex's byte limit. Only chat-capable rows are listed (Codex cannot drive an e
litellm/proxy/common_utils/codex_model_catalog.py:500
↓ 16 callersFunctioncollect
(handler, ctx, prompt)
tests/unit/llms/opencode/harness/test_transformation.py:196
↓ 16 callersFunctioncompact_body
(model: str, text: str, extra: Mapping[str, JsonValue])
tests/integration/authorization/_responses_compact.py:100
↓ 16 callersFunctioncompact_post
(gateway: Gateway, key: str, prefix: str, body: Mapping[str, JsonValue], text: str)
tests/integration/authorization/_responses_compact.py:288
↓ 16 callersFunctionconfig_error
(message: str)
litellm/llms/mongodb/vector_stores/transformation.py:50
↓ 16 callersMethodconsume_stream
(self, streaming_response: StreamingResponse)
tests/unit/proxy/test_common_request_processing.py:2278
↓ 16 callersFunctioncounter
(scope: &Scope, kind: Kind)
litellm-rust/crates/redis-store/tests/rate_limits.rs:113
↓ 16 callersMethodcovers
(self, keys: Sequence[str])
litellm/router_strategy/lowest_tpm_rpm_v2.py:55
↓ 16 callersFunctioncreate_config_audit_log
Record a system-wide settings change in LiteLLM_AuditLog. Secret leaves are redacted before the row is written. environment_variables hold ar
litellm/proxy/proxy_server.py:20946
↓ 16 callersMethodcursors
(self)
tests/integration/observability/test_otel_excluded_services_matrix.py:217
↓ 16 callersFunctiondata_frames
(text: str)
tests/integration/_support/responses_stream.py:177
↓ 16 callersFunctiondecrypt_bearer_token
None unless ``token`` came from :func:`encrypt_bearer_token` with the same ``prefix``.
litellm/proxy/common_utils/encrypt_decrypt_utils.py:191
↓ 16 callersMethoddeleted
Every counter a delete reached, memory and Redis alike.
tests/unit/redis/stores/spend_counters_double.py:200
↓ 16 callersFunctiondeployment
(scenario: Scenario, kind: str, wire: Wire, model_info: Mapping[str, JsonValue])
tests/integration/routing/_reasoning_effort_levels_support.py:227
↓ 16 callersFunctiondiscovered
Poll until the catalog's invocable ids are listed; returns every listed id carrying the stem.
tests/integration/_support/bedrock_discovery.py:212
↓ 16 callersFunctiondocument
A document Python passes as a mapping or as its JSON text.
litellm-rust/crates/python-bridge/src/router/mod.rs:144
↓ 16 callersFunctiondrain_logging
(worker: LoggingWorker = GLOBAL_LOGGING_WORKER)
tests/test_litellm_rust/support/callback_recorder.py:13
↓ 16 callersMethoddynamic
The process settings, read live on each access (``current_dynamic_config()`` takes a snapshot).
litellm/router_python_host.py:123
↓ 16 callersFunctionee
()
litellm/proxy/_experimental/out/_next/static/chunks/13d402rvlr6kh.js:1
↓ 16 callersFunctioneffectiveClassifierType
( value: Pick<ComplexityRouterConfigValue, "custom_tier_set" | "classifier_type">, )
ui/litellm-dashboard/src/components/add_model/ComplexityRouterConfig.tsx:187
↓ 16 callersMethodemit
Emit one complete span: dedup, start, map attributes, status, end. Return the span, or ``None`` if it was deduplicated away. ``tracer``
litellm/integrations/otel/emitter.py:231
↓ 16 callersFunctionencode_character_id_with_provider
Encode provider and model_id into character_id using base64.
litellm/types/videos/utils.py:178
↓ 16 callersMethodensure_access_token
( self, credentials: VERTEX_CREDENTIALS_TYPES | None, project_id: str | None,
litellm/llms/vertex_ai/vertex_llm_base.py:645
↓ 16 callersFunctioneventually
(mut attempt: impl AsyncFnMut() -> Option<T>)
litellm-rust/crates/redis-testing/src/deployment.rs:101
↓ 16 callersMethodexists
Check if a provider is defined via JSON
litellm/llms/openai_like/json_loader.py:80
↓ 16 callersFunctionexpected_wire
( model: str, prompt: str, *, endpoint: Endpoint, marked: bool, options: JsonValue | N
tests/integration/providers/_mantle_gpt_prompt_cache_support.py:355
↓ 16 callersFunctionextract_request_tool_names
Extract tool names from the request body for the given route. Uses guardrail translation handlers when available, else standalone extractors
litellm/proxy/guardrails/tool_name_extraction.py:63
↓ 16 callersFunctionf
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 16 callersMethodfailure_handler
Log failed db read/writes Currently only logs exceptions to sentry
litellm/proxy/utils.py:4036
↓ 16 callersMethodfind_unique
( self, where: Mapping[str, object], include: Mapping[str, object] | None = None,
litellm/proxy/agent_endpoints/agent_registry.py:106
↓ 16 callersMethodflush_and_get_aggregated_window_spend_transactions
Drain the queue and return the increments aggregated per window.
litellm/proxy/db/db_transaction_queue/window_spend_update_queue.py:166
↓ 16 callersFunctionflush_gateway_requests
Scheduler entrypoint. Never raises: a metering failure must not kill the job. With ``redis_buffer`` the snapshot goes to Redis and only the
litellm/proxy/db/gateway_request_tracking.py:366
↓ 16 callersMethodfreeze
(&self)
litellm-rust/crates/redis-testing/src/cluster.rs:153
↓ 16 callersMethodgenerate_key
POST /key/generate. `caller_key` is who is creating the key: the master key by default, or a virtual key (an admin filling in Create New Key o
tests/e2e/management/management_client.py:125
↓ 16 callersMethodget
(self, key, default=None)
litellm/types/router.py:749
↓ 16 callersMethodget_allowed_fails_from_policy
(self, exception: Exception)
litellm/router_deprecated.py:658
↓ 16 callersFunctionget_attribute_or_key
(tool_or_function, attribute, default=None)
litellm/litellm_core_utils/prompt_templates/factory.py:6316
↓ 16 callersFunctionget_azure_ad_token_provider
Get Azure AD token provider based on Service Principal with Secret workflow. Based on: https://github.com/openai/openai-python/blob/main/exa
litellm/secret_managers/get_azure_ad_token_provider.py:133
↓ 16 callersFunctionget_base_model_from_metadata
(model_call_details: Mapping[str, object] | None = None)
litellm/utils.py:9330
↓ 16 callersFunctionget_fallback_generalization_rules
Return the raw rule list (read-only view for callers/tests).
litellm/litellm_core_utils/fallback_generalizations.py:212
↓ 16 callersFunctionget_generic_sso_response
( request: Request, jwt_handler: JWTHandler, sso_jwt_handler: JWTHandler | None, # sso specific j
litellm/proxy/management_endpoints/ui_sso.py:1617
↓ 16 callersMethodget_guardrail_dynamic_request_body_params
Returns `extra_body` to be added to the request body for the Guardrail API call Use this to pass dynamic params to the guardrail API
litellm/integrations/custom_guardrail.py:1507
↓ 16 callersMethodget_logged_api_key
(user_api_key_dict: UserAPIKeyAuth)
litellm/proxy/litellm_pre_call_utils.py:2071
↓ 16 callersFunctionget_optional_params_image_gen
( model: str | None = None, n: int | None = None, quality: str | None = None, response_format:
litellm/utils.py:4658
↓ 16 callersMethodget_options
ctx.options, or this harness's default options.
litellm/llms/base_llm/harness/transformation.py:98
↓ 16 callersMethodget_provider_audio_transcription_config
( model: str, provider: LlmProviders, base_model: str | None = None, )
litellm/utils.py:10531
← previousnext →3,701–3,800 of 202,479, ranked by callers