Commit graph

52881 commits

Author SHA1 Message Date
yuneng
b450baa402 test(llms): migrate phase 5 provider unit tests to tests/unit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:50:38 +00:00
yuneng
4048062e53 test(llms): annotate local_model_cost_map fixtures in phase 6 tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:50:30 +00:00
yuneng
e1d2789d29 test(llms): migrate phase 6 provider unit tests to tests/unit
Migrate 18 provider test files from tests/test_litellm/llms to tests/unit/llms.
194 kept tests move as-is after mutation testing; 1 test deleted
(test_completion_datarobot_with_environment_variables, env-gated no-assert);
the fixture-only fal_ai cost calculator file is removed.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:50:30 +00:00
Yuneng Jiang
556c7f6b68
ci: keep real-database coverage for both migration resolvers
The Postgres-backed smoke job previously exercised one resolver. Running
the default and the legacy variants in it covers v2 now that it is the
default, without losing v1's coverage.
2026-09-20 00:50:05 -07:00
yuneng-jiang
6ef7b86748
Merge pull request #42103 from BerriAI/litellm_test_unit_ci_wiring
ci(tests): wire tests/unit into CircleCI and keep draining GHA shards green
2026-09-20 00:50:00 -07:00
yuneng-jiang
776f8bc309
Merge pull request #40932 from BerriAI/litellm_v2_migration_startup
fix(proxy): coordinate v2 migration startup and qualify container recovery
2026-09-20 00:21:02 -07:00
Yuneng Jiang
fac518dbf7
feat(proxy): default to the v2 migration resolver
The migrations Job entrypoint (migrations/run.py) has defaulted to v2 with
USE_V2_MIGRATION_RESOLVER=false as the opt-out, and the Helm chart documents
that knob. Proxy startup still defaulted to v1, so the two paths disagreed
about which resolver a deployment runs.

Proxy startup now resolves the same way: v2 unless USE_V2_MIGRATION_RESOLVER
is false or --use_legacy_migration_resolver is passed.

- --use_v2_migration_resolver stays accepted as a no-op that warns, so
  existing commands and Helm values do not fail on an unknown option.
- The dedicated Postgres smoke-test job is repointed at the legacy resolver
  so v1 keeps real-DB proxy-boot coverage, and the two jobs that deselected
  it by name are updated to match the rename.

