MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions86,368 in github.com/BerriAI/litellm

↓ 83 callersFunction_make_guardrail
( inspection_type="chat", event_hook="pre_call", *, name="t", api_key="x", default_on=
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:230
↓ 83 callersFunctionh
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 82 callersMethodcontains
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 82 callersFunctiong
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 82 callersFunctiony
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 81 callersFunctionN
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 81 callersMethodbase_process_llm_request
Common request processing logic for both chat completions and responses API endpoints
litellm/proxy/common_request_processing.py:1623
↓ 81 callersMethodconnect
(self)
tests/proxy_unit_tests/test_key_generate_prisma.py:3790
↓ 81 callersFunctioni
(i)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 81 callersFunctionw
({props:e})
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 80 callersMethodfind_unique
(self, where: Dict[str, Any])
tests/test_litellm/repositories/test_repositories.py:58
↓ 79 callersFunctiongeneric_cost_per_token
Calculates the cost per token for a given model, prompt tokens, and completion tokens. Handles context caching as well. Input:
litellm/litellm_core_utils/llm_cost_calc/utils.py:701
↓ 78 callersMethodinfo
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/3ytz29phknzsy.js:1
↓ 78 callersMethodmodel_dump_json
(self, *, exclude_none: bool = False)
litellm/proxy/management_endpoints/model_management_endpoints.py:110
↓ 78 callersMethodput
(path: string, options?: RequestOptions)
ui/litellm-dashboard/src/lib/http/client.ts:113
↓ 77 callersFunctionmake_handler
Factory for test handlers with standard defaults.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_panw_prisma_airs.py:110
↓ 75 callersMethodtype
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 74 callersFunctionE
({node:e,className:n,children:r,...o})
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 74 callersFunction_patch_inspection_post
(g: CiscoAIDefenseGuardrail, post_mock: Any)
tests/test_litellm/proxy/guardrails/guardrail_hooks/_cisco_ai_defense_test_utils.py:58
↓ 74 callersMethodremoveObserver
(e)
litellm/proxy/_experimental/out/_next/static/chunks/20mvgyvrlrdla.js:1
↓ 73 callersMethod_handle_llm_api_exception
Raises ProxyException (OpenAI API compatible) if an exception is raised
litellm/proxy/common_request_processing.py:2667
↓ 73 callersFunctionis_request_body_safe
Check if the request body is safe. A malicious user can set the api_base to their own domain and invoke POST /chat/completions to intercept
litellm/proxy/auth/auth_utils.py:407
↓ 73 callersMethodlist
(e={},t)
litellm/proxy/_experimental/out/_next/static/chunks/42gio3rky08u5.js:7
↓ 73 callersMethodread
Read response content.
litellm/integrations/mock_client_factory.py:75
↓ 73 callersMethodupdate
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2fckmmo55b3as.js:1
↓ 73 callersFunctionz
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:9
↓ 72 callersFunction_read_request_body
Safely read the request body and parse it as JSON. Parameters: - request: The request object to read the body from Returns: - d
litellm/proxy/common_utils/http_parsing_utils.py:43
↓ 72 callersMethodlist
List all API keys with optional filtering and pagination. Args: page (Optional[int]): Page number for pagination
litellm/proxy/client/keys.py:35
↓ 72 callersMethodupdate_from_kwargs
Convenience wrapper around update_environment_variables that automatically extracts metadata/litellm_metadata from kwargs, so
litellm/litellm_core_utils/litellm_logging.py:572
↓ 72 callersFunctionx
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 71 callersFunctionencode_url_path_segment
Percent-encode one user-controlled URL path segment. ``urllib.parse.quote(..., safe="")`` intentionally leaves RFC 3986 unreserved characters
litellm/litellm_core_utils/url_utils.py:47
↓ 71 callersMethodexit
()
litellm/proxy/_experimental/out/_next/static/chunks/3z-oetkpttgun.js:1
↓ 71 callersMethodextend
(self, key, token, ttl_seconds)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_redis_refresh_coordinator.py:34
↓ 71 callersMethodfind_unique
( self, where: Mapping[str, object], include: Mapping[str, bool] | None = None, )
litellm/proxy/agent_endpoints/agent_registry.py:63
↓ 71 callersMethodkey
Create a virtual key; delete it on teardown. `models` restricts which models the key may call (None/[] means all). `user_id` is required for
tests/e2e/lifecycle.py:67
↓ 70 callersMethodget_provider_responses_api_config
( provider: LlmProviders | str, model: str | None = None, )
litellm/utils.py:8241
↓ 70 callersFunctionid
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:24
↓ 70 callersMethodstart
Start the logging worker. Idempotent - safe to call multiple times.
litellm/litellm_core_utils/logging_worker.py:85
↓ 69 callersFunction_user
(user_id: str = "user-1", team_id: str = "team-1")
tests/pass_through_unit_tests/test_passthrough_managed_ids.py:59
↓ 69 callersFunctionb
({teams:e,isLoading:t,onJoinTeam:l})
litellm/proxy/_experimental/out/_next/static/chunks/0u0-hzwjwlynn.js:1
↓ 69 callersMethodemit
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/2q3uods7pdkez.js:2
↓ 68 callersFunction_codes
(tmp_path, source)
tests/test_litellm/test_check_type_discipline.py:23
↓ 68 callersMethodasync_set_cache
(self, key, value, local_only: bool = False, **kwargs)
litellm/proxy/common_utils/user_api_key_cache.py:137
↓ 68 callersMethodhasListeners
()
litellm/proxy/_experimental/out/_next/static/chunks/20mvgyvrlrdla.js:1
↓ 68 callersMethodis_empty
(&self)
litellm-rust/crates/ai-gateway/src/integrations/custom_logger/mod.rs:46
↓ 67 callersFunction_logger
(legacy_compat=True, team_metadata_keys=None)
tests/test_litellm/integrations/otel/test_otel_v2_logger.py:107
↓ 67 callersMethodmodel_dump
(self, **_kwargs)
tests/test_litellm/proxy/utils/helpers/test_model_access.py:280
↓ 67 callersFunctionrequire_successful_call
A call that should have succeeded but didn't is a hard failure, never a skip: if the proxy can't make a call it's expected to, the test must fail.
tests/e2e/e2e_http.py:212
↓ 66 callersMethodpost_call_failure_hook
Allows users to raise custom exceptions/log when a call fails, without having to deal with parsing Request body. Callbacks can return
litellm/proxy/utils.py:2049
↓ 66 callersMethodreset
(self)
litellm/router.py:11856
↓ 65 callersFunctionD
({accessToken:e,selectedServers:r,onChange:o})
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:23
↓ 65 callersFunctiona
(_)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 65 callersMethodasync_pre_routing_hook
Pre-routing hook called before the routing decision. When `session_affinity` is enabled and a session_id is resolvable on the reques
litellm/router_strategy/complexity_router/complexity_router.py:1676
↓ 65 callersFunctionhandle_exception_on_proxy
Returns an Exception as ProxyException, this ensures all exceptions are OpenAI API compatible
litellm/proxy/utils.py:6213
↓ 64 callersFunctiondecrypt_value_helper
( value: str, key: str, # this is just for debug purposes, showing the k,v pair that's invalid. not a
litellm/proxy/common_utils/encrypt_decrypt_utils.py:119
↓ 64 callersMethodenter
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 64 callersFunctionfailure_diagnostic
Build a human-readable error string from a non-zero `claude` CLI run. The CLI is annoying to debug because the most useful failure signal rar
tests/e2e/claude_code/cli_driver.py:533
↓ 64 callersFunctionrequire_proxy
Return the proxy config (base URL + master key), or hard-fail the test. ``env`` is injected for tests; production callers pass nothing and
tests/e2e/claude_code/_env.py:62
↓ 64 callersMethodwalk
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 63 callersMethodcount
(self, where: Optional[Dict[str, Any]] = None)
tests/test_litellm/repositories/test_repositories.py:112
↓ 63 callersFunctionderiveErrorMessage
(errorData: any)
ui/litellm-dashboard/src/lib/http/client.ts:55
↓ 63 callersFunctionre
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:24
↓ 62 callersFunctionI
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 62 callersFunctionR
()
litellm/proxy/_experimental/out/_next/static/chunks/0u0-hzwjwlynn.js:1
↓ 62 callersMethodadd_standard_logging_guardrail_information_to_request_data
Builds `StandardLoggingGuardrailInformation` and adds it to the request metadata so it can be used for logging to DataDog, Langfuse, etc.
litellm/integrations/custom_guardrail.py:888
↓ 62 callersMethodcreate
Create a new record.
litellm/repositories/base_repository.py:98
↓ 62 callersMethodget_model_list
Includes router model_group_alias'es as well if team_id specified, returns matching team-specific models
litellm/router.py:9945
↓ 62 callersMethodsubmit
(self, fn, *args, **kwargs)
tests/test_litellm/a2a_protocol/test_a2a_streaming_iterator.py:38
↓ 62 callersMethodupdate_environment
( self, prisma_client: PrismaClient | None, user_api_key_cache: UserApiKeyCache,
litellm/proxy/auth/handle_jwt.py:125
↓ 61 callersMethodchunk_parser
(self, chunk: dict)
litellm/llms/cohere/common_utils.py:125
↓ 61 callersFunctionprint_verbose
(print_statement)
litellm/_logging.py:447
↓ 61 callersFunctionq
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:23
↓ 61 callersFunctionrun_claude_models_parallel
Invoke `run_claude` for every `models[i]` concurrently and collect outcomes. Each `claude` CLI invocation is a long-lived subprocess that spends
tests/e2e/claude_code/cli_driver.py:308
↓ 60 callersFunction_gemini_convert_messages_with_history
Converts given messages from OpenAI format to Gemini format - Parts must be iterable - Roles must alternate b/w 'user' and 'model' (same
litellm/llms/vertex_ai/gemini/transformation.py:689
↓ 60 callersFunction_make_guardrail
(api_key: str = "hs-cato-key", **extra)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_cato_networks.py:350
↓ 60 callersFunctionu
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 60 callersFunctionu
(e)
litellm/proxy/_experimental/out/_next/static/chunks/367xbj6_12vhd.js:1
↓ 59 callersFunction_get_encoding
Get encoding, loading it lazily if needed.
litellm/main.py:8831
↓ 59 callersMethodabort
()
litellm/proxy/_experimental/out/_next/static/chunks/20mvgyvrlrdla.js:2
↓ 59 callersMethodbearer
(self, key: str)
tests/e2e/transport.py:100
↓ 59 callersMethodmake_bedrock_api_request
Dispatch to the configured Bedrock guardrail API. ``checks`` selects the resource-less, detect-only InvokeGuardrailChecks API; otherw
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:765
↓ 58 callersFunctionB
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 58 callersFunctionM
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 58 callersMethodaembedding
( self, model: str, input: list, model_response: EmbeddingResponse, pr
tests/local_testing/test_custom_llm.py:293
↓ 58 callersMethodconsume
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0aoel7yrv88fp.js:1
↓ 58 callersFunctiongenerate_key_fn
Generate an API key based on the provided data. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optio
litellm/proxy/management_endpoints/key_management_endpoints.py:1546
↓ 58 callersMethodmodel_validate
(cls, value)
tests/llm_responses_api_testing/test_responses_hooks.py:712
↓ 58 callersMethodrun
()
tests/llm_translation/test_llm_response_utils/test_convert_dict_to_chat_completion.py:1934
↓ 58 callersFunctiont3
(e,t,s,r)
litellm/proxy/_experimental/out/_next/static/chunks/42gio3rky08u5.js:4
↓ 57 callersFunction_bridge_server
(**overrides)
tests/test_litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py:4439
↓ 57 callersFunction_make_signer
(**kwargs: Any)
tests/test_litellm/proxy/guardrails/test_mcp_jwt_signer.py:55
↓ 57 callersMethodconcat
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 57 callersMethodembedding
( self, model: str, input: list, model_response: EmbeddingResponse, pr
tests/local_testing/test_custom_llm.py:267
↓ 57 callersFunctionencrypt_value_helper
(value: str, new_encryption_key: str | None = None)
litellm/proxy/common_utils/encrypt_decrypt_utils.py:94
↓ 57 callersMethodflush_cache
(self)
litellm/router.py:11852
↓ 57 callersMethoditems
(self)
litellm/router_strategy/budget_limiter.py:78
↓ 57 callersFunctionnew_team
Allow users to create a new team. Apply user permissions to their team. 👉 [Detailed Doc on setting team budgets](https://docs.litellm.ai/doc
litellm/proxy/management_endpoints/team_endpoints.py:1133
↓ 56 callersFunctioncommon_checks
Common checks across jwt + key-based auth. 1. If team is blocked 1.1. If project is blocked 2. If team can call model 2.2 If pro
litellm/proxy/auth/auth_checks.py:504
↓ 56 callersFunctionexception_type
Maps an LLM Provider Exception to OpenAI Exception Format
litellm/litellm_core_utils/exception_mapping_utils.py:2157
↓ 56 callersMethodindex
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
← previousnext →201–300 of 86,368, ranked by callers