MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 24 callersFunction_make_compress_response
( messages: list, status: int = 200, ccr_hashes: list[str] | None = None, )
tests/unit/proxy/guardrails/guardrail_hooks/test_headroom.py:101
↓ 24 callersFunction_make_guardrail_with_response
Build a guardrail with a fake HTTP client injected at construction, per CLAUDE.md's dependency-injection rule: no test mutates `async_handler` aft
tests/unit/proxy/guardrails/guardrail_hooks/test_airia.py:32
↓ 24 callersFunction_make_managed_files_instance
Create a PROXY_LiteLLMManagedFiles with storage methods mocked out.
tests/unit/enterprise/proxy/test_managed_files_hook.py:186
↓ 24 callersFunction_make_prisma_with_existing
Build a MagicMock prisma_client whose user-credentials table returns ``row`` for find_unique and behaves async-correctly for upsert/find_many.
tests/unit/proxy/mcp_server/test_db_credentials.py:61
↓ 24 callersFunction_make_run
( run_id: str = "run-1", session_id: str = "sess-1", workflow_type: str = "shin-builder", stat
tests/unit/proxy/management_endpoints/test_workflow_management_endpoints.py:29
↓ 24 callersFunction_make_team_obj
Create a mock team object with the given MCP permissions.
tests/unit/proxy/management_helpers/test_object_permission_utils.py:219
↓ 24 callersFunction_mock_rows
(mock_prisma_client, end_users: list[str])
tests/unit/proxy/management_endpoints/management_v1/test_spend_logs.py:69
↓ 24 callersFunction_post_credential
(body: dict, auth=_as_admin)
tests/unit/proxy/credential_endpoints/test_endpoints.py:71
↓ 24 callersMethod_pre_call_checks
``_pre_call_checks``, which context compaction admits a client-managed request with.
litellm/router_rust/surface/members.py:123
↓ 24 callersFunction_prompt
()
tests/integration/messages_endpoint/providers/anthropic/test_anthropic_messages_overloaded_wire.py:61
↓ 24 callersFunction_provider_reply
( model: str, total_tokens: int = 0, status_code: int | None = None, rejected_before_provider_call: bool =
tests/unit/proxy/test_proxy_token_counter.py:1715
↓ 24 callersFunction_record
(accumulator: GatewayRequestAccumulator, status_code: int, **overrides)
tests/unit/proxy/db/test_gateway_request_tracking.py:41
↓ 24 callersFunction_riva_server
(script: _Script, max_receive_bytes: int | None = None, tls: _Tls | None = None)
tests/unit/llms/nvidia_riva/audio_transcription/test_handler.py:145
↓ 24 callersFunction_s3_proxy
( gateway: Gateway, tmp_path: Path, sink_url: str, extra: Mapping[str, JsonValue], setting
tests/integration/observability/test_s3_v2_partition_granularity.py:122
↓ 24 callersFunction_sanitize_request_body_for_spend_logs_payload
Recursively sanitize request body to prevent logging large base64 strings or other large values. Truncates strings longer than MAX_STRING_LEN
litellm/proxy/spend_tracking/spend_tracking_utils.py:1473
↓ 24 callersFunction_sealed_token
(grant: UpstreamTokenGrant, keys: EnvelopeKeys = _KEYS)
tests/unit/proxy/mcp_server/outbound_credentials/test_envelope.py:82
↓ 24 callersFunction_serve_chat_rounds
( respx_mock: respx.MockRouter, monkeypatch: pytest.MonkeyPatch, rounds: Sequence[Response] )
tests/unit/responses/mcp/test_chat_completions_handler.py:1628
↓ 24 callersFunction_spec
( scope=lambda caller: ScopeAll(), searchable=frozenset({"budget_id", "created_by"}), sortable=fro
tests/unit/proxy/list_api/test_list_framework.py:60
↓ 24 callersFunction_spend_row
(response: httpx.Response)
tests/integration/providers/test_sagemaker_embedding_wire.py:155
↓ 24 callersFunction_spend_row
(identity: str)
tests/integration/providers/test_ollama_prompt_tools_wire.py:161
↓ 24 callersMethod_toolset_only_object_permission
(self, toolset_ids)
tests/unit/proxy/mcp_server/auth/test_user_api_key_auth_mcp.py:363
↓ 24 callersMethod_transform_parts
( parts: list[HttpxPartType], cumulative_tool_call_idx: int, is_function_call: bool |
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:2304
↓ 24 callersFunctionauthorize_with_server
( request: Request, mcp_server: MCPServer, client_id: str, redirect_uri: str, state: str =
litellm/proxy/mcp_server/discoverable_endpoints.py:1065
↓ 24 callersFunctionaws_event_stream_frame
One AWS event-stream frame: a string header is wire type 7, an int header wire type 4 (int32).
tests/integration/_support/upstream.py:142
↓ 24 callersMethodbytes
(chunk: &Bytes)
litellm-rust/crates/inference/tests/caching.rs:59
↓ 24 callersFunctioncatalog_for
(marker: str, *, page_size: int | None = None)
tests/integration/_support/bedrock_discovery.py:60
↓ 24 callersFunctionclean_headers
Removes litellm api key from headers Args: headers: Request headers litellm_key_header_name: Custom header name for LiteLLM
litellm/proxy/litellm_pre_call_utils.py:1531
↓ 24 callersFunctioncleanup_router_config_variables
()
litellm/proxy/proxy_server.py:1318
↓ 24 callersFunctioncompletion_response
(content: str = "ok", total_tokens: int = 10, model: str = "gpt-4o")
tests/unit/test_router/core/scripted_host.py:86
↓ 24 callersFunctionconvert_to_gemini_tool_call_result
OpenAI message with a tool result looks like: { "tool_call_id": "tool_1", "role": "tool", "content": "function result
litellm/litellm_core_utils/prompt_templates/factory.py:1638
↓ 24 callersFunctionconvert_url_to_base64
(url: str, timeout: float | httpx.Timeout | None = None)
litellm/litellm_core_utils/prompt_templates/image_handling.py:136
↓ 24 callersMethodcount
(&self, text: &str)
litellm-rust/crates/token-counter-fast/src/scanner.rs:60
↓ 24 callersMethoddelete_deployment
(self, id)
tests/unit/proxy/management_endpoints/test_model_management_endpoints.py:389
↓ 24 callersFunctiondeployment
(scenario: Scenario, wire: Wire, model: str = MODEL, **overrides: JsonValue)
tests/integration/providers/_coralbricks.py:367
↓ 24 callersFunctioneT
(e)
litellm/proxy/_experimental/out/_next/static/chunks/14v3irtjifjt2.js:1
↓ 24 callersMethodexpected
(self, served: Mapping[str, Sequence[str]])
tests/integration/routing/test_per_model_rate_limit_fallbacks.py:83
↓ 24 callersMethodfail
(span, message: str)
tests/unit/integrations/otel/test_otel_v2_destinations.py:955
↓ 24 callersFunctionfallback_ok
( *events: object, opened: list[ScriptedResponsesStream] | None = None )
tests/unit/test_router/core/test_streaming_characterization_responses.py:66
↓ 24 callersMethodflush
(self)
tests/unit/proxy/telemetry/test_runtime.py:226
↓ 24 callersFunctionformat
(s,o,i)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 24 callersMethodget_auth_header
Resolve Anthropic credentials and return the appropriate auth header dict. Checks ANTHROPIC_API_KEY first (-> x-api-key or Bearer depending o
litellm/llms/anthropic/common_utils.py:1703
↓ 24 callersFunctionget_budget_reset_time
Get the budget reset time using the globally-configured timezone and reset time. Thin wrapper over `compute_budget_reset_at` for callers that don
litellm/proxy/common_utils/timezone_utils.py:75
↓ 24 callersMethodget_cache
( self, key, parent_otel_span: Span | None = None, local_only: bool = False,
litellm/caching/dual_cache.py:177
↓ 24 callersMethodget_complete_url
(self, model: str, api_base: str, litellm_params: dict)
tests/unit/images/test_image_edit_utils.py:53
↓ 24 callersFunctionget_custom_llm_provider_from_request_query
Get the `custom_llm_provider` from the request query parameters Safely reads the request query parameters
litellm/proxy/common_utils/openai_endpoint_utils.py:67
↓ 24 callersFunctionget_prisma_client_or_throw
(message: str)
litellm/proxy/utils.py:9977
↓ 24 callersFunctionget_redis_client
(**env_overrides)
litellm/_redis.py:839
↓ 24 callersMethodget_valid_client_session
Helper to get a valid ClientSession for the current event loop. This handles the case where the session was created in a different
litellm/llms/custom_httpx/aiohttp_transport.py:333
↓ 24 callersMethodkill
(self)
tests/unit/harness/sandbox/test_docker.py:48
↓ 24 callersFunctionl
(e)
litellm/proxy/_experimental/out/_next/static/chunks/085r5ieqhajig.js:1
↓ 24 callersMethodlist_batches
( self, *, key: str, provider: str | None = None, model: str | None =
tests/e2e/batches/batch_client.py:232
↓ 24 callersMethodlist_tools
()
tests/unit/proxy/mcp_server/test_mcp_server_manager.py:7945
↓ 24 callersMethodload_local_model_cost_map
Load the local backup model cost map bundled with the package.
litellm/litellm_core_utils/get_model_cost_map.py:95
↓ 24 callersFunctionload_stored_settings
(repository: ConfigRepository, selected_id: str | None = None)
litellm/proxy/roi_calculator/settings.py:135
↓ 24 callersFunctionlocal
(locals: &Bound<'py, PyDict>, name: &str)
litellm-rust/crates/callbacks-legacy-python/src/test_support.rs:179
↓ 24 callersFunctionmantle_deployment
( gateway: Gateway, scenario: Scenario, wire: Wire, model: str = GPT, *, model_info: M
tests/integration/providers/_mantle_gpt_prompt_cache_support.py:700
↓ 24 callersFunctionmodel_dump_with_preserved_fields
Serialize a Pydantic model to a dictionary while preserving specific fields even if they are None. Explicit null values in the preserved
litellm/proxy/utils.py:10562
↓ 24 callersFunctionnew_user
Use this to create a new INTERNAL user with a budget. Internal Users can access LiteLLM Admin UI to make keys, request access to models.
litellm/proxy/management_endpoints/internal_user_endpoints.py:514
↓ 24 callersFunctionobserve
( gateway: Gateway, wire: Wire, endpoint: Endpoint, body: Mapping[str, JsonValue], *, key: str | None = No
tests/integration/providers/_mantle_gpt_prompt_cache_support.py:714
↓ 24 callersFunctionpending
(declared: Declared<T>)
litellm-rust/crates/redis-store/src/request.rs:212
↓ 24 callersFunctionprovider
(identity: str, model: str = MODEL, stream_pause: float = 0)
tests/integration/providers/_coralbricks.py:284
↓ 24 callersMethodrecord_listed_tools
Store the catalog served to ``caller``. ``generation`` is the server's listed-tools generation read before the listing's upstream fetch; the r
litellm/proxy/mcp_server/mcp_server_manager.py:4736
↓ 24 callersFunctionregistered_tags
``{router name: [tags of each registered strategy]}`` for a pre-routing strategy registry.
tests/unit/test_router/core/gaps_l11100_helpers.py:81
↓ 24 callersMethodreset_budget_for_litellm_keys
Resets the budget for all the litellm keys Catches Exceptions and logs them
litellm/proxy/common_utils/reset_budget_job.py:1129
↓ 24 callersFunctionresolve_tenant_otel_destinations
The OTLP destinations this request's key or team config overrides its traces to. Key settings win over team settings outright, the same precedenc
litellm/proxy/litellm_pre_call_utils.py:1406
↓ 24 callersMethodshutdown
(self)
tests/unit/integrations/otel/test_otel_v2_destinations.py:4160
↓ 24 callersMethodspeech
( self, model: str, input: str, voice: str | dict | None, optional_par
litellm/endpoints/speech/speech_to_completion_bridge/handler.py:80
↓ 24 callersFunctionspend_row
(identity: str, seconds: float = 70)
tests/integration/providers/_coralbricks.py:400
↓ 24 callersFunctionsupports_reasoning
Check if the given model supports reasoning and return a boolean value.
litellm/utils.py:3702
↓ 24 callersMethodtransform_chat_completion_usage_to_responses_usage
( chat_completion_response: ModelResponse | Usage, )
litellm/responses/litellm_completion_transformation/transformation.py:3888
↓ 24 callersMethodtransform_request
( self, model: str, messages: list[AllMessageValues], optional_params: dict,
litellm/llms/sap/chat/transformation.py:328
↓ 24 callersMethodtransform_search_response
Transform a TinyFish response to LiteLLM's unified ``SearchResponse``. Per-result field handling: - ``title``, ``url``, ``sn
litellm/llms/tinyfish/search/transformation.py:161
↓ 24 callersMethodupdate_spend_logs
( n_retry_times: int, prisma_client: PrismaClient, db_writer_client: AsyncHTTPHandler
litellm/proxy/utils.py:8722
↓ 23 callersFunctionT
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2_9r2jeem0dh8.js:1
↓ 23 callersFunction_acs
(b64, cache, cookies=None)
tests/unit/proxy/management_endpoints/test_saml_sso.py:198
↓ 23 callersFunction_attempts
(wire: Wire, *, skip_probes: bool = False)
tests/integration/routing/test_deployment_mode_routing_wire.py:133
↓ 23 callersMethod_build_encrypted_item_id
Encode model_id into an output item ID for encrypted-content items. Format: ``encitem_{base64("litellm:model_id:{model_id};item_id:{original_
litellm/responses/utils.py:487
↓ 23 callersFunction_build_model_response
(content: str)
tests/unit/proxy/guardrails/guardrail_hooks/test_xecguard.py:64
↓ 23 callersFunction_clear_url_env
(monkeypatch)
tests/unit/proxy/utils/helpers/test_url_helpers.py:19
↓ 23 callersMethod_config
(self)
tests/unit/llms/oci/embed/test_oci_embed_transformation.py:35
↓ 23 callersFunction_converse_request
(body: dict)
tests/unit/llms/bedrock/passthrough/guardrail_translation/test_handler.py:1429
↓ 23 callersFunction_create_oauth2_server
Helper to create a mock OAuth2 MCPServer.
tests/unit/proxy/mcp_server/test_discoverable_endpoints.py:3935
↓ 23 callersMethod_create_prefixed_tools
Create prefixed tools and update tool mapping. Args: tools: List of original tools from server server: Serve
litellm/proxy/mcp_server/mcp_server_manager.py:5826
↓ 23 callersFunction_deployment
( scenario: Scenario, wire: Wire, model: str, *, model_info: Mapping[str, JsonValue] | Non
tests/integration/providers/test_bedrock_converse_lookaround_regex_wire.py:223
↓ 23 callersFunction_deployments
(*models: str)
tests/unit/router_utils/pre_call_checks/test_prompt_caching_deployment_check.py:73
↓ 23 callersMethod_execute_search
Execute a single web search using router's search tools. Returns both the formatted text (fed back to the model in the follow-up
litellm/integrations/websearch_interception/handler.py:1554
↓ 23 callersMethod_execute_session_operation
Execute an operation within a transport and session context. Handles entering/exiting contexts and running the operation. Pas
litellm/mcp_client/client.py:752
↓ 23 callersFunction_exhausted_key
(rig: ChainRig, scenario: Scenario)
tests/integration/authorization/test_alias_chain_budget_waiver.py:177
↓ 23 callersFunction_fake_pooler
An executable that listens like PgBouncer: on the TCP port first, then on ``.s.PGSQL.<port>`` in the socket dir. Port and socket dir come from th
tests/unit/proxy/db/test_pgbouncer.py:279
↓ 23 callersFunction_fake_prisma_with_config
MagicMock prisma whose litellm_config row returns existing_param_value and whose litellm_auditlog.create records the written audit row.
tests/unit/proxy/test_proxy_server_endpoints_and_startup.py:12487
↓ 23 callersFunction_free_port
()
tests/unit/proxy/db/test_pgbouncer.py:273
↓ 23 callersFunction_install_ingestion
Route the OAuth call to a canned token and every ingestion call to `on_ingest(body_bytes)`.
tests/unit/integrations/test_azure_sentinel.py:469
↓ 23 callersMethod_make
(env=None, config_value=None)
tests/unit/integrations/test_opentelemetry.py:1131
↓ 23 callersFunction_make_mock_response
( json_data: dict | None = None, status_code: int = 200, request_url: str | None = None, text:
tests/unit/llms/tinyfish/test_tinyfish_search.py:40
↓ 23 callersFunction_make_prisma
A fake prisma client whose sso-assertion table reads and writes ``stored`` (user_id -> assertion_b64), covering upsert, find_unique, find_many, an
tests/unit/proxy/mcp_server/outbound_credentials/test_sso_assertion_store.py:64
↓ 23 callersFunction_make_response
(payload: Dict[str, Any], status_code: int = 200)
tests/unit/llms/soniox/audio_transcription/test_soniox_audio_transcription_handler.py:22
↓ 23 callersFunction_mock_client
httpx client over a MockTransport serving one outcome per request; an exception instance is raised.
tests/unit/litellm_core_utils/test_get_model_cost_map.py:313
↓ 23 callersFunction_only_request
(wire: Wire)
tests/integration/providers/test_cache_control_tool_call_marks_wire.py:111
↓ 23 callersFunction_patch_paths
(monkeypatch, tmp_path)
tests/unit/proxy/client/cli/autoroute/test_commands.py:28
↓ 23 callersFunction_post_chat
( gateway: Gateway, model: str, messages: Sequence[dict[str, JsonValue]], **extra: JsonValue )
tests/integration/providers/test_ollama_prompt_tools_wire.py:262
← previousnext →2,201–2,300 of 202,479, ranked by callers