MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions68,180 in github.com/BerriAI/litellm

↓ 139 callersMethodacompletion
( self, model: str, messages: List[AllMessageValues], stream: Literal[True], **kwargs )
litellm/router.py:1790
↓ 139 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
↓ 136 callersFunctionj
litellm/proxy/_experimental/out/_next/static/chunks/01_xjyxcb1uco.js:1
↓ 135 callersMethodcompletion
Example usage: response = router.completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hey, how's it going?"}]
litellm/router.py:1584
↓ 135 callersMethodrun
(self, code)
tests/test_litellm/llms/litellm_proxy/test_sandbox_executor.py:35
↓ 133 callersMethod_handle_error
( self, e: Exception, provider_config: Union[ BaseConfig, Base
litellm/llms/custom_httpx/llm_http_handler.py:5620
↓ 131 callersMethodpost_call
(self, original_response, input=None, api_key=None, additional_args={})
litellm/litellm_core_utils/litellm_logging.py:1135
↓ 130 callersFunctionuseAuthorized
()
ui/litellm-dashboard/src/app/(dashboard)/hooks/useAuthorized.ts:12
↓ 126 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:147
↓ 122 callersMethodsetup
(self, mock_provider_mapping, mock_http_handler, mock_http_async_handler)
tests/llm_translation/test_huggingface_chat_completion.py:233
↓ 121 callersFunctioni
(e,t,r,a,o)
litellm/proxy/_experimental/out/_next/static/chunks/038lmn5.g6myc.js:1
↓ 120 callersMethodtoString
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 117 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
↓ 116 callersMethodvalidate_environment
( self, *, headers: dict[str, object], model: str, api_key: str | None
tests/test_litellm/ocr/test_rust_bridge.py:163
↓ 115 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:8467
↓ 114 callersMethodload
Load providers from JSON configuration file
litellm/llms/openai_like/json_loader.py:34
↓ 113 callersMethodtext
(self)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_presidio.py:40
↓ 112 callersFunctionb
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0rdv7_7_95b-1.js:1
↓ 112 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
↓ 111 callersMethodsplice
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.js:1
↓ 110 callersFunctionc
(e)
litellm/proxy/_experimental/out/_next/static/chunks/01_xjyxcb1uco.js:1
↓ 110 callersFunctionhandleError
(errorData: string | any)
ui/litellm-dashboard/src/components/networking.tsx:289
↓ 107 callersFunctionget_secret
( secret_name: str, default_value: Optional[Union[str, bool]] = None, )
litellm/secret_managers/main.py:159
↓ 105 callersFunctiond
({suffixCls:e,tagName:t,displayName:r})
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 105 callersMethodvalues
()
litellm/proxy/_experimental/out/_next/static/chunks/0pidya1qvuvx8.js:1
↓ 102 callersMethodappend
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0pidya1qvuvx8.js:1
↓ 102 callersMethodembedding
( self, model: str, input: list, model_response: EmbeddingResponse, pr
tests/local_testing/test_custom_llm.py:267
↓ 102 callersMethodinvalidateQueries
(e,t={})
litellm/proxy/_experimental/out/_next/static/chunks/0n.a~e5dwfnkn.js:1
↓ 102 callersFunctionrenderWithProviders
(ui: React.ReactElement, options?: RenderOptions)
ui/litellm-dashboard/tests/test-utils.tsx:26
↓ 99 callersFunctiono
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 99 callersMethodrun
(self)
tests/e2e/lifecycle.py:31
↓ 98 callersMethodrun
(self, user_id, server_id, refresh, reread)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_oauth_token_store.py:415
↓ 97 callersFunctionb
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:1
↓ 97 callersMethoddict
(self)
litellm/router_strategy/budget_limiter.py:87
↓ 97 callersMethodmodel_dump
(self, **kwargs)
litellm/llms/sap/chat/models.py:53
↓ 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:59
↓ 95 callersFunctionf
({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})
litellm/proxy/_experimental/out/_next/static/chunks/038lmn5.g6myc.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 callersFunctions9
litellm/proxy/_experimental/out/_next/static/chunks/16.oisvgwzo8s.js:4
↓ 93 callersMethodupdate
( self, where: Dict[str, Any], data: Dict[str, Any] )
tests/test_litellm/repositories/test_repositories.py:86
↓ 93 callersFunctiony
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 92 callersFunctionh
({icon:e,onClick:l,className:t,disabled:a,dataTestId:o})
litellm/proxy/_experimental/out/_next/static/chunks/0~-ovi6c4wjt1.js:1
↓ 92 callersMethodtransform_request
(self, *args, **kwargs)
tests/test_litellm/test_thinking_enabled.py:28
↓ 91 callersMethodreject
(s,o)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 90 callersMethodcreate
(self, **_kwargs)
tests/local_testing/test_assistants.py:222
↓ 89 callersFunctionMixin
(...s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 89 callersFunctiononChange
(info: any)
ui/litellm-dashboard/src/components/add_model/provider_specific_fields.tsx:225
↓ 89 callersMethodread
(self)
tests/test_litellm/litellm_core_utils/test_token_counter.py:469
↓ 88 callersFunctionl
(e,l)
litellm/proxy/_experimental/out/_next/static/chunks/0rdv7_7_95b-1.js:1
↓ 88 callersFunctionn
(e,a)
litellm/proxy/_experimental/out/_next/static/chunks/0rdv7_7_95b-1.js:1
↓ 87 callersFunctiongetProxyBaseUrl
()
ui/litellm-dashboard/src/components/networking.tsx:99
↓ 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:85
↓ 86 callersFunctionconvert_to_model_response_object
( response_object: Optional[dict] = None, model_response_object: Optional[ Union[
litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py:546
↓ 86 callersFunctionget_optional_params
( # use the openai defaults # https://platform.openai.com/docs/api-reference/chat/create model: st
litellm/utils.py:3721
↓ 85 callersMethodacompletion
(self, **kwargs)
tests/test_litellm/llms/anthropic/experimental_pass_through/context_management/test_compact.py:1093
↓ 85 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:1098
↓ 85 callersFunctionp
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0_rk9sxkapt-r.js:1
↓ 84 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
↓ 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 callersMethodget_supported_openai_params
(self, model: str)
tests/test_litellm/images/test_image_edit_utils.py:14
↓ 83 callersFunctionw
({children:e})
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 82 callersFunctiong
({accessToken:e})
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 82 callersFunctionm
()
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 82 callersMethodvalues
(self)
litellm/proxy/_types.py:137
↓ 81 callersMethodexec
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 81 callersFunctioni
(i)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 80 callersMethodadd_litellm_callback
Add a callback to litellm.callbacks Ensures no duplicates are added.
litellm/litellm_core_utils/logging_callback_manager.py:56
↓ 80 callersMethodbase_process_llm_request
Common request processing logic for both chat completions and responses API endpoints
litellm/proxy/common_request_processing.py:1205
↓ 79 callersFunctiongenerate_mock_user_api_key_auth
Generate a mock UserAPIKeyAuth object
tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py:89
↓ 78 callersMethodget_cache
(self, key, **kwargs)
tests/test_litellm/proxy/test_redis_auth_cache_flag.py:40
↓ 78 callersFunctiono
litellm/proxy/_experimental/out/_next/static/chunks/0~-ovi6c4wjt1.js:1
↓ 78 callersFunctionv
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0rdv7_7_95b-1.js:1
↓ 77 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:1235
↓ 77 callersMethodconnect
(self)
tests/proxy_unit_tests/test_key_generate_prisma.py:3790
↓ 77 callersFunctionmake_handler
Factory for test handlers with standard defaults.
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_panw_prisma_airs.py:110
↓ 77 callersFunctionr
litellm/proxy/_experimental/out/_next/static/chunks/0rdv7_7_95b-1.js:1
↓ 76 callersMethodasync_pre_call_hook
(self, user_api_key_dict, cache, data, call_type)
tests/test_litellm/proxy/hooks/test_sensitive_data_routing.py:864
↓ 75 callersMethodinfo
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/101az3fsw7lje.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 callersMethodcancel
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0.4.bbjx7y007.js:143
↓ 74 callersMethodcreate
Create a new credential. Args: credential_name (str): Name of the credential credential_info (Dict[str, Any]
litellm/proxy/client/credentials.py:66
↓ 73 callersMethodclear
Clear all policies from the registry.
litellm/proxy/policy_engine/policy_registry.py:207
↓ 73 callersMethodexists
(self, *names)
tests/test_litellm/proxy/_experimental/mcp_server/outbound_credentials/test_redis_distributed_lock.py:51
↓ 73 callersMethodput
(path: string, options?: RequestOptions)
ui/litellm-dashboard/src/lib/http/client.ts:78
↓ 73 callersMethodread
Read response content.
litellm/integrations/mock_client_factory.py:74
↓ 72 callersMethod_handle_llm_api_exception
Raises ProxyException (OpenAI API compatible) if an exception is raised
litellm/proxy/common_request_processing.py:2237
↓ 72 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:49
↓ 72 callersMethodvalues
(self)
tests/pass_through_unit_tests/test_pass_through_unit_tests.py:58
↓ 71 callersFunctionx
litellm/proxy/_experimental/out/_next/static/chunks/0pwkd9r.mc_ee.js:1
↓ 70 callersFunctionobject
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 70 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:94
↓ 70 callersMethodupdate
(self, where: Dict[str, Any], data: Dict[str, Any])
tests/test_litellm/proxy/memory/test_memory_endpoints.py:139
↓ 70 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:579
↓ 69 callersFunctionN
(t,s,a)
litellm/proxy/_experimental/out/_next/static/chunks/14566-_ogh-19.js:1
↓ 69 callersFunctionT
litellm/proxy/_experimental/out/_next/static/chunks/0rdv7_7_95b-1.js:1
↓ 68 callersMethodcontains
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 68 callersMethodget_provider_responses_api_config
( provider: Union[LlmProviders, str], model: Optional[str] = None, )
litellm/utils.py:8027
↓ 67 callersMethodcount
Count records matching the criteria.
litellm/repositories/base_repository.py:106
↓ 67 callersFunctionk
({prefixCls:e,className:a,width:o,style:l})
litellm/proxy/_experimental/out/_next/static/chunks/038lmn5.g6myc.js:8
← previousnext →101–200 of 68,180, ranked by callers