MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions86,368 in github.com/BerriAI/litellm

↓ 172 callersMethodget_model_info
For a given model id, return the model info Returns - dict: the model in list with 'model_name', 'litellm_params', Optional[
litellm/router.py:8942
↓ 168 callersFunctioncn
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/367xbj6_12vhd.js:1
↓ 167 callersMethodhas
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 165 callersFunctionunwrap
(result: Result[R])
tests/e2e/e2e_http.py:184
↓ 163 callersMethodacompletion
( self, model: str, messages: list[AllMessageValues], stream: Literal[True], **kwargs )
litellm/router.py:1997
↓ 158 callersMethodisNaN
()
litellm/proxy/_experimental/out/_next/static/chunks/28hnu_qv5e_c_.js:1
↓ 154 callersMethodadd
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 154 callersFunctionuseAuthorized
()
ui/litellm-dashboard/src/app/(dashboard)/hooks/useAuthorized.ts:11
↓ 154 callersMethodvalues
()
litellm/proxy/_experimental/out/_next/static/chunks/1jfookxfajkeo.js:1
↓ 153 callersMethodsearch
(query: str)
tests/e2e/mcp/test_mcp_guardrail_e2e.py:115
↓ 152 callersFunction_get_httpx_client
Retrieves the HTTP client from the cache If not present, creates a new client Caches the new client and returns it.
litellm/llms/custom_httpx/http_handler.py:1482
↓ 152 callersFunctionauth_as
Context manager that overrides ``user_api_key_auth`` for a role. Usage:: def test_admin_only(client, auth_as): from litellm.
tests/test_litellm/proxy/proxy_server/conftest.py:178
↓ 147 callersFunctioni
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 142 callersFunctionc
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 142 callersMethodsetOpen
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/39cywnvrr19y0.js:1
↓ 141 callersFunctionrenderWithProviders
(ui: React.ReactElement, options?: RenderOptions & ProviderOptions)
ui/litellm-dashboard/tests/test-utils.tsx:28
↓ 140 callersFunctiona
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 140 callersMethodget_complete_url
(self, api_base, api_key, model, optional_params, litellm_params, stream=None)
tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py:1757
↓ 140 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 137 callersMethodcompletion
Example usage: response = router.completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hey, how's it going?"}]
litellm/router.py:1787
↓ 137 callersFunctionk
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 137 callersMethodload
Load providers from JSON configuration file
litellm/llms/openai_like/json_loader.py:34
↓ 137 callersFunctiononChange
(info)
ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/vertexCredentialsUpload.ts:21
↓ 135 callersMethodsplice
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/3ytz29phknzsy.js:1
↓ 134 callersFunctionget_llm_provider
Returns the provider for a given model name - e.g. 'azure/chatgpt-v-2' -> 'azure' For router -> Can also give the whole litellm param dict -
litellm/litellm_core_utils/get_llm_provider_logic.py:130
↓ 133 callersMethod_handle_error
( self, e: Exception, provider_config: Union[ BaseConfig, Base
litellm/llms/custom_httpx/llm_http_handler.py:5690
↓ 132 callersMethodwrite
(e)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 130 callersMethodmodel_dump
(self)
litellm/proxy/agent_endpoints/agent_registry.py:51
↓ 129 callersMethodpost_call
(self, original_response, input=None, api_key=None, additional_args={})
litellm/litellm_core_utils/litellm_logging.py:1123
↓ 125 callersMethodtoString
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 123 callersFunctionsafe_dumps
Recursively serialize data while detecting circular references. If a circular reference is detected then a marker string is returned. NUL
litellm/litellm_core_utils/safe_json_dumps.py:14
↓ 121 callersFunctionn
()
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 119 callersMethodcancel
(e)
litellm/proxy/_experimental/out/_next/static/chunks/2m0_88ia6ych8.js:1
↓ 119 callersMethodmodel_dump
(self)
litellm/proxy/management_endpoints/ui_sso.py:232
↓ 118 callersFunctionnormalize
Replace volatile field values with "<VOLATILE>" so dict equality works. Recursive over dicts and lists. Pass an explicit ``volatile`` set to
tests/test_litellm/proxy/proxy_server/conftest.py:47
↓ 118 callersMethodreject
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 117 callersMethodexists
(self, *names)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_redis_distributed_lock.py:51
↓ 117 callersMethodinvalidateQueries
(e,t={})
litellm/proxy/_experimental/out/_next/static/chunks/19frz_r2jewoi.js:1
↓ 116 callersMethodappend
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/1jfookxfajkeo.js:1
↓ 115 callersFunctionobject
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 115 callersMethodtext
(self)
litellm/proxy/_experimental/mcp_server/sampling_handler.py:310
↓ 113 callersFunctiond
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 111 callersFunctionm
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 111 callersMethodvalues
(self)
tests/pass_through_unit_tests/test_pass_through_unit_tests.py:59
↓ 110 callersMethodclear
()
litellm/proxy/_experimental/out/_next/static/chunks/1jfookxfajkeo.js:1
↓ 110 callersMethodupdate
( self, where: Dict[str, Any], data: Dict[str, Any] )
tests/test_litellm/repositories/test_repositories.py:86
↓ 109 callersFunctionget_secret
( secret_name: str, default_value: str | bool | None = None, )
litellm/secret_managers/main.py:189
↓ 109 callersFunctionl
(e)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 109 callersFunctionv
(e)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 108 callersFunctionhandleError
(errorData: string | any)
ui/litellm-dashboard/src/components/networking.tsx:332
↓ 107 callersFunctionu
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 106 callersFunctionC
({store:e,modal:t})
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 105 callersFunctionOk
(e)
litellm/proxy/_experimental/out/_next/static/chunks/28hnu_qv5e_c_.js:5
↓ 105 callersMethodvalidate_environment
( self, headers, model, messages, optional_params, litellm_par
tests/test_litellm/llms/base_llm/batches/test_transformation.py:50
↓ 104 callersMethodflatMap
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 102 callersFunctionT
({message:e,onEdit:r,isStreaming:o})
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 102 callersFunctionf
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 102 callersMethodmodel_dump
(self, **kwargs)
litellm/llms/sap/chat/models.py:53
↓ 102 callersMethodupdate
(self, where: Dict[str, Any], data: Dict[str, Any])
tests/test_litellm/proxy/memory/test_memory_endpoints.py:139
↓ 101 callersMethodclone
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 100 callersMethodacompletion
(self, **kwargs)
tests/test_litellm/llms/anthropic/experimental_pass_through/context_management/test_compact.py:1095
↓ 99 callersFunctiono
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 97 callersFunction$
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/3fzya67r1y1fl.js:1
↓ 97 callersFunctionadd_litellm_data_to_request
Adds LiteLLM-specific data to the request. Args: data (dict): The data dictionary to be modified. request (Request): The inc
litellm/proxy/litellm_pre_call_utils.py:1438
↓ 97 callersMethodset
(self, name, value, *, nx=False, px=None)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_redis_distributed_lock.py:26
↓ 97 callersMethodtransform_request
(self, *args, **kwargs)
tests/test_litellm/test_thinking_enabled.py:28
↓ 97 callersMethodvalidate_environment
( self, headers: dict, model: str, messages: list[AllMessageValues], o
litellm/llms/cohere/common_utils.py:46
↓ 96 callersFunctionget_compiled_pattern
Get a compiled regex pattern by name. Args: pattern_name: Name of the prebuilt pattern Returns: Compiled regex pattern
litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/patterns.py:58
↓ 96 callersFunctionget_optional_params
( # use the openai defaults # https://platform.openai.com/docs/api-reference/chat/create model: st
litellm/utils.py:3811
↓ 96 callersFunctionp
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 95 callersMethodclear
Clear all policies from the registry.
litellm/proxy/policy_engine/policy_registry.py:296
↓ 95 callersFunctiongenerate_mock_user_api_key_auth
Generate a mock UserAPIKeyAuth object
tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py:88
↓ 95 callersMethodread
(self)
tests/test_litellm/litellm_core_utils/test_token_counter.py:513
↓ 95 callersMethodstart
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/1pr-6n9854u49.js:1
↓ 94 callersFunction_make_guardrail
Helper to construct a guardrail with test defaults.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_microsoft_purview.py:20
↓ 93 callersMethod#n
()
litellm/proxy/_experimental/out/_next/static/chunks/2r285pkv5nnfe.js:10
↓ 93 callersMethodget_cache
(self, key, **kwargs)
tests/test_litellm/proxy/test_redis_auth_cache_flag.py:40
↓ 93 callersFunctions8
litellm/proxy/_experimental/out/_next/static/chunks/42gio3rky08u5.js:4
↓ 93 callersMethodvalues
(self)
litellm/proxy/_types.py:144
↓ 92 callersMethodasync_pre_call_hook
(self, user_api_key_dict, cache, data, call_type)
tests/test_litellm/proxy/hooks/test_sensitive_data_routing.py:864
↓ 92 callersMethodasync_pre_routing_hook
This hook is called before the routing decision is made. Used for the litellm auto-router to modify the request before the routing d
litellm/router.py:11183
↓ 92 callersMethodget_allowed_mcp_servers
Get the allowed MCP Servers for the user. Priority: 1. If object_permission.mcp_servers is explicitly set, use it (even for
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:2481
↓ 92 callersFunctionj
()
litellm/proxy/_experimental/out/_next/static/chunks/0u0-hzwjwlynn.js:1
↓ 92 callersMethodprocess_mcp_request
Process and validate MCP request headers from the ASGI scope. This includes: 1. Extracting and validating authentication head
litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py:337
↓ 91 callersMethodmodel_dump
(self, **kwargs)
litellm/types/llms/base.py:73
↓ 90 callersMethodcreate
(self, **_kwargs)
tests/local_testing/test_assistants.py:222
↓ 89 callersFunctionMixin
(...s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 89 callersFunctioncompletion_cost
Calculate the cost of a given completion call fot GPT-3.5-turbo, llama2, any litellm supported llm. Parameters: completion_response
litellm/cost_calculator.py:1108
↓ 89 callersMethodexec
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 89 callersFunctiongetProxyBaseUrl
()
ui/litellm-dashboard/src/components/networking.tsx:147
↓ 89 callersMethodstart_span
Start a span for ``role`` without dedup or attribute mapping. For callers that own and manage their own span lifecycle. ``tracer`` ov
litellm/integrations/otel/emitter.py:134
↓ 88 callersMethodasync_post_call_success_hook
( self, data: dict, user_api_key_dict: UserAPIKeyAuth, response: Any )
tests/test_litellm/proxy/guardrails/test_deferred_guardrail_logging.py:69
↓ 88 callersFunctionconvert_to_model_response_object
( response_object: dict | None = None, model_response_object: ModelResponse | EmbeddingResponse
litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py:544
↓ 87 callersFunctionP
litellm/proxy/_experimental/out/_next/static/chunks/3t4iumhktznmc.js:1
↓ 87 callersFunctionP
litellm/proxy/_experimental/out/_next/static/chunks/3-_nx473x7j2c.js:1
↓ 87 callersMethodget_complete_url
Get the complete URL for the CometAPI call. Returns: str: The complete URL for the API call.
litellm/llms/cometapi/chat/transformation.py:86
↓ 86 callersFunctionS
()
litellm/proxy/_experimental/out/_next/static/chunks/0u0-hzwjwlynn.js:1
↓ 85 callersMethodadd_litellm_callback
Add a callback to litellm.callbacks Ensures no duplicates are added.
litellm/litellm_core_utils/logging_callback_manager.py:57
↓ 85 callersFunctiono
(e,s,i,a,l=[],c,d,u,p,f,m,h,g,x,b,v,y,S,j,w,C,k,_,R=!0,N)
litellm/proxy/_experimental/out/_next/static/chunks/0kzod24rqslaj.js:1
↓ 84 callersMethodget_supported_openai_params
(self, model)
tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py:1739
← previousnext →101–200 of 86,368, ranked by callers