MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions86,368 in github.com/BerriAI/litellm

↓ 28 callersMethodcalculate_usage
( self, usage_object: dict, reasoning_content: str | None, completion_response
litellm/llms/anthropic/chat/transformation.py:2120
↓ 28 callersMethodclone
()
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:1
↓ 28 callersMethodclose
(self)
litellm/proxy/auth/handle_jwt.py:1041
↓ 28 callersMethodcommon_processing_pre_call_logic
( self, request: Request, general_settings: dict, user_api_key_dict: UserAPIKe
litellm/proxy/common_request_processing.py:1172
↓ 28 callersMethodcount
(self, where: Mapping[str, object] | None = None)
litellm/proxy/management_endpoints/scim/scim_v2.py:93
↓ 28 callersFunctiondecode
Decode *managed_id*. Returns ``None`` for anything that is not a passthrough managed ID — raw OpenAI IDs, unified-endpoint IDs, garbage,
litellm/proxy/pass_through_endpoints/managed_id_codec.py:48
↓ 28 callersMethodflush
Flush the logging queue. Waits until every enqueued task has completed. ``queue.join()`` blocks on the queue's unfinished-task counte
litellm/litellm_core_utils/logging_worker.py:362
↓ 28 callersMethodfreeze
()
litellm/proxy/_experimental/out/_next/static/chunks/3ytz29phknzsy.js:1
↓ 28 callersMethodget_base_completion_call_args
Must return the base completion call args
tests/llm_translation/base_llm_unit_tests.py:82
↓ 28 callersFunctionhash_token
(token: str)
litellm/proxy/_types.py:225
↓ 28 callersMethodload
(self)
litellm/proxy/proxy_cli.py:541
↓ 28 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:430
↓ 28 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
↓ 28 callersMethodrun
()
litellm/proxy/_experimental/out/_next/static/chunks/3z-oetkpttgun.js:1
↓ 28 callersMethodsetA
(e)
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:1
↓ 28 callersFunctiontoken_counter
Count the number of tokens in a given text using a specified model. Args: model (str): The name of the model to use for tokenization. De
litellm/litellm_core_utils/token_counter.py:334
↓ 28 callersMethodtransform
Transform LiteLLM data to CBF format, dropping records with zero successful_requests or invalid CZRNs.
litellm/integrations/cloudzero/transform.py:37
↓ 28 callersMethodtransform_rerank_response
( self, model: str, raw_response: httpx.Response, model_response: RerankRespon
litellm/llms/voyage/rerank/transformation.py:79
↓ 28 callersMethodupdate
( self, where: Mapping[str, object], data: Mapping[str, object] )
litellm/proxy/guardrails/guardrail_endpoints.py:79
↓ 28 callersFunctionuseComponent
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 27 callersMethod__init__
( self, message, model, llm_provider, litellm_debug_info: str | None =
litellm/exceptions.py:331
↓ 27 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:22
↓ 27 callersFunction_make_access_group_record
( access_group_id: str = "ag-123", access_group_name: str = "test-group", description: str | None
tests/test_litellm/proxy/management_endpoints/test_access_group_endpoints.py:27
↓ 27 callersMethod_normalize_otel_endpoint
Normalize the endpoint URL for a specific OpenTelemetry signal type. The OTLP exporters expect endpoints to use signal-specific path
litellm/integrations/opentelemetry.py:3053
↓ 27 callersMethod_run_check
(self, server: MCPServer, name: str, arguments: dict[str, Any] | None = None)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py:9265
↓ 27 callersFunction_team_row
()
tests/test_litellm/proxy/proxy_server/test_team_model_name_translation.py:29
↓ 27 callersFunction_user_api_key_auth_builder
( request: Request, api_key: str, azure_api_key_header: str, anthropic_api_key_header: str | N
litellm/proxy/auth/user_api_key_auth.py:1063
↓ 27 callersMethodacquire_lock
Attempt to acquire the lock for a specific cron job using Redis. Uses the SET command with NX and EX options to ensure atomicity.
litellm/proxy/db/db_transaction_queue/pod_lock_manager.py:42
↓ 27 callersMethodafile_content
( self, file_id, litellm_parent_otel_span, llm_router, **data )
tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py:333
↓ 27 callersMethodasync_log_failure_event
(self, kwargs, response_obj, start_time, end_time)
tests/test_litellm/proxy/test_litellm_pre_call_utils.py:2306
↓ 27 callersMethodasync_service_success_hook
Arize is used mainly for LLM I/O tracing, sending router+caching metrics adds bloat to arize logs
litellm/integrations/arize/arize.py:113
↓ 27 callersMethodcall_cato_guardrail
( self, data: dict, hook: str, key_alias: str | None, user_email: str
litellm/proxy/guardrails/guardrail_hooks/cato_networks/cato_networks.py:274
↓ 27 callersMethodcancel
(self)
tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py:354
↓ 27 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:610
↓ 27 callersFunctioneP
()
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 27 callersMethodexecute
(e)
litellm/proxy/_experimental/out/_next/static/chunks/20mvgyvrlrdla.js:1
↓ 27 callersMethodexists
Check if a record exists.
litellm/repositories/base_repository.py:119
↓ 27 callersMethodfind_many
Find multiple records matching the criteria.
litellm/repositories/base_repository.py:77
↓ 27 callersMethodget_custom_loggers_for_type
Get all custom loggers that are instances of the given class type
litellm/litellm_core_utils/logging_callback_manager.py:389
↓ 27 callersFunctionget_end_user_id_from_request_body
(request_body: dict, request_headers: dict | None = None)
litellm/proxy/auth/auth_utils.py:1242
↓ 27 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
↓ 27 callersMethodlabels
(self, *labelvalues: str, **labelkwargs: str)
litellm/integrations/prometheus.py:91
↓ 27 callersMethodrecreate_prisma_client
Disconnect and reconnect the Prisma client with a new database URL. Kills the old engine subprocess directly (SIGTERM → SIGKILL) rather than
litellm/proxy/db/prisma_client.py:521
↓ 27 callersFunctionrequestAnimationFrame
(...e)
litellm/proxy/_experimental/out/_next/static/chunks/2649p504vhh-y.js:1
↓ 27 callersFunctiont4
(e,t,s,r,a)
litellm/proxy/_experimental/out/_next/static/chunks/42gio3rky08u5.js:4
↓ 27 callersFunctiontS
({provider:e})
litellm/proxy/_experimental/out/_next/static/chunks/0jf45vdwkbyvs.js:1
↓ 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 callersFunctiontx
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/1pgh82nmoqy5j.js:3
↓ 27 callersMethodupdate_variables
(self, llm_router: Router)
litellm/proxy/hooks/dynamic_rate_limiter.py:82
↓ 26 callersFunction_full_grant
()
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_envelope.py:66
↓ 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:656
↓ 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:178
↓ 26 callersFunction_safe_response
(url: str = CHAT_URL)
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:81
↓ 26 callersMethodasync_increment_cache
Key - the key in cache Value - float - the value you want to increment by Refresh_ttl - bool - if True, resets the Redis TT
litellm/caching/dual_cache.py:371
↓ 26 callersMethodcancel_batch
( self, batch_id: str, *, key: str, provider: str | None = None )
tests/e2e/batches/batch_client.py:160
↓ 26 callersMethodclose
(self)
tests/test_litellm/llms/custom_httpx/test_http_handler.py:99
↓ 26 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:162
↓ 26 callersFunctioncopyToClipboard
( text: string | null | undefined, messageText: string = "Copied to clipboard", )
ui/litellm-dashboard/src/utils/dataUtils.ts:66
↓ 26 callersFunctioncreate_config_class
Generate config class dynamically from JSON configuration
litellm/llms/openai_like/dynamic_config.py:20
↓ 26 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:125
↓ 26 callersMethodexit
(self, server_id: str)
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_max_concurrent_requests.py:29
↓ 26 callersMethodgenerate_key
( self, *, user_id: str, mcp_servers: list[str] | None, mcp_access_gro
tests/e2e/mcp/mcp_client.py:221
↓ 26 callersMethodgetById
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2fckmmo55b3as.js:1
↓ 26 callersMethodgetValue
()
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:1
↓ 26 callersMethodget_available_deployment
Returns the deployment based on routing strategy
litellm/router.py:11328
↓ 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:328
↓ 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:335
↓ 26 callersFunctioni
(t=p)
litellm/proxy/_experimental/out/_next/static/chunks/28hnu_qv5e_c_.js:1
↓ 26 callersFunctionn
(...e)
litellm/proxy/_experimental/out/_next/static/chunks/28hnu_qv5e_c_.js:1
↓ 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:2533
↓ 26 callersFunctionprepare_key_update_data
( data: UpdateKeyRequest | RegenerateKeyRequest, existing_key_row: LiteLLM_VerificationToken, )
litellm/proxy/management_endpoints/key_management_endpoints.py:1958
↓ 26 callersFunctionprint_verbose
Prints the given `print_statement` to the console if `litellm.set_verbose` is True. Also logs the `print_statement` at the debug level using
litellm/proxy/utils.py:182
↓ 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 callersFunctionserver_span_factory
Factory mirroring user_api_key_auth: SERVER span + url.path + http.route.
tests/test_litellm/integrations/open_telemetry/conftest.py:50
↓ 26 callersFunctionstreaming_format_tests
(idx, chunk)
tests/local_testing/test_streaming.py:162
↓ 26 callersFunctiontb
litellm/proxy/_experimental/out/_next/static/chunks/1pgh82nmoqy5j.js:3
↓ 26 callersMethodtoHexString
()
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:1
↓ 26 callersMethodupdate
( self, where: Mapping[str, object], data: Mapping[str, object], )
litellm/proxy/management_endpoints/ui_sso.py:190
↓ 26 callersFunctionx
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 25 callersFunctionS
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 25 callersFunctionS
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/3-_nx473x7j2c.js:1
↓ 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:241
↓ 25 callersMethod_get_openai_compatible_provider_info
Get the OpenAI compatible provider info for Baseten
litellm/llms/baseten/chat.py:86
↓ 25 callersFunction_id_jag_config
()
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_resolver.py:56
↓ 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_logging_obj
(call_id: str)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_compresr.py:178
↓ 25 callersFunction_make_chunk
(delta: Delta, finish_reason: Optional[str] = None)
tests/test_litellm/llms/anthropic/experimental_pass_through/adapters/test_streaming_iterator_first_delta.py:46
↓ 25 callersFunction_make_guardrail
(**kwargs)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_headroom.py:77
↓ 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 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 callersMethodaudio_transcriptions
( self, model: str, audio_file: FileTypes, optional_params: dict, lite
litellm/llms/custom_httpx/llm_http_handler.py:1247
↓ 25 callersMethodchunk_creator
(self, chunk: Any)
litellm/llms/oci/chat/transformation.py:729
↓ 25 callersMethodclose
(self)
tests/e2e/test_e2e_http.py:28
↓ 25 callersFunctione
(t)
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:1
← previousnext →601–700 of 86,368, ranked by callers