MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions71,069 in github.com/BerriAI/litellm

↓ 27 callersFunctionreserve_budget_for_request
( request_body: dict, route: str, llm_router: Optional[Router], valid_token: Optional[UserAPIK
litellm/proxy/spend_tracking/budget_reservation.py:57
↓ 27 callersFunctionresponses_api_bridge_check
( model: str, custom_llm_provider: str, web_search_options: Optional[OpenAIWebSearchOptions] = Non
litellm/main.py:965
↓ 27 callersFunctionroute_request
Common helper to route the request
litellm/proxy/route_llm_request.py:249
↓ 27 callersMethodset_cache
(self, key, value, **kwargs)
tests/test_litellm/proxy/test_redis_auth_cache_flag.py:35
↓ 27 callersFunctionstr_to_bool
Converts a string to a boolean if it's a recognized boolean string. Returns None if the string is not a recognized boolean value. :param
litellm/secret_managers/main.py:85
↓ 27 callersFunctiont3
(e,t,s,r,a)
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:4
↓ 27 callersFunctiontest
()
tests/local_testing/test_router.py:1213
↓ 27 callersMethodtoValue
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 27 callersMethodtransform_image_edit_request
(self, *args, **kwargs)
tests/test_litellm/images/test_image_edit_utils.py:38
↓ 27 callersMethodtransform_retrieve_batch_response
( self, model, raw_response, logging_obj, litellm_params )
tests/test_litellm/llms/base_llm/batches/test_transformation.py:82
↓ 27 callersMethodunregister
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 27 callersMethodunshift
(e)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 26 callersFunctionJ
({userID:e,userRole:t,teams:l,keys:g,setUserRole:x,userEmail:p,setUserEmail:f,setTeams:y,setKeys:v,premiumUser
litellm/proxy/_experimental/out/_next/static/chunks/0zam.8alu6_vj.js:1
↓ 26 callersFunction_build_router
(routing_strategy="simple-shuffle", routing_groups=None)
tests/test_litellm/router_strategy/test_router_routing_groups.py:53
↓ 26 callersFunction_make_trusted_request
Build a request-like object whose same-origin is ``base_url``. ``get_request_base_url`` defers to ``request.base_url`` unless the caller is a
tests/test_litellm/proxy/_experimental/mcp_server/test_byok_oauth_endpoints.py:1145
↓ 26 callersMethod_map_tool_helper
( self, tool: ChatCompletionToolParam, )
litellm/llms/anthropic/chat/transformation.py:625
↓ 26 callersFunction_safe_get_request_headers
[Non-Blocking] Safely get the request headers. Caches the result on request.state to avoid re-creating dict(request.headers) per call. W
litellm/proxy/common_utils/http_parsing_utils.py:177
↓ 26 callersFunction_safe_response
(url: str = CHAT_URL)
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:81
↓ 26 callersFunction_team_row
()
tests/test_litellm/proxy/proxy_server/test_team_model_name_translation.py:29
↓ 26 callersMethodasync_set_cache
(self, key, value, local_only: bool = False, **kwargs)
litellm/caching/dual_cache.py:327
↓ 26 callersFunctionbytes
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 26 callersFunctioncreate_config_class
Generate config class dynamically from JSON configuration
litellm/llms/openai_like/dynamic_config.py:19
↓ 26 callersFunctioncreate_response
Create streaming response, checking if the first chunk is an error. If the first chunk is an error, return a standard JSON error response.
litellm/proxy/common_request_processing.py:405
↓ 26 callersMethoddone
()
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:7
↓ 26 callersFunctioneb
(t)
litellm/proxy/_experimental/out/_next/static/chunks/03~yq9q893hmn.js:1
↓ 26 callersMethodget_cache_key
Get the cache key for the given arguments. Args: **kwargs: kwargs to litellm.completion() or embedding() Return
litellm/caching/caching.py:329
↓ 26 callersFunctionget_model_from_request
( request_data: dict, route: str, request_headers: Optional[Mapping[str, Any]] = None, request
litellm/proxy/auth/auth_utils.py:1471
↓ 26 callersFunctionget_vertex_base_url
Get the base URL for Vertex AI API calls. - ``global`` uses the global control plane host. - Multi-region geographies (e.g. ``us``, ``eu
litellm/llms/vertex_ai/common_utils.py:314
↓ 26 callersMethodpost_call_response_headers_hook
Calls async_post_call_response_headers_hook on all CustomLogger callbacks. Merges all returned header dicts (later callbacks override
litellm/proxy/utils.py:2329
↓ 26 callersFunctionprepare_key_update_data
( data: Union[UpdateKeyRequest, RegenerateKeyRequest], existing_key_row: LiteLLM_VerificationToken, )
litellm/proxy/management_endpoints/key_management_endpoints.py:1859
↓ 26 callersFunctionprocess_audio_file
Common utility function to process audio files for audio transcription APIs. Handles various input types: - File paths (str, os.PathLike
litellm/litellm_core_utils/audio_utils/utils.py:30
↓ 26 callersMethodrelease_lock
Release the lock if the current pod holds it. Uses an atomic Lua compare-and-delete to prevent TOCTOU races where a stale own
litellm/proxy/db/db_transaction_queue/pod_lock_manager.py:112
↓ 26 callersFunctionstreaming_format_tests
(idx, chunk)
tests/local_testing/test_streaming.py:162
↓ 26 callersMethodtoRgbString
()
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 26 callersMethodupdate_variables
(self, llm_router: Router)
litellm/proxy/hooks/dynamic_rate_limiter.py:81
↓ 26 callersFunctionx
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 25 callersFunctionE
(t,e)
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 25 callersFunctionV
()
litellm/proxy/_experimental/out/_next/static/chunks/0zam.8alu6_vj.js:1
↓ 25 callersFunctionY
()
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:13
↓ 25 callersFunction_armor_response
(blocked: bool)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_model_armor.py:1869
↓ 25 callersMethod_call_panw_api
Call PANW Prisma AIRS API to scan content or a tool_event.
litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:246
↓ 25 callersFunction_is_user_team_admin
(user_api_key_dict: UserAPIKeyAuth, team_obj: LiteLLM_TeamTable)
litellm/proxy/management_endpoints/common_utils.py:106
↓ 25 callersFunction_make_logging_obj
()
tests/test_litellm/interactions/test_agents_http_handler.py:67
↓ 25 callersFunction_redact_string
(value: str)
litellm/_logging.py:23
↓ 25 callersFunction_update_litellm_params_for_health_check
Update the litellm params for health check. - gets a short `messages` param for health check - adds a bounded `max_tokens` when the depl
litellm/proxy/health_check.py:444
↓ 25 callersMethodafile_content
( self, file_id, litellm_parent_otel_span, llm_router, **data )
tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py:333
↓ 25 callersFunctionapply_vcr_auto_marker_to_items
Auto-apply ``pytest.mark.vcr`` to collected items. Skip semantics (in priority order): 1. ``vcr_disabled()`` — global env-var off-switch (``
tests/_vcr_conftest_common.py:1428
↓ 25 callersMethodauth_builder
Main authentication and authorization builder
litellm/proxy/auth/handle_jwt.py:1822
↓ 25 callersMethodcancel
(self)
tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py:354
↓ 25 callersMethodchunk_creator
(self, chunk: Any)
litellm/llms/oci/chat/transformation.py:742
↓ 25 callersFunctionconvert_content_list_to_str
- handles scenario where content is list and not string - content list is just text, and no images Motivation: mistral api + azure ai do
litellm/litellm_core_utils/prompt_templates/common_utils.py:163
↓ 25 callersFunctione
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 25 callersFunctionencode_file_id_with_model
Encode a file/batch ID with model routing information. Format: <prefix><base64(litellm:<original_id>;model,<model_name>)> The result pre
litellm/proxy/openai_files_endpoints/common_utils.py:94
↓ 25 callersFunctionencode_video_id_with_provider
Encode provider and model_id into video_id using base64.
litellm/types/videos/utils.py:38
↓ 25 callersMethodexecute
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 25 callersMethodget_available_deployment
Returns the deployment based on routing strategy
litellm/router.py:10575
↓ 25 callersFunctionget_custom_llm_provider_from_request_headers
Get the `custom_llm_provider` from the request header `custom-llm-provider`
litellm/proxy/common_utils/openai_endpoint_utils.py:75
↓ 25 callersMethodget_mcp_server_by_id
Get the MCP Server from the server id
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4152
↓ 25 callersFunctionget_nested_value
Retrieves a value from a nested dictionary using dot notation. Args: data: The dictionary to search in key_path: The path to
litellm/litellm_core_utils/dot_notation_indexing.py:31
↓ 25 callersMethodinit_async_client
( self, )
litellm/caching/redis_cache.py:334
↓ 25 callersMethodis_virtual_key_allowed_to_call_route
Raises Exception if Virtual Key is not allowed to call the route
litellm/proxy/auth/route_checks.py:89
↓ 25 callersFunctiono
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:1
↓ 25 callersFunctionprint_verbose
(print_statement)
litellm/litellm_core_utils/streaming_handler.py:93
↓ 25 callersFunctionr
()
litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js:1
↓ 25 callersFunctionsafe_set_attribute
Sets a span attribute safely with OTEL-compliant primitive typing for Arize/Phoenix.
litellm/integrations/opentelemetry_utils/base_otel_llm_obs_attributes.py:32
↓ 25 callersFunctionserver_span_factory
Factory mirroring user_api_key_auth: SERVER span + url.path + http.route.
tests/test_litellm/integrations/open_telemetry/conftest.py:50
↓ 25 callersMethodtoRefractedElement
(s,o,i={})
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 25 callersMethodtransform_rerank_request
( self, model: str, optional_rerank_params: Dict, headers: Dict, litel
litellm/llms/voyage/rerank/transformation.py:70
↓ 25 callersFunctionunwrap
(result: Result[R])
tests/e2e/e2e_http.py:135
↓ 25 callersMethodvalidate_environment
( self, *, headers: dict[str, object], model: str, api_key: str | None
tests/test_litellm/ocr/test_rust_bridge.py:163
↓ 24 callersFunctionX
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:1
↓ 24 callersFunctionZ
({title:e,section:r,redisType:a,embeddingModels:s,gridCols:n="grid-cols-1 gap-6 sm:grid-cols-2",headingLevel:l
litellm/proxy/_experimental/out/_next/static/chunks/00fcsizkvc4hx.js:1
↓ 24 callersFunction_base_patches
(agent: MagicMock)
tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py:382
↓ 24 callersMethod_check_custom_proxy
for cloudflare ai gateway - https://github.com/BerriAI/litellm/issues/4317 Handles custom api_base for: 1. Gemini (Google AI
litellm/llms/vertex_ai/vertex_llm_base.py:598
↓ 24 callersFunction_common_call_kwargs
(client)
tests/test_litellm/llms/soniox/audio_transcription/test_soniox_audio_transcription_handler.py:90
↓ 24 callersMethod_config
(self)
tests/test_litellm/llms/oci/embed/test_oci_embed_transformation.py:38
↓ 24 callersMethod_get_aws_region_name
Get the AWS region name from the environment variables. Parameters: optional_params (dict): Optional parameters for the
litellm/llms/bedrock/base_aws_llm.py:534
↓ 24 callersFunction_install_litellm_config
Ensure mock_prisma.db.litellm_config exists with async methods (the conftest only stubs ``litellm_configtable`` — this is a different table).
tests/test_litellm/proxy/proxy_server/test_routes_config.py:21
↓ 24 callersFunction_make_agent_mock
(url: str = "http://backend-agent:10001")
tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py:355
↓ 24 callersFunction_make_handler
Construct the handler with auth + proxy seams patched at the instance level. ``_ensure_access_token`` and ``_check_custom_proxy`` are inherited f
tests/test_litellm/llms/vertex_ai/batches/test_handler.py:79
↓ 24 callersMethod_make_pr
(self, **overrides)
tests/test_litellm/test_github_triage_with_llm.py:865
↓ 24 callersFunction_request_body
()
tests/test_litellm/proxy/test_budget_reservation.py:53
↓ 24 callersFunction_supports_factory
Check if the given model supports function calling and return a boolean value. Parameters: model (str): The model name to be checked.
litellm/utils.py:2332
↓ 24 callersMethodadd_litellm_success_callback
Add a success callback to `litellm.success_callback`. Auto-routes async callbacks to litellm._async_success_callback. Special
litellm/litellm_core_utils/logging_callback_manager.py:67
↓ 24 callersMethodcalculate_usage
( self, usage_object: dict, reasoning_content: Optional[str], completion_respo
litellm/llms/anthropic/chat/transformation.py:2069
↓ 24 callersMethodcomplete
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:5
↓ 24 callersFunctione
(e)
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 24 callersFunctione2
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 24 callersFunctionea
()
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 24 callersFunctionek
(e,t=4)
litellm/proxy/_experimental/out/_next/static/chunks/07gcu2m75dl2k.js:1
↓ 24 callersMethodgetAPIList
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 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:64
↓ 24 callersFunctionget_model_info
(token, model)
litellm/litellm_core_utils/prompt_templates/factory.py:649
↓ 24 callersFunctionget_prisma_client_or_throw
(message: str)
litellm/proxy/management_endpoints/mcp_management_endpoints.py:660
↓ 24 callersFunctionget_request_base_url
Get the base URL for the request, considering X-Forwarded-* headers. Resolution order: ``PROXY_BASE_URL`` env var, then X-Forwarded-* when
litellm/proxy/_experimental/mcp_server/oauth_utils.py:93
↓ 24 callersMethodget_supported_openai_params
(self, model: str)
tests/local_testing/test_custom_llm.py:571
↓ 24 callersMethoditems
(self)
tests/pass_through_unit_tests/test_pass_through_unit_tests.py:52
↓ 24 callersMethodmodel_dump
(self)
litellm/router_strategy/budget_limiter.py:90
↓ 24 callersMethodmodel_dump
(self, exclude_none=True)
tests/test_litellm/integrations/test_mlflow.py:176
↓ 24 callersMethodpre_call
(self, input, api_key, model=None, additional_args={})
litellm/types/utils.py:3439
← previousnext →501–600 of 71,069, ranked by callers