MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions71,069 in github.com/BerriAI/litellm

↓ 45 callersFunction_prisma_client
Return a MagicMock prisma_client with async db methods.
tests/pass_through_unit_tests/test_passthrough_managed_ids.py:68
↓ 45 callersMethodabort
()
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:7
↓ 45 callersFunctioncost_per_token
Calculates the cost per token for a given model, prompt tokens, and completion tokens. Parameters: model (str): The name of the mode
litellm/cost_calculator.py:296
↓ 45 callersFunctionformatNumberWithCommas
( value: number | null | undefined, decimals: number = 0, abbreviate: boolean = false, showZero: boole
ui/litellm-dashboard/src/utils/dataUtils.ts:15
↓ 45 callersMethodis_empty
(&self)
litellm-rust/crates/ai-gateway/src/integrations/custom_logger/mod.rs:46
↓ 45 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:903
↓ 45 callersMethodupdate
Update an existing record.
litellm/repositories/base_repository.py:96
↓ 44 callersFunctionI
({initialRSCPayload:e,actionQueue:t,webSocket:n,staticIndicatorState:r})
litellm/proxy/_experimental/out/_next/static/chunks/04jvxoid~vpxj.js:1
↓ 44 callersFunction_resp
(body: dict, status_code: int = 200)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_vigil_guard.py:30
↓ 44 callersFunctionget_litellm_params
( api_key: Optional[str] = None, force_timeout=600, azure=False, logger_fn=None, verbose=F
litellm/litellm_core_utils/get_litellm_params.py:58
↓ 44 callersMethodreload
Clear the cache and re-load from GitLab.
litellm/integrations/gitlab/gitlab_prompt_manager.py:699
↓ 44 callersMethodremoveObserver
(e)
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 44 callersFunctionstream_chunk_builder
( chunks: list, messages: Optional[list] = None, start_time=None, end_time=None, logging_o
litellm/main.py:8360
↓ 44 callersMethodtransform_embedding_request
( self, model: str, input: AllEmbeddingInputValues, optional_params: dict,
litellm/llms/oci/embed/transformation.py:175
↓ 43 callersFunctionM
(e)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:1
↓ 43 callersMethodcount
(self, where: Optional[Dict[str, Any]] = None)
tests/test_litellm/repositories/test_repositories.py:112
↓ 43 callersFunctioninit_guardrails_v2
( all_guardrails: List[Dict], config_file_path: Optional[str] = None, llm_router: Optional[Router]
litellm/proxy/guardrails/init_guardrails.py:19
↓ 43 callersFunctionmake_logger
Instantiate NewRelicLogger with NR agent calls mocked out.
tests/test_litellm/integrations/newrelic/test_newrelic.py:41
↓ 43 callersFunctiononClose
()
litellm/proxy/_experimental/out/_next/static/chunks/08o64zaid_juv.js:1
↓ 43 callersMethodtransform_anthropic_messages_request
( self, model: str, messages: List[Dict], anthropic_messages_optional_request_
litellm/llms/bedrock/messages/invoke_transformations/anthropic_claude3_transformation.py:658
↓ 42 callersFunction_guardrail
(**overrides)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_repelloai.py:62
↓ 42 callersFunction_simple_messages
()
tests/test_litellm/llms/anthropic/experimental_pass_through/context_management/test_compact.py:49
↓ 42 callersMethodfirst
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 42 callersMethoditems
(self)
litellm/router_strategy/budget_limiter.py:78
↓ 42 callersMethodlabels
(self, *args, **kwargs)
tests/enterprise/litellm_enterprise/integrations/test_prometheus.py:493
↓ 42 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:124
↓ 42 callersMethodseek
(self, *args)
tests/test_litellm/llms/vertex_ai/files/test_vertex_ai_files_streaming.py:210
↓ 42 callersMethodsign_request
( self, headers: dict, optional_params: dict, request_data: dict, api_
litellm/llms/oci/chat/transformation.py:383
↓ 41 callersFunctionO
(e)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:1
↓ 41 callersFunctionU
(e,n,r,l,o)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 41 callersMethodget_config
Load config file Supports reading from: - .yaml file paths - LiteLLM connected DB - GCS - S3
litellm/proxy/proxy_server.py:3789
↓ 41 callersMethodupsert
(self, where: Dict[str, Any], data: Dict[str, Any])
tests/test_litellm/repositories/test_repositories.py:115
↓ 40 callersMethodasync_post_call_streaming_iterator_hook
( self, user_api_key_dict, response, request_data )
tests/test_litellm/proxy/guardrails/test_deferred_guardrail_logging.py:847
↓ 40 callersMethodresponses
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 40 callersMethodstop
Stop the logging worker and clean up resources.
litellm/litellm_core_utils/logging_worker.py:338
↓ 40 callersMethodtag
(self, suffix: str = "")
tests/proxy_behavior/management/conftest.py:98
↓ 39 callersMethod_ensure_access_token_async
Async version of _ensure_access_token
litellm/llms/vertex_ai/vertex_llm_base.py:1092
↓ 39 callersMethod_reset_all_callbacks
Reset all callbacks to an empty list Note: this is an internal function and should be used sparingly.
litellm/litellm_core_utils/logging_callback_manager.py:322
↓ 39 callersMethodasync_get_cache
( self, key: Any, parent_otel_span: Any = None, local_only: bool = False,
litellm/proxy/common_utils/user_api_key_cache.py:86
↓ 39 callersMethodtype
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 38 callersFunctionB
(e)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:1
↓ 38 callersFunctionH
()
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 38 callersMethodadd_update
Enqueue an update.
litellm/proxy/db/db_transaction_queue/base_update_queue.py:35
↓ 38 callersMethodbody
(self)
tests/local_testing/test_http_parsing_utils.py:22
↓ 38 callersFunctioncreateQueryKeys
(resource: T)
ui/litellm-dashboard/src/app/(dashboard)/hooks/common/queryKeysFactory.ts:25
↓ 38 callersFunctioneT
(e)
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 38 callersMethodemit
Emit one complete span: dedup, start, map attributes, status, end. Return the span, or ``None`` if it was deduplicated away. ``tracer``
litellm/integrations/otel/emitter.py:141
↓ 38 callersFunctiongenerate_mock_mcp_server_db_record
Generate a mock MCP server record from database
tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py:35
↓ 38 callersMethodget_azure_openai_client
( self, api_key: Optional[str], api_base: Optional[str], api_version: Optional
litellm/llms/azure/common_utils.py:398
↓ 38 callersMethodjson
Return JSON response data.
litellm/integrations/mock_client_factory.py:70
↓ 38 callersFunctionlist
Sync: List all agents on the provider side.
litellm/interactions/agents/main.py:241
↓ 38 callersMethodload_servers_from_config
Load the MCP Servers from the config Args: mcp_servers_config: Dictionary of MCP server configurations mcp_a
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:675
↓ 38 callersMethodnon_proxy_admin_allowed_routes_check
Checks if Non Proxy Admin User is allowed to access the route
litellm/proxy/auth/route_checks.py:229
↓ 38 callersMethodread
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 38 callersMethodshift
()
litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js:1
↓ 38 callersFunctionvalidate_url
Validate a user-supplied URL and rewrite it to connect to a validated IP. Resolves the hostname, checks all resolved IPs against blocked net
litellm/litellm_core_utils/url_utils.py:231
↓ 37 callersFunctionQ
litellm/proxy/_experimental/out/_next/static/chunks/00fcsizkvc4hx.js:1
↓ 37 callersFunction_make_spend_counter_cache
( *, redis_get_value=None, redis_get_side_effect=None, redis_increment_value=None, redis_i
tests/test_litellm/proxy/proxy_server/test_spend_counters.py:34
↓ 37 callersFunction_managed_files_hook
(store_side_effect: Any = None)
tests/pass_through_unit_tests/test_passthrough_managed_ids.py:83
↓ 37 callersFunctionapply_compact_20260112
Apply ``compact_20260112``; return a ``PolyfillResult``. See module docstring for the algorithm. Errors are best-effort: when the summary cal
litellm/llms/anthropic/experimental_pass_through/context_management/editors/compact.py:936
↓ 37 callersMethodget_cache
Retrieves the cached result for the given arguments. Args: *args: args to litellm.completion() or embedding()
litellm/caching/caching.py:571
↓ 37 callersMethodget_credentials
Return a boto3.Credentials object
litellm/llms/bedrock/base_aws_llm.py:185
↓ 37 callersFunctionget_model_info
Get a dict for the maximum tokens (context window), input_cost_per_token, output_cost_per_token for a given model. Parameters: - model
litellm/utils.py:5574
↓ 36 callersFunctionA
(t)
litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js:1
↓ 36 callersFunctionK
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:13
↓ 36 callersMethod_create_mcp_client
Create an MCPClient instance for the given server. Auth resolution (single place for all auth logic): 1. ``mcp_auth_header``
litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:2037
↓ 36 callersFunction_make_streaming
(**kwargs)
tests/test_litellm/responses/test_responses_websocket_all_providers.py:1293
↓ 36 callersMethodmutate
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/011mgw.-67gs_.js:1
↓ 36 callersMethodpost_call
(self, original_response, input=None, api_key=None, additional_args={})
litellm/types/utils.py:3442
↓ 36 callersFunctionset
(e,t)
litellm/proxy/_experimental/out/_next/static/chunks/0e9hs7onyj28m.js:141
↓ 36 callersFunctionuser_api_key_auth
Parent function to authenticate user api key / jwt token.
litellm/proxy/auth/user_api_key_auth.py:2485
↓ 35 callersFunction_common_key_generation_helper
( data: GenerateKeyRequest, user_api_key_dict: UserAPIKeyAuth, litellm_changed_by: Optional[str],
litellm/proxy/management_endpoints/key_management_endpoints.py:741
↓ 35 callersFunction_is_base64_encoded_unified_file_id
(b64_uid: str)
litellm/proxy/openai_files_endpoints/common_utils.py:20
↓ 35 callersFunctionanthropic_messages_pt
format messages for anthropic 1. Anthropic supports roles like "user" and "assistant" (system prompt sent separately) 2. The first messag
litellm/litellm_core_utils/prompt_templates/factory.py:2342
↓ 35 callersMethodapply_guardrail
( self, inputs: dict, request_data: dict, input_type: str, **kwargs )
tests/test_litellm/llms/cohere/rerank/test_rerank_guardrail_handler.py:420
↓ 35 callersMethodasync_log_success_event
(self, kwargs, response_obj, start_time, end_time)
tests/test_litellm/integrations/arize/test_arize_utils.py:385
↓ 35 callersMethodindex
(s)
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 35 callersFunctionmap_finish_reason
(finish_reason: str)
litellm/litellm_core_utils/core_helpers.py:107
↓ 35 callersMethodmodel_dump
(self, mode="json", exclude_none=True)
tests/agent_tests/test_a2a_agent.py:27
↓ 35 callersMethodrerank
( self, model: str, query: str, documents: List[Union[str, Dict[str, Any]]],
litellm/llms/bedrock/rerank/handler.py:53
↓ 35 callersMethodretrieve_batch
( self, batch_id: str, *, key: str, provider: str | None = None )
tests/e2e/batches/batch_client.py:115
↓ 35 callersMethodsearch
(e,t,r)
litellm/proxy/_experimental/out/_next/static/chunks/0nnx~7-7e5t~1.js:1
↓ 35 callersMethodset_attributes
(self, span: Span, kwargs, response_obj: Optional[Any])
litellm/integrations/opentelemetry.py:2091
↓ 35 callersMethodtransform_request
Translate messages to anthropic format.
litellm/llms/anthropic/chat/transformation.py:1739
↓ 35 callersMethodvalueOf
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 34 callersMethodasync_pre_call_hook
Mock pre-call hook that raises BlockedPiiEntityError
tests/mcp_tests/test_mcp_guardrails.py:50
↓ 34 callersMethodasync_set_cache
Asynchronously set cache using run_in_executor to avoid blocking the event loop. Compatible with Python 3.8+.
litellm/caching/s3_cache.py:102
↓ 34 callersMethodfinally
(e)
litellm/proxy/_experimental/out/_next/static/chunks/0piozaeodiue..js:4
↓ 34 callersMethodgetQueryCache
()
litellm/proxy/_experimental/out/_next/static/chunks/08yy42xvwaak6.js:1
↓ 34 callersMethodpost_call_success_hook
Allow user to modify outgoing data Covers: 1. /chat/completions 2. /embeddings 3. /image/generation
litellm/proxy/utils.py:2235
↓ 34 callersMethodtoArray
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 34 callersMethodtransform_request
( self, model: str, messages: List[AllMessageValues], optional_params: dict,
litellm/llms/oci/chat/transformation.py:529
↓ 33 callersFunctionW
(e,t,n)
litellm/proxy/_experimental/out/_next/static/chunks/15hm8gokjq2uu.js:1
↓ 33 callersFunction_
()
litellm/proxy/swagger/swagger-ui-bundle.js:2
↓ 33 callersFunction_make_client
(auth: UserAPIKeyAuth)
tests/test_litellm/proxy/memory/test_memory_endpoints.py:200
↓ 33 callersFunction_make_response
(payload: dict)
tests/test_litellm/proxy/guardrails/guardrail_hooks/test_cato_networks.py:342
↓ 33 callersFunction_patch_prisma
Patch the endpoint module's _require_prisma to return our fake.
tests/test_litellm/proxy/memory/test_memory_endpoints.py:221
↓ 33 callersMethod_update_kwargs_with_deployment
3 jobs: - Adds selected deployment, model_info and api_base to kwargs["metadata"] (used for logging) - Adds default litellm p
litellm/router.py:2908
↓ 33 callersFunctionacompletion
Asynchronously executes a litellm.completion() call for any of litellm supported llms (example gpt-4, gpt-3.5-turbo, claude-2, command-nightly)
litellm/main.py:403
↓ 33 callersMethodapply_guardrail
(self, inputs, request_data, input_type, logging_obj=None)
tests/test_litellm/litellm_core_utils/test_realtime_streaming.py:1731
← previousnext →301–400 of 71,069, ranked by callers