MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions86,368 in github.com/BerriAI/litellm

↓ 25 callersFunctionencode_video_id_with_provider
Encode provider and model_id into video_id using base64.
litellm/types/videos/utils.py:38
↓ 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 callersFunctionget_model_info
(token, model)
litellm/litellm_core_utils/prompt_templates/factory.py:648
↓ 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 callersFunctiono
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.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 callersMethodserialize
Encode a value for DualCache / Redis (``json.dumps``-safe). If ``model_type`` is set, the payload is validated with that model, then
litellm/proxy/common_utils/cache_pydantic_utils.py:40
↓ 25 callersFunctionsetup_proxy_logging_object
(monkeypatch, llm_router: Router)
tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py:75
↓ 25 callersMethodtoRefractedElement
(s,o,i={})
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 25 callersFunctiontr
({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})
litellm/proxy/_experimental/out/_next/static/chunks/0jf45vdwkbyvs.js:1
↓ 25 callersMethodtransform_rerank_request
( self, model: str, optional_rerank_params: dict, headers: dict, litel
litellm/llms/voyage/rerank/transformation.py:70
↓ 25 callersMethodvalidate_environment
( self, *, headers: dict[str, object], model: str, api_key: str | None
tests/test_litellm/ocr/test_rust_bridge.py:163
↓ 25 callersFunctionw
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:39
↓ 24 callersFunction_base_patches
(agent: MagicMock)
tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py:382
↓ 24 callersFunction_build_key_filter_conditions
Build filter conditions for key listing. Visibility rules: - Users always see their own keys (user_id match) - Team admins see ALL keys f
litellm/proxy/management_endpoints/key_management_endpoints.py:5698
↓ 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 callersFunction_get
(query: str = WINDOW)
tests/test_litellm/proxy/management_endpoints/management_v1/test_spend_logs.py:80
↓ 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:542
↓ 24 callersFunction_make_agent_mock
(url: str = "http://backend-agent:10001")
tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py:355
↓ 24 callersMethod_make_pr
(self, **overrides)
tests/test_litellm/test_github_triage_with_llm.py:865
↓ 24 callersFunction_make_row
Build a Prisma-like row object.
tests/test_litellm/proxy/memory/test_memory_endpoints.py:25
↓ 24 callersFunction_make_run
( run_id: str = "run-1", session_id: str = "sess-1", workflow_type: str = "shin-builder", stat
tests/test_litellm/proxy/management_endpoints/test_workflow_management_endpoints.py:32
↓ 24 callersFunction_mock_rows
(mock_prisma_client, end_users: List[str])
tests/test_litellm/proxy/management_endpoints/management_v1/test_spend_logs.py:68
↓ 24 callersFunction_posted_payload
(g: StraikerGuardrail)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_straiker.py:70
↓ 24 callersFunction_sealed_token
(grant: UpstreamTokenGrant, keys: EnvelopeKeys = _KEYS)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_envelope.py:80
↓ 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:2316
↓ 24 callersMethod_transform_openai_jsonl_content_to_bedrock_jsonl_content
Transforms OpenAI JSONL content to Bedrock batch format Bedrock batch format: { "recordId": "alphanumeric string", "modelInput": {JS
litellm/llms/bedrock/files/transformation.py:734
↓ 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:1546
↓ 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:68
↓ 24 callersFunctionasync_data_generator
( response, user_api_key_dict: UserAPIKeyAuth, request_data: dict, request: Request | None = N
litellm/proxy/proxy_server.py:7635
↓ 24 callersMethodcount
Count records matching the criteria.
litellm/repositories/base_repository.py:115
↓ 24 callersMethoddelete_model
(self, model_id: str)
tests/e2e/batches/batch_client.py:101
↓ 24 callersFunctione
(e)
litellm/proxy/_experimental/out/_next/static/chunks/367xbj6_12vhd.js:1
↓ 24 callersFunctioneT
(e)
litellm/proxy/_experimental/out/_next/static/chunks/3ytz29phknzsy.js:1
↓ 24 callersMethodgetAPIList
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/20tbz4la9grhq.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 callersMethodget_deployment_credentials_with_provider
Get API credentials and provider info from a model name in model_list. Useful for passthrough endpoints (files, batches, etc.) that n
litellm/router.py:8735
↓ 24 callersFunctionget_instance_fn
(value: str, config_file_path: str | None = None)
litellm/proxy/types_utils/utils.py:9
↓ 24 callersMethodget_labels_for_metric
Get the labels for a metric, filtered if configured. The result is cached on the instance so the label set used to construct
litellm/integrations/prometheus.py:1115
↓ 24 callersMethodget_mcp_server_by_id
Get the MCP Server from the server id
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:5569
↓ 24 callersFunctionget_prisma_client_or_throw
(message: str)
litellm/proxy/management_endpoints/mcp_management_endpoints.py:750
↓ 24 callersMethodget_supported_openai_params
(self, model: str)
tests/local_testing/test_custom_llm.py:571
↓ 24 callersFunctionis_budget_block
True if the call was rejected for being over budget (vs a provider error).
tests/e2e/quota_management/budgets/budget_client.py:187
↓ 24 callersMethoditems
(self)
tests/pass_through_unit_tests/test_pass_through_unit_tests.py:53
↓ 24 callersMethodkey_info
(self, key: str)
tests/e2e/proxy_client.py:231
↓ 24 callersMethodload_attachments
Load attachments from a configuration list. Args: attachments_config: List of attachment dictionaries from YAML.
litellm/proxy/policy_engine/attachment_registry.py:57
↓ 24 callersFunctionnow
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 24 callersFunctionperform_redaction
Performs the actual redaction on the logging object and result. redact_streaming_responses=False skips the in-place redaction of the shared
litellm/litellm_core_utils/redact_messages.py:229
↓ 24 callersMethodpost_call_success_hook
Allow user to modify outgoing data Covers: 1. /chat/completions 2. /embeddings 3. /image/generation
litellm/proxy/utils.py:2311
↓ 24 callersMethodpre_call
(self, input, api_key, model=None, additional_args=None)
litellm/types/utils.py:3775
↓ 24 callersFunctionprint_verbose
(print_statement)
litellm/litellm_core_utils/streaming_handler.py:84
↓ 24 callersMethodprocess_input_messages
Process input messages by applying guardrails to text content.
litellm/llms/openai/chat/guardrail_translation/handler.py:74
↓ 24 callersMethodsafe_get_vertex_ai_project
Safely get Vertex AI project without mutating the litellm_params dict. Unlike get_vertex_ai_project(), this does NOT pop values from
litellm/llms/vertex_ai/vertex_llm_base.py:1153
↓ 24 callersMethoduse
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 23 callersFunction_build_model_response
(content: str)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_xecguard.py:64
↓ 23 callersMethod_calculate_usage
( completion_response: GenerateContentResponseBody | BidiGenerateContentServerMessage, )
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:1739
↓ 23 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:82
↓ 23 callersMethod_map_function
Map OpenAI-style tools/functions to Vertex AI format. Args: value: List of tool definitions optional_params:
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py:563
↓ 23 callersFunction_mock_prisma
()
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_partial_update.py:28
↓ 23 callersFunction_proxy_attrs_for_centralized_checks
Build the minimal proxy_server module attributes that _run_centralized_common_checks reads. ``master_key`` defaults to a non-None value becau
tests/test_litellm/proxy/auth/test_user_api_key_auth.py:3588
↓ 23 callersFunction_run_centralized_common_checks
Run ``common_checks`` once at the ``user_api_key_auth`` wrapper boundary, regardless of which ``_user_api_key_auth_builder`` path returned. Th
litellm/proxy/auth/user_api_key_auth.py:2140
↓ 23 callersMethodaccept
Accept the WebSocket connection
tests/llm_translation/realtime/base_realtime_tests.py:42
↓ 23 callersFunctionadd_server_prefix_to_name
Add server name prefix to any MCP resource name.
litellm/proxy/_experimental/mcp_server/utils.py:249
↓ 23 callersMethodapply_guardrail
(self, inputs, request_data, input_type, logging_obj=None)
tests/test_litellm/integrations/test_custom_guardrail.py:2053
↓ 23 callersMethodchat
(self, key: str, model: str, text: str)
tests/e2e/logging/logging_client.py:429
↓ 23 callersMethodcheck
(self, text: str)
litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/test_eval.py:520
↓ 23 callersFunctioncleanup_router_config_variables
()
litellm/proxy/proxy_server.py:794
↓ 23 callersMethodcreate
( self, data: Mapping[str, object], include: Mapping[str, bool] | None = None, )
litellm/proxy/management_endpoints/team_endpoints.py:192
↓ 23 callersMethodcreate
(self, data: Dict[str, Any])
tests/test_litellm/repositories/test_repositories.py:74
↓ 23 callersFunctioncreate_audit_log_for_update
Create an audit log for an object.
litellm/proxy/management_helpers/audit_logs.py:195
↓ 23 callersFunctionei
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 23 callersMethodemit
(self, record: logging.LogRecord)
tests/test_litellm/proxy/proxy_server/test_proxy_config.py:1310
↓ 23 callersMethodgetState
()
litellm/proxy/_experimental/out/_next/static/chunks/28hnu_qv5e_c_.js:1
↓ 23 callersMethodget_error_class
(self, error_message, status_code, headers)
tests/test_litellm/llms/base_llm/batches/test_transformation.py:87
↓ 23 callersMethodget_labels
(label_name: DEFINED_PROMETHEUS_METRICS)
litellm/types/integrations/prometheus.py:783
↓ 23 callersMethodget_mcp_server_by_name
Get the MCP Server from the server name. Uses priority-based matching to avoid collisions: 1. First pass: exact alias match
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:5673
↓ 23 callersMethodget_model_ids
if 'model_name' is none, returns all. Returns list of model id's. Optimized with O(1) or O(k) index lookup when model_name
litellm/router.py:9543
↓ 23 callersFunctionget_secret_bool
Guarantees response from 'get_secret' is either boolean or none. Used for fixing linting errors. Args: secret_name: The name of the
litellm/secret_managers/main.py:166
↓ 23 callersMethodinit
No global setup needed today; present for lifecycle symmetry.
tests/e2e/lifecycle.py:59
↓ 23 callersMethodraise_for_status
(self)
tests/test_litellm/test_check_licenses.py:29
↓ 23 callersMethodremove
(e)
litellm/proxy/_experimental/out/_next/static/chunks/19frz_r2jewoi.js:1
↓ 23 callersMethodsetup_canadian_guardrail
Setup guardrail with all Canadian PII patterns (mimics the policy template)
tests/test_litellm/proxy/guardrails/guardrail_hooks/content_filter/test_ca_policy_e2e.py:21
↓ 23 callersMethodstart
(self)
litellm/proxy/common_utils/config_sync_pubsub.py:217
↓ 23 callersFunctionsupports_function_calling
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:2276
↓ 23 callersMethodtransform_realtime_response
Keep this state less - leave the state management (e.g. tracking current_output_item_id, current_response_id, current_conversation_id, curren
litellm/llms/gemini/realtime/transformation.py:1143
↓ 23 callersFunctionts
()
litellm/proxy/_experimental/out/_next/static/chunks/2ghof0nt7xbjx.js:1
↓ 23 callersFunctiontv
litellm/proxy/_experimental/out/_next/static/chunks/20tbz4la9grhq.js:1
↓ 23 callersMethodupdate_environment_variables
( self, litellm_params: dict, optional_params: dict, model: str | None = None,
litellm/litellm_core_utils/litellm_logging.py:523
↓ 23 callersFunctionuseFn
(s=void 0)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 22 callersMethod_bedrock_converse_messages_pt_async
( messages: list, model: str, llm_provider: str, user_continue_message: ChatCo
litellm/litellm_core_utils/prompt_templates/factory.py:4304
↓ 22 callersFunction_bedrock_tools_pt
OpenAI tools looks like: tools = [ { "type": "function", "function": { "name": "get_current_w
litellm/litellm_core_utils/prompt_templates/factory.py:4984
↓ 22 callersMethod_callback_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:1665
↓ 22 callersMethod_make
(env=None, config_value=None)
tests/test_litellm/integrations/test_opentelemetry.py:797
↓ 22 callersFunction_make_model
(model_id: str, model_name: str = "gpt-4")
tests/test_litellm/router_utils/test_health_check_allowed_fails_integration.py:19
↓ 22 callersFunction_make_response
Build a mock httpx response with the given JSON body.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_promptguard.py:57
↓ 22 callersFunction_member_resolution_prisma
Prisma mock where only the given ids resolve to a user row / team row. ``teams`` are teams a SCIM group write created, so they carry provenance;
tests/test_litellm/proxy/management_endpoints/scim/test_scim_v2_endpoints.py:3535
↓ 22 callersFunction_process_group_patch_operations
Process patch operations for a group and return update data, final members and, when the request contained a member ``replace`` op, the absolute t
litellm/proxy/management_endpoints/scim/scim_v2.py:2267
↓ 22 callersFunction_simple_chunk
(model: str = "gpt-4", content: str = "hi")
tests/test_litellm/proxy/proxy_server/test_streaming_helpers.py:49
↓ 22 callersMethod_transform_response_api_usage_to_chat_usage
Transforms ResponseAPIUsage or ImageUsage to a Usage object. Both have the same spec with input_tokens, output_tokens, and i
litellm/responses/utils.py:1035
← previousnext →701–800 of 86,368, ranked by callers