MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 4 callersMethod_set_semconv_cache_token_attributes
Add ``gen_ai.usage.cache_*.input_tokens`` from the usage object. No-op when the payload or the usage values are missing/zero.
litellm/integrations/opentelemetry_utils/gen_ai_semconv.py:195
↓ 4 callersMethod_set_team_attributes_on_span
Stamp team_id / team_alias onto a span so every child span of a litellm_request trace carries them, not just the root span. Empty str
litellm/integrations/opentelemetry.py:1555
↓ 4 callersMethod_set_team_budget_metrics_after_api_request
Set team budget metrics after an LLM API request - Assemble a LiteLLM_TeamTable object - looks up team info from db if n
litellm/integrations/prometheus.py:4375
↓ 4 callersFunction_set_throttle_clock
(monkeypatch: pytest.MonkeyPatch, now: float)
tests/unit/proxy/auth/test_login_utils.py:683
↓ 4 callersFunction_set_transcription_model_on_session
( session: dict, model: str, create_if_missing: bool = False, )
litellm/proxy/realtime_endpoints/endpoints.py:119
↓ 4 callersMethod_set_user_budget_metrics
Set user budget metrics for a single user - Remaining Budget - Max Budget - Budget Reset At
litellm/integrations/prometheus.py:4909
↓ 4 callersMethod_set_user_budget_metrics_after_api_request
Set user budget metrics after an LLM API request - Assemble a LiteLLM_UserTable object - looks up user info from db if n
litellm/integrations/prometheus.py:4820
↓ 4 callersMethod_set_virtual_key_rate_limit_metrics
( self, user_api_key: str | None, user_api_key_alias: str | None, kwargs: dict
litellm/integrations/prometheus.py:2546
↓ 4 callersFunction_settings
()
tests/unit/proxy/roi_calculator/test_estimator.py:45
↓ 4 callersFunction_settle
()
tests/unit/test_router/core/test_endpoints_characterization_inference.py:482
↓ 4 callersFunction_settle_both
(rig: ChainRig, model: str, key: str, status: int, extra: Mapping[str, JsonValue] = NO_EXTRA)
tests/integration/authorization/test_alias_chain_budget_waiver.py:172
↓ 4 callersFunction_settled
()
tests/unit/responses/mcp/test_chat_completions_handler.py:1623
↓ 4 callersFunction_settled_counter
(team_id: str, model_group: str, expected: int)
tests/integration/routing/test_ptu_shares.py:337
↓ 4 callersFunction_setup_vertex_named_credential_router
(monkeypatch)
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:3644
↓ 4 callersFunction_shaped_body
(model: str, shape: str, marker: str, **fields: JsonValue)
tests/integration/providers/test_responses_bridge_message_cache_control_wire.py:1144
↓ 4 callersFunction_shared_login
(tmp_path, monkeypatch)
tests/unit/llms/github_copilot/test_per_user_auth.py:1034
↓ 4 callersFunction_shield_params
(azure: Wire, *, mode: str, default_on: bool)
tests/integration/observability/test_azure_content_safety_audit.py:175
↓ 4 callersFunction_shots
(count: int)
tests/integration/routing/test_reasoning_effort_levels_chaos.py:138
↓ 4 callersMethod_should_run_sync_callbacks_for_async_calls
Returns: - bool: True if sync callbacks should be run for async calls. eg. `langfuse`, `s3`
litellm/litellm_core_utils/litellm_logging.py:5089
↓ 4 callersMethod_sign_and_execute_request
Helper to sign and execute AWS API requests using httpx + SigV4. Pattern from litellm/integrations/s3_v2.py
litellm/rag/ingestion/s3_vectors_ingestion.py:197
↓ 4 callersFunction_sign_in
(gateway: Gateway, subject: str)
tests/integration/management/test_sso_sign_in.py:131
↓ 4 callersMethod_sign_s3_request
(self, content, api_base, optional_params, s3_encryption_key_id=None)
tests/unit/llms/bedrock/files/test_bedrock_files_transformation.py:840
↓ 4 callersFunction_signed_body_kwargs
(*, signed_body: bytes | None, data: dict[str, object])
litellm/llms/custom_httpx/llm_http_handler.py:443
↓ 4 callersFunction_signed_headers
(request: Request)
tests/integration/providers/test_sagemaker_embedding_wire.py:183
↓ 4 callersFunction_signed_headers_for_bedrock
(request_headers: dict, api_key: str | None = None)
tests/unit/proxy/test_litellm_pre_call_utils.py:8755
↓ 4 callersFunction_silent
(release: threading.Event)
tests/integration/providers/test_gemini_long_decode_wire.py:760
↓ 4 callersFunction_single
(received: tuple[Request, ...], marker: str)
tests/integration/routing/test_reasoning_effort_levels_wire.py:2166
↓ 4 callersFunction_slack_alerting_with_env_resolution
()
tests/unit/integrations/SlackAlerting/test_slack_alerting.py:399
↓ 4 callersMethod_slot_groups
Indices of ``counters`` grouped by Redis Cluster slot so each Lua call's keys co-locate. Without a cluster every counter goes in one
litellm/proxy/hooks/parallel_request_limiter_v3.py:1238
↓ 4 callersFunction_slot_stash
(slot_id: str, *gauges: RateLimitScope)
tests/unit/caching/test_request_redis_batch_post_call.py:110
↓ 4 callersFunction_slow_stream
()
tests/unit/proxy/proxy_server/test_streaming_helpers.py:2216
↓ 4 callersFunction_smart_router
(session_affinity=True, ttl_seconds=777, deployment_affinity=True)
tests/unit/router_utils/pre_call_checks/test_session_id_affinity.py:527
↓ 4 callersFunction_snapshot
(document: TOMLDocument, path: str)
litellm/proxy/client/cli/commands/codex_settings.py:91
↓ 4 callersFunction_socket
( gateway: Gateway, key: str, model: str, headers: Mapping[str, str] | None = None )
tests/integration/routing/test_responses_websocket_turn_admission.py:210
↓ 4 callersFunction_sora_deployment
( model_name: str, api_key: str, deployment_id: str, access_groups: tuple[str, ...] = () )
tests/unit/test_router/test_router_provider_endpoints.py:627
↓ 4 callersFunction_sort_models
Sort models by the specified field and order. Args: all_models: List of models to sort sort_by: Field to sort by (model_name
litellm/proxy/proxy_server.py:17231
↓ 4 callersFunction_sorted_query
(request: Request)
tests/integration/providers/test_responses_lifecycle_wire.py:448
↓ 4 callersFunction_source
(settings: ROISettings, issues: tuple[ObservedIssue, ...] | None = ())
tests/unit/proxy/roi_calculator/test_observed_workspace.py:18
↓ 4 callersFunction_spans_by_name
(exporter)
tests/unit/integrations/test_otel_team_attributes_matrix.py:122
↓ 4 callersFunction_spans_naming_guardrails
(rig: _Rig, since: int, team: str)
tests/integration/observability/test_guardrail_pipeline_applied_header.py:657
↓ 4 callersFunction_speech
(billing: BillingProxy, model: str, text: str, key: str, voice: str = "Kore")
tests/integration/spend/test_gemini_tts_speech_billing.py:192
↓ 4 callersFunction_spend
(gateway: Gateway, call_id: str)
tests/integration/pricing/test_search_mode_pricing.py:72
↓ 4 callersFunction_spend_count
(gateway: Gateway, key_hash: str)
tests/integration/authorization/test_jwt_key_mapping_lifecycle.py:421
↓ 4 callersFunction_spend_log_read_scope
(user_api_key_dict: UserAPIKeyAuth, log_team_lookup: LogTeamLookup)
litellm/proxy/spend_tracking/spend_management_endpoints.py:4851
↓ 4 callersFunction_spend_log_request_id
(response_obj: Any, kwargs: dict)
tests/unit/proxy/spend_tracking/test_spend_tracking_utils.py:6526
↓ 4 callersFunction_spend_report_prereqs
()
litellm/proxy/spend_tracking/spend_management_endpoints.py:1832
↓ 4 callersFunction_spend_row
(identity: str)
tests/integration/providers/test_hosted_vllm_reasoning_content_wire.py:99
↓ 4 callersFunction_spend_row
(call_id: str)
tests/integration/providers/test_decisions_box_deployment_flag_wire.py:226
↓ 4 callersFunction_spend_row
(response_id: str)
tests/integration/providers/test_responses_compaction_items_wire.py:732
↓ 4 callersFunction_spend_row_for_response_id
(response_id: str)
tests/integration/observability/_logging_only_scope_support.py:1028
↓ 4 callersFunction_spend_rows
(model: str, expected: int)
tests/integration/messages_endpoint/providers/anthropic/test_anthropic_messages_overloaded_wire.py:157
↓ 4 callersFunction_spend_rows
(billing: BillingProxy, key: str, count: int)
tests/integration/spend/test_gemini_tts_speech_billing.py:203
↓ 4 callersFunction_spend_status_by_call
(served: tuple[_Served, ...])
tests/integration/providers/test_bedrock_mantle_claude_chat_chaos.py:141
↓ 4 callersFunction_spend_statuses
(model: str)
tests/integration/providers/test_responses_bridge_stream_output_items_wire.py:102
↓ 4 callersFunction_split_assembled_content_for_replay
Slice an assembled cached completion's ``content`` into word-shaped pieces for cadence-preserving streaming replay. The split is lossless:
litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py:164
↓ 4 callersMethod_split_bedrock_content
Bisect `content` into two roughly-equal, non-empty halves. When `content` already holds more than one item, it is split by list lengt
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:1525
↓ 4 callersMethod_split_priority
`_core_split_request_priority`.
litellm/router_rust/invoke/endpoints.py:1879
↓ 4 callersFunction_sql_text
(expr: ast.expr | None, module: _Module, depth: int = 0)
tests/unit/proxy/db/test_prisma_query_span.py:222
↓ 4 callersFunction_sse
(events: Sequence[Mapping[str, object]])
tests/unit/responses/mcp/test_chat_completions_handler.py:1777
↓ 4 callersFunction_sse_bytes
(data: dict)
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py:2058
↓ 4 callersFunction_sse_events
(text: str)
tests/integration/observability/test_otel_conversation_id.py:120
↓ 4 callersFunction_sse_reply
(identity: str, deltas: Sequence[dict[str, JsonValue]], finish_reason: str)
tests/integration/providers/test_responses_bridge_stream_output_items_wire.py:45
↓ 4 callersFunction_sse_response
(chunks, upstream_generator=None)
tests/unit/proxy/test_common_request_processing.py:10936
↓ 4 callersFunction_sse_stream
(deltas: tuple[dict[str, object], ...], finish_reason: str)
tests/unit/llms/databricks/chat/test_databricks_chat_transformation.py:2869
↓ 4 callersFunction_sso_gateway
( directory: Path, litellm_settings: Mapping[str, JsonValue], general_settings: Mapping[str, JsonV
tests/integration/management/test_sso_sign_in.py:72
↓ 4 callersFunction_sso_key_generate_on_ui_disabled_node
Drives GET /sso/key/generate on a node running with DISABLE_ADMIN_UI=true, the worker shape of a control plane deployment, with a real Google redi
tests/unit/proxy/management_endpoints/test_ui_sso.py:11126
↓ 4 callersFunction_stable
(read: Callable[[], T], satisfied: Callable[[T], bool], *, seconds: float = 70)
tests/integration/management/test_credential_federation_values.py:211
↓ 4 callersFunction_stamp_usage_cost
( usage_chunk: ModelResponse | TextCompletionResponse | ModelResponseStream, complete_response: ModelR
litellm/litellm_core_utils/streaming_handler.py:106
↓ 4 callersFunction_standard_logging_payload
(now: datetime.datetime, prompt_tokens: int)
tests/unit/integrations/test_prometheus_input_sequence_length_label.py:112
↓ 4 callersFunction_standard_payload
( *, response_cost: float | None, status: Literal["success", "failure"] = "success", metadata:
tests/unit/integrations/clickhouse/test_clickhouse_spend_logger.py:121
↓ 4 callersFunction_start_async_completion
(config, logging_obj=None)
tests/unit/llms/custom_httpx/test_llm_http_handler.py:4733
↓ 4 callersMethod_start_callback_server
(self, state: str)
litellm/llms/xai/oauth.py:299
↓ 4 callersFunction_start_pool
(app_dir: Path, port: int, log: Path, runner: str = POOL_RUNNER)
tests/integration/configuration/test_reload_worker_pool.py:93
↓ 4 callersMethod_stash_block_context
Stash signals so the deferred success-event skips this request and ``async_post_call_failure_hook`` can build the failure payload. -
litellm/integrations/rubrik.py:473
↓ 4 callersFunction_state
(marker: str)
tests/integration/providers/test_cloudflare_clef_omni_media_wire.py:77
↓ 4 callersFunction_state
(prompt: str, system: str | None)
tests/integration/routing/test_complexity_router_databricks_classifier.py:209
↓ 4 callersFunction_stateful_server_instances
()
litellm/proxy/mcp_server/server.py:744
↓ 4 callersFunction_states
(fleet: Sequence[Team])
tests/integration/management/test_team_delete_chaos.py:163
↓ 4 callersFunction_static_tag_limits
(limits: dict[str, TagRateLimit])
tests/unit/proxy/hooks/test_parallel_request_limiter_v3.py:6250
↓ 4 callersMethod_status_error
(*, body: bytes, response_body: bytes | None = None)
tests/unit/proxy/mcp_server/test_mcp_debug.py:212
↓ 4 callersFunction_status_event
(state: str, text: str | None = None)
tests/unit/a2a_protocol/test_a2a_streaming_iterator.py:215
↓ 4 callersMethod_stop
(self, stop_reason)
tests/unit/llms/anthropic/chat/guardrail_translation/test_anthropic_guardrail_handler.py:3257
↓ 4 callersMethod_store_batch_line_items_in_background
Store a retired batch's lines off the poll loop, one batch at a time and only between polls, so neither pricing the lines nor a slow or hung b
enterprise/litellm_enterprise/proxy/common_utils/check_batch_cost.py:963
↓ 4 callersFunction_store_cost_breakdown_in_logging_obj
Helper function to store cost breakdown in the logging object. Args: litellm_logging_obj: The logging object to store breakdown in
litellm/cost_calculator.py:1567
↓ 4 callersFunction_store_file_response
( store: str, file_id: str, attributes: Mapping[str, JsonValue], chunking_strategy: Mapping[st
tests/integration/management/test_vector_store_file_list_managed_ids.py:112
↓ 4 callersFunction_store_for
(section: Section, key: str, config_value: SettingValue, db_value: SettingValue)
tests/unit/proxy/config_resolvers/test_settings_rules.py:95
↓ 4 callersFunction_stored_alias_and_routes
(gateway: Gateway, key: str)
tests/integration/management/test_key_default_allowed_routes.py:248
↓ 4 callersFunction_stored_metadata
(existing: Mapping[str, object])
litellm/proxy/management_endpoints/team_admin_field_permissions.py:303
↓ 4 callersFunction_stored_response
(spend_log: "SpendLogsPayload")
litellm/responses/litellm_completion_transformation/session_handler.py:101
↓ 4 callersFunction_stored_response
(status: str, background: bool, usage: Mapping[str, object] | None)
tests/unit/proxy/pass_through_endpoints/llm_provider_handlers/test_openai_passthrough_logging_handler.py:2103
↓ 4 callersFunction_stored_turn
(rig: _StoredRig, spend: pcb.SpendLogs, model: str, items: Sequence[JsonValue])
tests/integration/providers/test_responses_bridge_message_cache_control_wire_chaos.py:434
↓ 4 callersFunction_stores
()
tests/unit/proxy/auth/test_login_utils.py:689
↓ 4 callersFunction_str_field
(message: object, key: str)
litellm/responses/litellm_completion_transformation/transformation.py:622
↓ 4 callersFunction_stream
(identity: str)
tests/integration/providers/test_responses_lifecycle_wire.py:102
↓ 4 callersFunction_stream
(gateway: Gateway, model: str, call: _Call)
tests/integration/messages_endpoint/chat_bridge/test_chat_bridge_mid_stream_failure_bookkeeping_wire.py:134
↓ 4 callersFunction_stream
(client: httpx.Client, model: str, key: str, body: Mapping[str, JsonValue])
tests/integration/streaming/test_google_genai_stream_usage_settings_wire.py:154
↓ 4 callersFunction_stream
()
tests/unit/llms/bedrock/messages/invoke_transformations/test_anthropic_claude_transformation.py:1953
↓ 4 callersMethod_stream
(*contents)
tests/unit/proxy/guardrails/guardrail_hooks/test_repelloai.py:1079
↓ 4 callersFunction_stream_body
(marker: str, stream_options: JsonValue)
tests/integration/streaming/test_google_genai_stream_usage_settings_wire.py:149
↓ 4 callersFunction_stream_chunk
(text: str, index: int = 0)
tests/unit/litellm_core_utils/test_served_output_texts.py:49
← previousnext →19,101–19,200 of 202,479, ranked by callers