#39178 reverted an earlier flip because two replicas sharing a database
deadlocked (40P01 / P3018) with neither answering /health/liveliness. That
contention is what #40932 coordinates, which is why this builds on it.
2026-09-20 00:12:30 -07:00
yuneng
adadeac245 Revert "ci(tests): temporarily point one shard at an empty directory"
This reverts commit 3c094dbaaa.
2026-09-20 07:10:43 +00:00
yuneng
3c094dbaaa ci(tests): temporarily point one shard at an empty directory
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:08:09 +00:00
yuneng
df7a3d2d1e ci(tests): share the loopback allow list in the unit conftest
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:06:39 +00:00
yuneng
446bd1b250 ci(tests): wire tests/unit into CircleCI and drain legacy unit shards green
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:05:42 +00:00
yassin
bf804f5188 feat(proxy): add budget_exceeded_status_code setting to restore 429 for budget refusals
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 07:00:10 +00:00
Yuneng Jiang
e34fd201b3
Merge remote-tracking branch 'origin/main' into litellm_v2_migration_startup 2026-09-19 23:59:26 -07:00
yassin
b7e11546b5 test: expect 422 for budget refusals in unification, e2e and integration suites
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 06:33:57 +00:00
yuneng-jiang
d5d12edbae
Merge pull request #42099 from BerriAI/litellm_test_tier_contract
docs(tests): define the tier contract for unit, integration and e2e
2026-09-19 23:29:15 -07:00
yuneng
3f4fe7db82 docs(tests): define the tier contract for unit, integration and e2e
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 06:24:06 +00:00
yassin
92d3a1d87d test(proxy): expect 422 for per-model budget rejections on cursor route
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 06:10:16 +00:00
yassin
f9244749e0 fix(proxy): return 422 instead of 429 for BudgetExceededError
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 06:00:06 +00:00
kerry
9f24699e4c fix(fal_ai): reject empty image lists in image edit requests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 05:44:56 +00:00
mateo-berri
468f74c628 ci(e2e): fix the stage-mirror batch reds and keep a redacted pytest log
The changed-test gate booted its stage-mirror stack without files_settings
or finetune_settings, so every raw upload with a custom_llm_provider hit a
500, and it exported the whole provider env into the gateways, so the
AWS_ROLE_NAME the assume-role test needs made the GovCloud deployment run
an AssumeRole with its static keys. The gate also deleted its pytest output,
so a red run left nothing to read. The mirror config now carries the
openai, azure, and vertex_ai file settings, gateways start without
AWS_ROLE_NAME, and the workflow uploads the pass logs and junit files with
every secret value, every field of a JSON-valued secret, and their
XML-escaped forms replaced before the raw files are removed.
2026-09-19 22:37:07 -07:00
kerry
cc7dce6a21 fix(fal_ai): accept every FileTypes image input and derive gpt-image qualities from pricing rows
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 05:33:06 +00:00
kerry
cf581bf327 refactor(fal_ai): drop redundant hasattr guards in the image edit byte reader
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 05:32:24 +00:00
kerry
62c215be19 fix(fal_ai): accept every FileTypes image input and derive gpt-image qualities from pricing metadata
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 05:31:27 +00:00
kerry
365dc9a3b5 feat(fal_ai): add gpt-image-2.5 flare/sunburst, flux/dev and image edits
Route openai/gpt-image-2.5/{flare,sunburst}/text-to-image through the existing GPT Image config with the xhigh and max quality tiers, add a dedicated fal-ai/flux/dev config, and add a Fal image-edit config so /v1/images/edits works for the gpt-image-2.5 and gpt-image-2 edit endpoints. Add flat and quality-by-size keyed pricing rows so spend is non-zero

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 05:14:15 +00:00
Mateo Wang
58065d46fd
Merge pull request #42071 from BerriAI/litellm_remove_dead_telemetry_flag 2026-09-19 21:48:02 -07:00
kerry-berri
d744fd1269
Merge pull request #42092 from BerriAI/litellm-providers/price-sync-openrouter
chore(prices): sync OpenRouter prices: 1 model
2026-09-19 21:42:53 -07:00
berriai-litellm-provider-info-sync[bot]
3619142a52
chore(prices): sync OpenRouter prices: 1 model
openrouter/z-ai/glm-5.2: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
2026-09-20 04:30:59 +00:00
kerry-berri
dd40137463
Merge pull request #42089 from BerriAI/litellm-providers/price-sync-openrouter
chore(prices): sync OpenRouter prices: 1 model
2026-09-19 21:12:54 -07:00
berriai-litellm-provider-info-sync[bot]
3720435638
chore(prices): sync OpenRouter prices: 1 model
openrouter/deepseek/deepseek-v4-flash: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
2026-09-20 04:00:57 +00:00
mateo-berri
0c68c58eb1 test(proxy): expect bedrock_mantle in the anthropic header provider list
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
2026-09-19 20:39:53 -07:00
Mateo Wang
4011367b39
Merge pull request #40986 from BerriAI/litellm_lit_7346_multi_choice_stream_guardrails
fix(guardrails): scan each choice's tool-call arguments apart on n>1 streams and log why a rewrite was discarded
2026-09-19 20:34:05 -07:00
Mateo Wang
9d7f77988a
Merge pull request #41974 from BerriAI/litellm_fix_startup_view_creation_race
fix(proxy): wait for the spend-log table before creating startup views
2026-09-19 20:33:49 -07:00
mateo-berri
3ffe6272c9 fix(router): hash the prompt caching affinity prefix off the event loop
Offload the per-block hashing through offload_token_count on both the pre-call
read and the success-event write, hash raw bytes as base64 instead of raising,
drop the unused serialize_object helper, and bind the chained digest, the
message envelope, and the bytes path in the regression tests
2026-09-19 20:22:28 -07:00
mateo-berri
19d77e2442 test(guardrails): type the recorder hook's request_data as a Mapping 2026-09-19 20:21:37 -07:00
mateo
f7756d01cf refactor(proxy): freeze the filtered worker config before initialize
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 03:21:01 +00:00
mateo-berri
f24208f9ca fix(bedrock_mantle): price region-prefixed Claude responses from the bare Bedrock row 2026-09-19 20:17:55 -07:00
kerry
66078f4834 Merge remote-tracking branch 'origin/main' into litellm_azure_ai_mai_image_2_5_pro
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 03:15:05 +00:00
mateo
b2e123da43 fix(proxy): drop legacy telemetry key from persisted WORKER_CONFIG before initialize
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 03:14:11 +00:00
mateo-berri
0f0c0fe499 fix: drop a blank anthropic-beta header before it reaches the provider 2026-09-19 20:13:59 -07:00
kerry-berri
4e55e995e1
Merge pull request #42082 from BerriAI/litellm-providers/price-sync-openrouter
chore(prices): sync OpenRouter prices: 7 models, 6 deprecated
2026-09-19 20:12:30 -07:00
mateo-berri
c13dcb0abf fix(proxy): forward a client's anthropic-beta and anthropic-version headers to bedrock_mantle 2026-09-19 20:11:14 -07:00
Mateo Wang
ef7da9b49f
Merge pull request #42072 from BerriAI/litellm_mcp_cold_worker_tools_call
fix(mcp): tools/call no longer 404s on a worker that has not served tools/list
2026-09-19 20:04:33 -07:00
mateo-berri
327447bc10 Merge remote-tracking branch 'origin/main' into litellm_fix_startup_view_creation_race
# Conflicts:
#	tests/test_litellm/proxy/test_proxy_server.py
2026-09-19 20:02:33 -07:00
berriai-litellm-provider-info-sync[bot]
2271c83731
chore(prices): sync OpenRouter prices: 7 models, 6 deprecated
openrouter/baidu/ernie-4.5-vl-424b-a47b: deprecation_date
openrouter/deepseek/deepseek-r1-distill-llama-70b: deprecation_date
openrouter/deepseek/deepseek-v3.1-terminus: deprecation_date
openrouter/deepseek/deepseek-v3.2: deprecation_date
openrouter/deepseek/deepseek-v3.2-exp: deprecation_date
openrouter/deepseek/deepseek-v4-flash: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/minimax/minimax-m2.1: deprecation_date
2026-09-20 03:00:53 +00:00
mateo-berri
517fff5bb7 fix(router): keep prompt caching affinity when the breakpoint moves
The prompt_caching pre-call check keyed a deployment pin on a hash of the
whole cacheable prefix, cache_control markers included. Agent clients
such as Claude Code move the marker to the newest user turn on every
request, so the key changed every turn, the pin never matched, and a
multi-turn session drifted across deployments and lost its provider
cache.

