Commit graph

51839 commits

Author SHA1 Message Date
Yassin Kortam
1ac4d7ae04 fix(anthropic): type safeguards and safeguard_results as the arrays Anthropic sends
Driving a real Claude Code 2.1.278 through the proxy, and a direct call to
api.anthropic.com, both show these two fields are JSON arrays on the wire rather
than objects. The request carries safeguards as
[{"type": "dangerous_tool_use", "classifier_context": {...}}] under beta
dangerous-tool-use-2026-09-03, and the 200 comes back with safeguard_results as
[{"type": "dangerous_tool_use", "status": {"type": "available", "tool_uses": {...}}}].

No runtime change: the request filter matches on TypedDict keys and never inspects
the value. The test fixtures move to the captured shapes so the regression tests
pin what the client and the provider actually exchange.
2026-09-21 09:55:09 -05:00
yassin
b59028d525 fix(anthropic): strip safeguards on the adapter path and type it on streaming chunks
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 17:37:56 +00:00
yassin
3ebd5add32 fix(anthropic): forward safeguards and anthropic-beta unchanged on native /v1/messages
Native Anthropic Messages requests derived their allowlist from
AnthropicMessagesRequestOptionalParams, which lacked safeguards, and the
shared beta-header filter dropped betas unknown to the provider mapping
even when the upstream is api.anthropic.com itself. Claude Code auto mode
then saw no safeguard_results and fell back to billed classifier calls

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 17:20:22 +00:00
kerry-berri
af1f46af1a
Merge pull request #41980 from BerriAI/litellm_fal_seedance_video
feat(fal_ai): add Seedance 2.5 / 2.0 video generation via fal queue API
2026-09-20 10:18:48 -07:00
moe-berri
1e161f516c
Merge pull request #41879 from BerriAI/litellm_jev_test_budget_1789764884
fix(proxy): enforce virtual key budgets for JEV test routing
2026-09-20 10:10:21 -07:00
yuneng-jiang
0f7d4dc13b
Merge pull request #42136 from BerriAI/litellm_migrate_tests_p15
test: migrate phase 15 legacy tests to tests/unit
2026-09-20 07:49:31 -07:00
yuneng-jiang
e0c7a4b19e
Merge pull request #42137 from BerriAI/litellm_migrate_tests_p12
test: migrate phase 12 legacy llm provider tests to tests/unit
2026-09-20 07:49:20 -07:00
yuneng-jiang
317f7cb69a
Merge pull request #42123 from BerriAI/litellm_migrate_tests_p1
test: migrate wave 1 phase 1 legacy tests to tests/unit
2026-09-20 07:49:08 -07:00
yuneng
d086f8574d test: add sync and async custom_llm_provider bridge propagation tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 13:46:52 +00:00
yuneng
30f3075010 test: use main's local_model_cost_map fixture in tests/unit/conftest.py
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 13:44:30 +00:00
yuneng
27dc080502 Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p15 2026-09-20 13:44:24 +00:00
yuneng
69133cc8cf Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p12 2026-09-20 13:44:19 +00:00
yuneng-jiang
8795d5f847
Merge pull request #42131 from BerriAI/litellm_migrate_tests_p16
test: migrate phase 16 legacy tests to tests/unit
2026-09-20 06:43:45 -07:00
yuneng-jiang
ec93936668
Merge pull request #42132 from BerriAI/litellm_migrate_tests_p14
test: migrate phase 14 wave 2 provider tests to tests/unit
2026-09-20 06:43:34 -07:00
yuneng-jiang
e5b2cabae5
Merge pull request #42128 from BerriAI/litellm_migrate_tests_p11
test: migrate openai, openai_like and openrouter legacy tests to tests/unit
2026-09-20 06:43:22 -07:00
yuneng-jiang
743f3a1388
Merge pull request #42118 from BerriAI/litellm_migrate_tests_p3
test(unit): migrate wave 1 phase 3 anthropic, apiserpent, azure and azure_ai legacy tests
2026-09-20 06:43:10 -07:00
yuneng
4fb1a3e610 test: add __init__.py to intermediate tests/unit packages
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 12:55:27 +00:00
yuneng
1ca0a662f0 Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p11 2026-09-20 12:55:05 +00:00
yuneng
affd2d0c30 merge: bring main (unit package markers) into litellm_migrate_tests_p3 2026-09-20 12:55:05 +00:00
yuneng
0237e69929 Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p16 2026-09-20 12:55:02 +00:00
yuneng
a7a790d10c Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p15 2026-09-20 12:55:00 +00:00
yuneng
432cf517ce Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p14 2026-09-20 12:54:59 +00:00
yuneng
ad0511ab64 Merge remote-tracking branch 'origin/main' into litellm_migrate_tests_p12 2026-09-20 12:54:55 +00:00
yuneng
b2ae0151e7 chore: merge main into litellm_migrate_tests_p1 2026-09-20 12:54:53 +00:00
yuneng-jiang
b9a2d441cf
Merge pull request #42135 from BerriAI/litellm_unit_packages
test(unit): make every tests/unit directory a package so pytest collection is unique
2026-09-20 05:54:27 -07:00
yuneng
cd07acbdea test: add __init__.py to intermediate phase 12 unit test directories
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 12:37:21 +00:00
yuneng
42dd6a1300 test: add __init__.py to phase 12 unit test directories
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 12:36:15 +00:00
yuneng
eea0017565 test: add __init__.py to new tests/unit packages
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 12:36:13 +00:00
Mateo Wang
cbcccd531c
Merge pull request #42127 from BerriAI/litellm_any_sweep_20260920
refactor(types): replace Any with proven types in 30 files
2026-09-20 05:23:51 -07:00
Devin AI
73a35abeb3 refactor(types): keep object permission parsing as it was
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:57:53 +00:00
yuneng
78a751c049 test: migrate phase 15 legacy tests to tests/unit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:55:43 +00:00
yuneng
30a422087c test: add __init__.py to migrated tests/unit packages
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:53:49 +00:00
yuneng
baf40ea5e8 test(unit): add package markers to migrated unit test directories
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:53:14 +00:00
yuneng
434af084e7 test: add __init__.py to every tests/unit directory phase 16 touches
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:52:38 +00:00
yuneng
49cd32affe test: add __init__.py to every tests/unit directory this migration touches
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:52:09 +00:00
yuneng
5599c59923 test: add package initializers to migrated unit test directories
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:52:07 +00:00
yuneng
e4a58ef91a test(unit): make every tests/unit directory a package so pytest collection is unique
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:50:59 +00:00
Devin AI
6ba4c2e339 refactor(types): keep guardrail metadata helper accepting dicts
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:40:11 +00:00
Devin AI
e0b92b2b25 refactor(types): keep a2a response_dict annotation as it was
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:07:38 +00:00
yuneng
a3dd47ea11 test(unit): clear ambient Azure credentials in entra token tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:05:03 +00:00
yuneng
ef6237b9f2 test: migrate phase 12 legacy llm provider tests to tests/unit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:02:53 +00:00
yuneng
a69ca90ea5 test: migrate phase 14 wave 2 provider tests to tests/unit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:01:40 +00:00
yuneng
72abd11b4c test: assert the responses bridge forwards aws_region_name
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 11:01:32 +00:00
yuneng-jiang
bfc805b372
Merge pull request #42109 from BerriAI/litellm_migrate_tests_p5
test(llms): migrate phase 5 provider unit tests to tests/unit
2026-09-20 04:00:48 -07:00
yuneng-jiang
766f6fcd3a
Merge pull request #42112 from BerriAI/litellm_migrate_tests_p8
test: migrate wave 1 phase 8 legacy llm tests to tests/unit
2026-09-20 03:59:36 -07:00
yuneng-jiang
4852d71606
Merge pull request #42114 from BerriAI/litellm_migrate_tests_p7
test(llms): migrate phase 7 provider unit tests to tests/unit
2026-09-20 03:59:28 -07:00
yuneng
924ad6e571 test: remove phase 16 legacy test files from tests/test_litellm
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 10:59:22 +00:00
yuneng
7cf9a3035c test: migrate phase 16 legacy tests to tests/unit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 10:59:02 +00:00
yuneng
729a96e4ea test: migrate openai, openai_like and openrouter legacy tests to tests/unit
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 10:40:27 +00:00
Devin AI
dbf566873e refactor(types): keep agentops preset imports optional
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-20 10:28:06 +00:00