MCPcopy Create free account

hub / github.com/BerriAI/litellm / functions

Functions202,479 in github.com/BerriAI/litellm

↓ 6 callersFunction_emit_access_line
Hand one real record to uvicorn.access and return what a handler wrote out.
tests/unit/test_logging.py:1635
↓ 6 callersMethod_emit_supportability_metric
Emit New Relic supportability metric for LiteLLM usage. Per spec, this metric should be emitted at least once every 27 hours
litellm/integrations/newrelic/newrelic.py:204
↓ 6 callersMethod_emit_terminal_response_event
( self, litellm_model_response: ModelResponse )
litellm/responses/litellm_completion_transformation/streaming_iterator.py:1617
↓ 6 callersFunction_encoded
(name)
tests/unit/proxy/common_utils/test_model_listing_utils.py:22
↓ 6 callersFunction_encoded
(job_id: str = JOB_ID)
tests/unit/llms/edenai/videos/test_edenai_video_transformation.py:49
↓ 6 callersMethod_encrypt_response_id
( self, response: _ResponseObjectT, user_api_key_dict: "UserAPIKeyAuth", reque
litellm/proxy/hooks/responses_id_security.py:372
↓ 6 callersFunction_encrypted_per_user_copilot_credential
(host: str)
tests/unit/proxy/credential_endpoints/test_endpoints.py:1793
↓ 6 callersMethod_end_proxy_span_from_kwargs
Close the proxy-level parent span if it is still recording. This helper retrieves the proxy span directly from kwargs metadata and cl
litellm/integrations/opentelemetry.py:1373
↓ 6 callersFunction_endpoint
(gateway: Gateway, scenario: Scenario, marker: str, target: str, **fields: JsonValue)
tests/integration/spend/test_passthrough_upstream_model.py:44
↓ 6 callersFunction_enforced_new_project_mocks
( monkeypatch: pytest.MonkeyPatch, team_models: list[str], llm_router: object, quota_setting: object = Tru
tests/unit/enterprise/proxy/management_endpoints/test_project_endpoints_prisma.py:1209
↓ 6 callersMethod_ensure_index_sync
(self, dim: int)
litellm/caching/valkey_semantic_cache.py:171
↓ 6 callersMethod_ensure_initialized
(cls)
litellm/proxy/db/db_transaction_queue/spend_log_cleanup_metrics.py:58
↓ 6 callersFunction_ensure_provider
(custom_llm_provider: str | None)
litellm/vector_store_files/main.py:35
↓ 6 callersFunction_entries
(response: httpx.Response)
tests/integration/compatibility/test_codex_model_catalog.py:100
↓ 6 callersFunction_entry
(index: int)
tests/unit/llms/firecrawl/search/test_firecrawl_search_transformation.py:15
↓ 6 callersMethod_entry
(host, **extra)
tests/unit/integrations/otel/test_otel_v2_destinations.py:3968
↓ 6 callersFunction_env_without_irsa
()
tests/unit/llms/bedrock/test_base_aws_llm.py:945
↓ 6 callersFunction_error
(status: int, message: str, code: str | None = None)
tests/integration/sdk/test_provider_error_and_extra_body_families_wire.py:114
↓ 6 callersFunction_error_events_sent_to
(client_ws: MagicMock)
tests/unit/litellm_core_utils/test_realtime_streaming.py:4890
↓ 6 callersFunction_error_information
(call_id: str)
tests/integration/spend/test_normalized_error_long_message.py:74
↓ 6 callersFunction_error_message
(response: httpx.Response)
tests/integration/providers/test_bedrock_mantle_context_overflow_wire.py:229
↓ 6 callersFunction_errors
(frames: Sequence[dict[str, JsonValue]])
tests/integration/providers/_gemini_long_decode_support.py:326
↓ 6 callersFunction_errors
(websocket: _ClientSocket)
tests/unit/responses/test_responses_websocket_all_providers.py:1927
↓ 6 callersMethod_estimate_entry_output_tokens
Conservative per-row output-token estimate for the project OTPM reservation. Batch completion never reconciles actual usage back into the rat
litellm/proxy/hooks/batch_rate_limiter.py:468
↓ 6 callersFunction_event
(event_type: str, **fields: object)
tests/unit/llms/vertex_ai/audio_transcription/test_vertex_ai_realtime_transformation.py:44
↓ 6 callersFunction_event_stream_message
One AWS event-stream message: prelude, prelude CRC, headers, payload and message CRC.
litellm/llms/bedrock/passthrough/guardrail_translation/handler.py:722
↓ 6 callersFunction_event_type
(message: str)
tests/unit/llms/openai/live/test_handler.py:28
↓ 6 callersFunction_event_types
(stream: object)
tests/unit/responses/test_responses_api_lifecycle.py:207
↓ 6 callersFunction_events
(config: SonioxRealtimeConfig, tokens: list[dict[str, object]])
tests/unit/llms/soniox/realtime/test_soniox_realtime_transformation.py:157
↓ 6 callersFunction_events_named
(profiler: PythonProfiler, name: str)
tests/rust-python-harness/shared/tracing/test_profiler.py:41
↓ 6 callersMethod_execute_redis_batch_rate_limiter_script
Run ``BATCH_RATE_LIMITER_SCRIPT`` once per cluster slot group, in caller order.
litellm/proxy/hooks/parallel_request_limiter_v3.py:1292
↓ 6 callersFunction_expect_allow
(guardrail: ContentFilterGuardrail, sentence: str, reason: str)
tests/unit/proxy/guardrails/guardrail_hooks/litellm_content_filter/test_content_filter.py:712
↓ 6 callersFunction_expect_allow_sg_pdpa
Assert that the guardrail ALLOWS the sentence.
tests/unit/proxy/guardrails/guardrail_hooks/litellm_content_filter/test_content_filter.py:1257
↓ 6 callersFunction_expect_block
(guardrail: ContentFilterGuardrail, sentence: str, reason: str)
tests/unit/proxy/guardrails/guardrail_hooks/litellm_content_filter/test_content_filter.py:698
↓ 6 callersFunction_expected
(shape: str, marker_hex: str)
tests/integration/providers/test_vertex_anthropic_structured_output_wire.py:366
↓ 6 callersFunction_expected_answers
(questions: Sequence[Mapping[str, JsonValue]])
tests/integration/providers/test_decisions_box_deployment_flag_wire.py:81
↓ 6 callersFunction_expected_chunks
(size: int, chunk_size: int = IN_LIST_CHUNK_SIZE)
tests/unit/repositories/test_chunked_in.py:80
↓ 6 callersFunction_expected_response
(route: Route, marker: str)
tests/integration/providers/test_cloudflare_clef_omni_media_wire.py:131
↓ 6 callersMethod_extract_blocked_assessments
Walk the Bedrock guardrail response and emit a structured list of BLOCKED assessment entries describing exactly which policies fired.
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:2319
↓ 6 callersFunction_extract_blocks
Extract all content blocks containing ``key`` from messages with ``role``.
tests/unit/litellm_core_utils/test_bedrock_converse_dedup_factory.py:90
↓ 6 callersFunction_extract_cache_params
Safely extracts and cleans cache parameters. The health check UI needs to display specific cache parameters, to show users how they set up t
litellm/proxy/caching_routes.py:30
↓ 6 callersMethod_extract_image_generation_output_items
Extract image generation outputs from a choice that contains images. Transforms message.images from chat completion format:
litellm/responses/litellm_completion_transformation/transformation.py:3663
↓ 6 callersMethod_extract_model_from_anthropic_chunks
( all_chunks: Sequence[str | bytes], )
litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py:382
↓ 6 callersFunction_extract_model_from_first_ws_event
Extract model from a response.create WS event, handling flat and nested formats. Flat: {"type": "response.create", "model": "gpt-4o", ...}
litellm/proxy/response_api_endpoints/endpoints.py:2069
↓ 6 callersMethod_extract_modified_arguments_from_content
Extract modified/masked arguments from the guardrail response content.
litellm/proxy/utils.py:2402
↓ 6 callersMethod_extract_prompt_refusal
Return the refusal text when the prompt was blocked, else None. The before_prompt webhook returns ``{}`` (passthrough) or a synthetic
litellm/integrations/rubrik.py:1163
↓ 6 callersFunction_extract_requested_mcp_server_ids
Extract all MCP server IDs referenced in a key's object_permission dict. Includes: - mcp_servers list - Keys from mcp_tool_permissio
litellm/proxy/management_helpers/object_permission_utils.py:627
↓ 6 callersFunction_extract_text_from_content
(content: object)
litellm/proxy/guardrails/guardrail_hooks/crowdstrike_aidr/crowdstrike_aidr.py:135
↓ 6 callersMethod_extract_tool_calls_from_response
Extract tool_calls from all choices in a model response. Args: response: The model response to analyze Returns:
litellm/proxy/guardrails/guardrail_hooks/tool_permission.py:977
↓ 6 callersFunction_extract_usage_for_ocr_call
Extract usage information for OCR/AOCR calls. OCR responses use usage_info (with pages_processed) instead of token-based usage. Args:
litellm/proxy/spend_tracking/spend_tracking_utils.py:421
↓ 6 callersMethod_extract_violation_category_names
Flatten the BLOCKED assessments into a list of human-readable category names suitable for queryable OTEL / standard-logging attribute
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:2293
↓ 6 callersFunction_fail_open_guardrail
()
tests/unit/proxy/guardrails/guardrail_hooks/test_crowdstrike_aidr.py:1375
↓ 6 callersFunction_failed
(status: int, text: str)
tests/integration/providers/test_gemini_tts_voice_mapping_wire.py:83
↓ 6 callersFunction_failing
(route: Route, status: int, headers: Mapping[str, str])
tests/integration/sdk/test_stream_open_error_provider_headers_sdk.py:99
↓ 6 callersFunction_failing_tx
(error)
tests/unit/proxy/db/test_db_spend_update_writer.py:4114
↓ 6 callersFunction_failure_rows
(model: str, expected: int)
tests/integration/providers/test_bedrock_stream_timeout_wire.py:320
↓ 6 callersFunction_fake_litellm
(tmp_path: Path, script: str)
tests/code_coverage_tests/test_merge_smoke.py:25
↓ 6 callersFunction_fake_managed_object_table
(rows)
tests/unit/enterprise/proxy/hooks/test_managed_files.py:4689
↓ 6 callersFunction_fake_openssl
(monkeypatch: pytest.MonkeyPatch, *, fips_flag: int, scrypt_refused: bool)
tests/unit/proxy/common_utils/test_fips.py:26
↓ 6 callersFunction_fake_prisma
(rows: list[dict[str, object]])
tests/unit/proxy/spend_tracking/test_spend_capture_rate.py:64
↓ 6 callersFunction_fake_prisma_calls
(log_path: Path)
tests/integration/database/migrations/test_prisma_toolchain.py:89
↓ 6 callersFunction_file_calls
(guardrail)
tests/unit/proxy/guardrails/guardrail_hooks/akto/test_akto.py:1280
↓ 6 callersFunction_file_data
()
tests/unit/proxy/openai_files_endpoint/test_storage_backend_service.py:79
↓ 6 callersFunction_files_kept
(contents: JsonValue, marker: str)
tests/integration/providers/test_vertex_gemini_count_tokens_wire.py:363
↓ 6 callersFunction_fill_user_api_key_cache
(cache: DualCache, count: int)
tests/unit/proxy/test_proxy_server_endpoints_and_startup.py:8480
↓ 6 callersMethod_filter_context_management_for_bedrock_converse
Keep only compact_20260112 edits for Bedrock; add beta header or drop field.
litellm/llms/bedrock/chat/converse_transformation.py:2121
↓ 6 callersMethod_find_latest_message_index
(self, messages: list[AllMessageValues], target_role: str)
litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:632
↓ 6 callersFunction_finish_reasons
(text: str)
tests/integration/streaming/test_stream_clean_eof_without_finish_reason.py:211
↓ 6 callersFunction_fixed
(deployment_id: str)
tests/unit/test_router/core/test_selection_characterization_strategies.py:284
↓ 6 callersMethod_flatten_messages_for_moderation
Collapse each message's content to a plain string for the webhook. litellm normalizes Anthropic ``/v1/messages`` requests to OpenAI shape,
litellm/integrations/rubrik.py:578
↓ 6 callersMethod_flush_on_exit
Flush remaining events synchronously before process exit. Called automatically via atexit handler. This ensures callbacks qu
litellm/litellm_core_utils/logging_worker.py:625
↓ 6 callersFunction_format_streaming_sse_chunk
(chunk: object)
litellm/proxy/proxy_server.py:10554
↓ 6 callersFunction_foundry_embed_price
(price_key: str)
tests/unit/llms/azure_ai/passthrough/test_azure_ai_passthrough_transformation.py:544
↓ 6 callersFunction_frame
(event: str, data: dict[str, object])
tests/unit/proxy/guardrails/test_anthropic_sse.py:15
↓ 6 callersFunction_framed_kimi
(monkeypatch: pytest.MonkeyPatch)
tests/unit/proxy/test_proxy_token_counter.py:2618
↓ 6 callersFunction_free_model
(scenario: Scenario)
tests/integration/spend/test_team_member_spend.py:151
↓ 6 callersFunction_frozen
(pairs: Iterable[tuple[str, object]])
litellm/proxy/guardrails/guardrail_hooks/straiker/straiker.py:415
↓ 6 callersFunction_full_llm_call
()
tests/unit/integrations/otel/test_otel_v2_components.py:213
↓ 6 callersFunction_full_team
(model_aliases=ALIASES)
tests/unit/proxy/auth/test_team_grants.py:24
↓ 6 callersFunction_function_tool
(name: str)
tests/unit/llms/deepseek/chat/test_deepseek_chat_transformation.py:131
↓ 6 callersFunction_gateway_initialize_instructions_request_scope
( user_api_key_auth: UserAPIKeyAuth | None, mcp_servers: list[str] | None, client_ip:
litellm/proxy/mcp_server/server.py:1205
↓ 6 callersFunction_gemini_headers
(candidate: Gateway)
tests/integration/observability/test_passthrough_upstream_error_visibility.py:93
↓ 6 callersFunction_gemini_router
(drop_params: bool = False)
tests/unit/proxy/test_proxy_token_counter.py:4005
↓ 6 callersFunction_generic
(sunk: tuple[Sunk, ...], input_type: str)
tests/integration/mcp/test_mcp_accounting_guardrails.py:381
↓ 6 callersMethod_get_arg_string
Get string representation of an argument
tests/code_coverage_tests/info_log_check.py:270
↓ 6 callersMethod_get_auth_headers
(self, api_key: str | None)
litellm/llms/lemonade/chat/transformation.py:243
↓ 6 callersMethod_get_base_url
(self, api_base: str | None)
litellm/llms/watsonx/common_utils.py:266
↓ 6 callersMethod_get_batch_routing_model
Resolve the deployment/model used for this batch from request data. Mirrors ``create_batch`` routing precedence: a model bound to the input
litellm/proxy/hooks/batch_rate_limiter.py:211
↓ 6 callersMethod_get_batches_referencing_file
Find batches that reference this file and still need cost tracking. Find batches that are in non-terminal state and have not yet been
enterprise/litellm_enterprise/proxy/hooks/managed_files.py:2664
↓ 6 callersMethod_get_bearer_token
( cp4d_host: str, auth_mode: str, api_key: str, username: str | None = None,
litellm/a2a_protocol/providers/watsonx_orchestrate/handler.py:117
↓ 6 callersFunction_get_body_error_code
Return error.code from a JSON error body, or None if not parseable.
litellm/litellm_core_utils/exception_mapping_utils.py:199
↓ 6 callersMethod_get_boto_credentials_from_optional_params
( self, optional_params: dict, # mutable-ok: the implementation pops the aws_* keys out of th
litellm/llms/bedrock/base_aws_llm.py:1505
↓ 6 callersMethod_get_current_time
Return the current time for rate limiting calculations.
litellm/proxy/hooks/parallel_request_limiter_v3.py:783
↓ 6 callersMethod_get_duration
Extract duration in milliseconds. Resolution order: 1. StandardLoggingPayload.response_time (already computed by LiteLLM)
litellm/integrations/newrelic/newrelic.py:416
↓ 6 callersMethod_get_hierarchical_router_settings
Get router_settings in priority order: Key > Team Uses the already-cached key object and the cached team lookup (get_team_ob
litellm/proxy/proxy_server.py:8308
↓ 6 callersFunction_get_highest_media_resolution
Compare two media resolution values and return the highest one. Resolution hierarchy: ultra_high > high > medium > low > None
litellm/llms/vertex_ai/gemini/transformation.py:137
↓ 6 callersFunction_get_jwks
(name: str)
tests/unit/proxy/credential_endpoints/test_endpoints.py:261
↓ 6 callersFunction_get_litellm_batch_custom_id_from_labels
Prefer encoded custom_id when present (see _set_litellm_batch_custom_id_labels).
litellm/llms/vertex_ai/files/transformation.py:256
↓ 6 callersMethod_get_llm_provider_for_deployment
(self, deployment: Mapping[str, object])
litellm/router_strategy/budget_limiter.py:814
↓ 6 callersMethod_get_masked_text
Extract masked text from PANW scan result.
litellm/proxy/guardrails/guardrail_hooks/panw_prisma_airs/panw_prisma_airs.py:643
← previousnext →11,801–11,900 of 202,479, ranked by callers