litellm/tests/unit
Mateo Wang 3a991e258a
feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors (#49519)
* feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): keep the spend log read-only typed so the type discipline gate holds

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): type the first turn's completion request so the basedpyright gate holds

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): record every replayed turn as the path when continuing a session stored without one

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): type the bridged completion kwargs so the basedpyright gate holds

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(integrations): add the previous response ids key to the pub sub spend log fixture

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): stamp the path into the request's own metadata dict so router io token refunds stay deduped

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(spend-logs): carry litellm_previous_response_ids through the Rust spend log row and retention tables

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style(rust): format the always-kept spend log metadata table

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): validate the replayed request ids as strings for the type gate

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(rust): add only the new metadata key to the spend log goldens instead of re-recording them

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-23 12:43:11 -08:00
..
a2a_protocol
accounting feat(proxy): add app groups with shared budgets and usage (#53232) 2026-11-21 12:50:58 -08:00
anthropic_interface
batch_completion
batches fix(proxy): resolve admin oidc api_key references on batch cancel, fine-tuning listing, OCR, /v1/messages and cache prediction (#53678) 2026-11-23 10:11:10 -08:00
caching fix(redis): reuse the async connection pool across client-cache rotations (#34871) 2026-11-23 11:29:37 -08:00
completion_extras feat(vertex_ai): add Meta Muse models on Vertex AI (#50768) 2026-11-21 13:00:24 -08:00
compression
containers
db_scripts
decisions fix(decisions): keep systemone confidence, extra fields and proxy cost on litellm_proxy calls (#53195) 2026-11-21 12:47:10 -08:00
endpoints
enterprise refactor(auth_cache_invalidation): move the invalidation channel to the native client (#51135) 2026-11-21 18:58:27 +09:00
expected_fine_tuning_api
expected_responses_api_request
experimental_mcp_client
extraction
files
fine_tuning fix(proxy): resolve admin oidc api_key references on batch cancel, fine-tuning listing, OCR, /v1/messages and cache prediction (#53678) 2026-11-23 10:11:10 -08:00
fixtures
gateway fix(proxy): default uvicorn keep-alive to 95s so load balancers close idle connections first (#53879) 2026-11-23 11:23:10 -08:00
google_genai fix(google_genai): honor snake_case generation_config on generateContent (#51139) 2026-11-18 03:47:08 +00:00
harness fix(anthropic): skip a stream data line that is not a JSON object (#53393) 2026-11-22 22:54:02 +00:00
images fix(vertex_ai): honor Gemini image size and imageConfig controls on generation and edits (#53580) 2026-11-23 09:05:25 -08:00
integration_support test(integration): update two spend tests left stale by the rust spend log writer (#53363) 2026-11-21 12:01:35 -08:00
integrations feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors (#49519) 2026-11-23 12:43:11 -08:00
interactions fix(proxy): bill an OpenAI pass-through background response to the key that created it (#53586) 2026-11-23 20:14:58 +00:00
litellm_core_utils fix(proxy): resolve admin oidc api_key references on batch cancel, fine-tuning listing, OCR, /v1/messages and cache prediction (#53678) 2026-11-23 10:11:10 -08:00
litellm_proxy_extras fix(proxy-extras): build the remaining request-log indexes in the migration job instead of in migrations (#49667) 2026-11-23 10:15:35 -08:00
llms perf(vertex): stream image edit request bodies (#53877) 2026-11-23 11:14:34 -08:00
mcp_client fix(mcp): return an upstream -32042 URL elicitation error from /mcp as a JSON-RPC error (#52384) 2026-11-19 08:56:01 -08:00
models feat(alerts): add email labels, bulk actions and threshold editing (#52139) 2026-11-16 15:32:19 -08:00
ocr
passthrough
proxy feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors (#49519) 2026-11-23 12:43:11 -08:00
rag fix(proxy): resolve admin oidc api_key references on batch cancel, fine-tuning listing, OCR, /v1/messages and cache prediction (#53678) 2026-11-23 10:11:10 -08:00
realtime_api feat(realtime)!: serve GPT-Live over WebRTC with sideband attach, and bill WebRTC calls from a proxy sideband (#53282) 2026-11-21 22:49:26 -08:00
redis fix(rust_bridge): send warnings from unscoped native threads to the proxy log (#53539) 2026-11-23 17:53:52 +09:00
repositories feat(spend-logs): rust spend log ledger writer (#52163) 2026-11-20 16:31:04 -08:00
rerank_api docs(rerank): clarify callback cost accounting order (#53852) 2026-11-23 10:51:33 -08:00
responses feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors (#49519) 2026-11-23 12:43:11 -08:00
router_rust fix(responses): bill the provider-reported input on a cut bridged stream (#53394) 2026-11-23 06:20:25 +00:00
router_strategy fix(proxy): reserve least-busy picks on Vertex pass-through calls (#53588) 2026-11-23 04:21:20 +00:00
router_utils feat(vertex_ai): add Meta Muse models on Vertex AI (#50768) 2026-11-21 13:00:24 -08:00
rust_bridge refactor(rust_bridge): send every Rust log line through one subscriber (#53738) 2026-11-23 17:53:54 +09:00
sandbox
search fix(tavily): price the search depth chosen automatically (#52564) 2026-11-18 13:04:12 -08:00
secret_managers
skills
systemone
telemetry
test_router fix(proxy): resolve admin oidc api_key references on batch cancel, fine-tuning listing, OCR, /v1/messages and cache prediction (#53678) 2026-11-23 10:11:10 -08:00
text_completions
types fix(proxy): resolve admin oidc api_key references on batch cancel, fine-tuning listing, OCR, /v1/messages and cache prediction (#53678) 2026-11-23 10:11:10 -08:00
vector_stores feat(vector_stores): add YAML-configured unified search fallbacks (#52093) 2026-11-18 08:41:02 -08:00
videos
__init__.py
AGENTS.md
conftest.py test(spend): expect soft budget duration in customer scopes (#53017) 2026-11-20 16:52:06 +00:00
create_mock_standard_logging_payload.py
test_a2a_registry_lookup.py
test_acompletion_session_reuse_e2e.py
test_add_deployment_no_master_key.py
test_aembedding_session_reuse_e2e.py
test_anthropic_beta_gated_fields.py
test_anthropic_beta_headers_filtering.py
test_anthropic_skills_transformation.py
test_assert_ci_coverage.py
test_assert_secret_absent.py
test_assert_workflow_dir_hygiene.py
test_audio_transcription_rust_bridge.py
test_azure_ad_token_credential_resolution.py
test_azure_ai_grok_4_3_model_metadata.py
test_azure_ai_grok_4_6_model_metadata.py
test_baseten_glm_5_3_model_metadata.py
test_batch_completion_models_all_responses.py
test_bedrock_marengo_embed_3_model_metadata.py
test_build_core_distribution.py
test_cerebras_llama_model_metadata.py
test_chat_ui_responses_session.py
test_check_licenses.py
test_check_mcp_operation_boundary.py
test_check_migrations_lock_timeout.py
test_check_migrations_no_data_rewrites.py fix(proxy-extras): build the remaining request-log indexes in the migration job instead of in migrations (#49667) 2026-11-23 10:15:35 -08:00
test_check_openapi_docs.py feat(proxy): support Cursor CLI subscriptions (#52205) 2026-11-16 21:49:12 -08:00
test_check_py310_typing_imports.py
test_check_test_quality.py
test_check_type_discipline.py fix(router): make the constructor stub work for mypy and guard it in CI (#50354) 2026-11-22 21:25:00 +00:00
test_check_unbounded_in_lists.py
test_check_windows_wheel_install.py
test_ci_path_filter.py Skip unit-core shards for test-only pull requests (#52720) 2026-11-19 02:00:05 +00:00
test_claude_fable_5_config.py
test_claude_haiku_5_5_config.py
test_claude_opus_4_6_config.py
test_claude_opus_4_8_config.py
test_claude_opus_5_config.py
test_claude_sonnet_5_config.py
test_cli_package.py
test_cloudflare_workers_ai_model_metadata.py
test_completion_timeout_resolution.py fix(timeout): preserve split limits for shared httpx completions (#53391) 2026-11-21 17:39:32 -08:00
test_compression.py
test_conftest_isolation.py
test_constants.py
test_container_router.py
test_cost_calculation_log_level.py
test_cost_calculator.py fix(cost): fall back to half the standard audio rate for batches (#53867) 2026-11-23 12:05:15 -08:00
test_cost_map_guard.py
test_count_tokens_public_api.py
test_dashscope_image_generation.py
test_daybreak_model_metadata.py
test_deepseek_model_metadata.py
test_default_branch.py
test_detect_changes.py Skip unit-core shards for test-only pull requests (#52720) 2026-11-19 02:00:05 +00:00
test_docker_entrypoint.py
test_docker_no_network_on_deploy.py
test_dockerfile_apk_repository.py
test_dockerfile_bedrock_realtime_extra.py
test_dockerfile_non_root.py
test_e2e_egress_sentinel.py
test_elevenlabs_tts_pricing.py
test_empty_mock_response.py
test_env_key_doc_gate.py
test_exception_exports.py
test_exception_header_preservation.py
test_exception_mapping_request_attribute.py
test_fake_openai_endpoint.py
test_filter_out_litellm_params.py
test_fireworks_serverless_model_costs.py
test_gate_slot_lock.py
test_gemini_3_1_flash_lite_image_pricing.py
test_gemini_4_argon_model_metadata.py
test_gemini_tts_native_audio_pricing.py
test_get_blog_posts.py
test_git_hooks.py
test_gpt_5_4_model_metadata.py
test_gpt_5_5_model_metadata.py
test_gpt_image_cost_calculator.py fix(cost): bill SVG authoring usage on OpenAI image responses (#52571) 2026-11-18 13:04:49 -08:00
test_gpt_realtime_mode.py
test_groq_streaming_encoding.py
test_guardrail_exception_status_codes.py
test_guardrails.py
test_integration_run.py
test_internal_context.py test(redis): exempt the state and hook cache classes from the key family check (#53157) 2026-11-20 11:48:00 -08:00
test_lazy_imports.py
test_lint_base_counts.py
test_lint_config.py feat(scripts): add a linter for proxy config.yaml files (#53863) 2026-11-23 11:42:47 -08:00
test_lint_workflow_diff_gates.py fix(router): make the constructor stub work for mypy and guard it in CI (#50354) 2026-11-22 21:25:00 +00:00
test_litellm_cli.py
test_litellm_overhead.py
test_litellm_params_reserved_keys.py
test_logging.py fix(logging): print a Rust log line's fields in plain Python logs (#53717) 2026-11-23 17:53:53 +09:00
test_lowest_latency_zero_tokens.py
test_main.py fix(mcp): drop hosted MCP tool_choice under drop_params and honor drop_params in Bedrock batch rows (#53697) 2026-11-23 08:51:59 -08:00
test_main_module_header.py
test_mistral_large_4_model_metadata.py chore(cost-map): fill Bedrock regional and Azure Government pricing gaps, rolling registry audit 2026-11-18 (#52458) 2026-11-18 07:02:05 -08:00
test_mistral_medium_3_5_model_metadata.py
test_mistral_small_4_0_model_metadata.py
test_mistral_zai_glm_5_2_model_metadata.py
test_model_block_unblock.py
test_model_cost_aliases.py
test_model_param_helper.py
test_model_prices_and_context_window.py fix(bedrock): send tool_choice to Mistral Large 3 and Ministral 3 on Converse (#53589) 2026-11-23 01:25:33 +00:00
test_model_response_normalization.py
test_muse_ember_1_0_model_metadata.py
test_muse_spark_1_1_model_metadata.py
test_muse_spark_1_2_model_metadata.py
test_muse_spark_1_3_model_metadata.py
test_mutation_report.py
test_nested_drop_params.py
test_no_top_level_test_invocations.py
test_non_chat_routes_open_llm_spans.py
test_openai_embedding_encoding_format_default.py
test_openai_record_replay_proxy.py
test_openai_service_tier_long_context_pricing.py
test_openapi_docs_gate.py
test_package_layout.py
test_package_metadata.py
test_pre_commit_lint.py fix(router): make the constructor stub work for mypy and guard it in CI (#50354) 2026-11-22 21:25:00 +00:00
test_prisma_generate_if_needed.py
test_private_usage_aliases.py feat(proxy)!: make Scalar the default API reference and remove ReDoc (#53063) 2026-11-23 10:49:54 -08:00
test_process_helpers.py
test_project_alias_tracking.py
test_project_tags_pydantic.py
test_proxy_auth.py
test_pydantic_namespaces.py
test_rag_openai_ingestion.py
test_rate_limit_error_unification.py feat(model_capacity): replace the python dynamic rate limiter v3 with a rust callback (#51540) 2026-11-17 22:20:54 +00:00
test_rate_limit_error_unification_rust.py feat(callbacks-parallel-request-limiter): port parallel request limiter v3 to a rust callback (#51537) 2026-11-16 22:56:38 -08:00
test_read_rc_version.py
test_recursive_detector.py
test_redact_string_in_error_paths.py
test_redis.py fix(redis): drop ssl_ kwargs from the async pool when ssl is off (#52344) 2026-11-17 13:23:34 -08:00
test_redis_credential_provider.py
test_register_model_custom_pricing.py
test_register_model_zero_cost_persistence.py
test_replicate_model_key_format.py
test_responses_api_bridge_non_stream.py
test_responses_id_security.py
test_responses_streaming_container_ownership.py
test_restore_handwritten_description.py ci: restore a PR's handwritten description when an edit resets it to the placeholder (#53486) 2026-11-21 16:50:40 -08:00
test_retrieve_batch_bedrock_dispatch.py
test_router_block_helpers.py
test_router_exception_redaction.py
test_router_get_settings.py
test_router_google_genai.py
test_router_model_cost_isolation.py fix(router): register a model_id Bedrock deployment after an ARN deployment for the same profile (#53461) 2026-11-22 22:27:56 +00:00
test_router_order_fallback.py
test_router_per_deployment_num_retries.py
test_router_redis_init.py
test_router_retry_backoff_headers.py
test_router_retry_non_retryable_errors.py
test_router_retry_policy_update.py
test_router_silent_experiment.py fix(router)!: stop a client's metadata flag from turning off silent_model mirroring (#52083) 2026-11-16 15:45:56 -08:00
test_router_streaming_fallback_metadata.py
test_router_weighted_failover.py
test_ruff_strict_gate.py
test_sambanova_model_metadata.py
test_scaledown_model_prices.py
test_scheduler.py
test_secret_redaction.py fix(redaction): scrub authorization_token values by their key name (#53740) 2026-11-23 17:53:54 +09:00
test_seed_tracing_fixtures.py feat(proxy): send gateway model calls to Lens as traces when the Lens store is connected (#53042) 2026-11-20 10:12:08 -08:00
test_select_changed_tests.py ci(unit): run the proxy-extras tests when a pull request touches proxy-extras (#52917) 2026-11-19 11:52:05 -08:00
test_select_ui_test_scope.py
test_service_logger.py
test_setup_wizard.py
test_shared_session_integration.py
test_snowflake_model_prices.py chore(cost-map): rolling registry update, fal_ai kling v4, azure gpt-6-luna flex, snowflake, bedrock/mantle claude 5.5 (#52299) 2026-11-17 19:36:09 +00:00
test_socket_policy.py
test_spend_logs_guard.py
test_ssl_verify_unit.py
test_stream_chunk_builder_annotations.py
test_stream_chunk_builder_citations.py
test_stream_chunk_builder_images.py
test_streaming_connection_cleanup.py
test_system_message_format_bug.py
test_test_quality_gate.py
test_thinking_enabled.py
test_together_ai_model_metadata.py fix(cost-map): refresh Azure and Together retirement dates and add GMI Gemini 4 Hydrogen (#52763) 2026-11-19 16:18:40 +00:00
test_tool_loop.py
test_type_check_gate.py
test_type_discipline_gate.py
test_typesafe_model_metadata.py
test_unit_shard_missing_paths.py
test_unit_shard_per_test_timeout.py
test_utils.py fix(vertex_ai): keep Gemini 3+ web search next to function tools and report searches as web_search_call items (#53423) 2026-11-23 07:29:54 +00:00
test_utils_get_model_info.py feat(cost-map): price Claude on Bedrock Mantle under bedrock_mantle/ and bedrock/mantle/ (#52231) 2026-11-17 07:12:16 +00:00
test_utils_get_optional_params.py fix(bedrock): accept the OpenAI SDK default encoding_format on Nova embeddings (#53755) 2026-11-23 10:00:50 -08:00
test_utils_module_docstring.py
test_uuid_helper.py
test_vcr_classification.py
test_vcr_conftest_common_banner.py
test_vcr_filters.py
test_vcr_leak_guard.py
test_vcr_redis_persister.py
test_vcr_safe_body_matcher.py
test_version.py
test_vertex_ai_xai_grok_prompt_caching_metadata.py
test_video_generation.py
test_with_dashboard_node.py
test_ws_vcr.py
test_xai_grok_4_3_model_metadata.py
test_xai_responses_auto_routing.py
whitelisted_bedrock_models.txt chore(cost-map): fill Bedrock regional and Azure Government pricing gaps, rolling registry audit 2026-11-18 (#52458) 2026-11-18 07:02:05 -08:00