Hash the prefix per content block with the markers stripped, chained so
every block position has a key, and write the pin at the breakpoint
block. Lookup walks back over the last PROMPT_CACHE_LOOKBACK_POSITIONS
positions (a run of tool_use or tool_result blocks counting as one), the
same window the provider probes for a cached prefix, in one batch cache
read. Both sides hash the prefix after base64 truncation so a request
carrying raw image bytes derives the keys the success event stored.
2026-09-19 19:52:22 -07:00
Joshua Valluru
4fda0092d3 fix(mcp): explain missing public client dependencies 2026-09-19 19:52:13 -07:00
joshua-berri
8df260a13d
Merge pull request #42051 from BerriAI/litellm_mcp_oauth_e2e_3467_rework
test(e2e): restore MCP OAuth happy-path coverage (LIT-3467)
2026-09-20 02:50:14 +00:00
Joshua Valluru
124196cbaa fix(auth): preserve scope-admin email policy during status lookup 2026-09-19 19:48:53 -07:00
mateo
fdd91a347a test: drop narration comment from telemetry flag test
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 02:44:52 +00:00
Mateo Wang
b4447096e4
Merge pull request #42067 from BerriAI/litellm_genai_adapter_response_schema_tool_params
fix(google_genai): forward response schema and tool parameters through the generateContent adapter
2026-09-19 19:43:32 -07:00