Commit graph

34478 commits

Author SHA1 Message Date
Cesar Garcia
a8b5a876bf
Merge pull request #21491 from Chesars/fix/20998-remove-hardcoded-reasoning-summary
fix(anthropic): remove hardcoded reasoning summary in adapter
2026-03-03 15:29:11 -03:00
Chesars
833c1bc45d merge: resolve conflict with staging, remove hardcoded summary from reasoning test 2026-03-03 15:28:45 -03:00
Cesar Garcia
b2c7d2e049
Merge pull request #21577 from Chesars/fix/gemini-streaming-tool-calls-finish-reason
fix(gemini): correct streaming finish_reason for tool calls
2026-03-03 15:25:24 -03:00
Cesar Garcia
bca1964f70
Merge pull request #22603 from BerriAI/fix/helicone-vertex-gemini-provider-url
fix(helicone): correct provider URL for Vertex AI Gemini models
2026-03-03 15:23:51 -03:00
yuneng-jiang
a1ba6c9fa6 Fix log levels: info for unconfigured, warning for misconfigured
Suppress noisy error log fired every cron tick when spend log cleanup
is simply not configured. _should_delete_spend_logs already logs the
specific reason at the right level (info for None, warning for
invalid value), so the redundant blanket error log in
cleanup_old_spend_logs is removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 10:21:31 -08:00
Chesars
4a88d85446 test: add provider_url routing test for vertex_ai/gemini models
Verifies that vertex_ai gemini models route to
aiplatform.googleapis.com instead of
generativelanguage.googleapis.com, preventing
regressions if the branch ordering changes.
2026-03-03 15:20:51 -03:00
Cesar Garcia
da941e4261
Merge pull request #22589 from Chesars/fix/vertex-preserve-any-type-schema
fix(vertex): preserve type schema semantics for JsonValuefields
2026-03-03 15:19:16 -03:00
Cesar Garcia
f77f28a5f8
Merge pull request #20920 from Chesars/refactor/files-main-credential-helpers
chore: code duplication in files/main.py using credential helpers
2026-03-03 15:18:17 -03:00
Cesar Garcia
fe8fa3abe0
Merge pull request #17308 from Chesars/fix/python-multipart-version-constraint
chore: update python-multipart constraint to >=0.0.18
2026-03-03 15:17:57 -03:00
Cesar Garcia
de415abd5a
Merge pull request #22653 from Chesars/fix/batch-encode-ids-x-litellm-model
fix(proxy): encode batch IDs when x-litellm-model header is used
2026-03-03 15:17:43 -03:00
Cesar Garcia
fecb301684
Update litellm/llms/openrouter/image_edit/transformation.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-03 15:16:12 -03:00
Chesars
47f0390b9b fix: remove duplicate Pillow==11.0.0 pin (12.1.1 already on line 8) 2026-03-03 15:14:20 -03:00
yuneng-jiang
224c617119 Fix spend log cleanup: lock tracking, integer retention, skip log level
- Only release distributed lock in finally if it was actually acquired;
  prevents spurious Redis release_lock calls on early returns
- Treat bare integer maximum_spend_logs_retention_period as days (e.g. 3 → "3d")
  instead of silently failing with a ValueError
- Elevate "Skipping cleanup" log from info to error so misconfigured
  retention settings are visible without verbose logging
- Add tests for all three fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 10:12:08 -08:00
Varad Khonde
7d65df351f feat(togetherai): add support for TogetherAI Qwen3.5-397B-A17B model 2026-03-03 23:40:41 +05:30
Chesars
dc9f5a5cc4 fix(deps): update python-multipart to >=0.0.20 in CI and test configs 2026-03-03 15:10:39 -03:00
Chesars
dad7805b42 fix(deps): update python-multipart version to 0.0.22 in all files
Align requirements.txt, CI workflow, liccheck, and license cache
with the >=0.0.22 constraint already set in pyproject.toml.
2026-03-03 15:09:33 -03:00
Chesars
5005773909 fix(deps): relax python-multipart version constraint to >=0.0.22
The caret operator (^0.0.x) in zerover projects restricts to a single
patch version. Changed to >= to allow future patch updates.
2026-03-03 15:09:04 -03:00
Chesars
ead74dff11 refactor: move credential helpers to provider common_utils modules
Move get_openai_credentials() to litellm/llms/openai/common_utils.py
and get_azure_credentials() to litellm/llms/azure/common_utils.py
so they can be reused by batches/main.py and other modules.
Signatures now take individual params instead of GenericLiteLLMParams.
2026-03-03 15:02:24 -03:00
Chesars
fba19f089a refactor: reduce code duplication in files/main.py with credential helpers
Extract repeated OpenAI and Azure credential resolution logic into
_get_openai_credentials() and _get_azure_credentials() helper functions,
reducing ~270 lines of duplicated code across 5 file operations.
Also removes dead Vertex AI code path in create_file that was unreachable
since ProviderConfigManager.get_provider_files_config() handles it first.
2026-03-03 15:02:24 -03:00
Chesars
909e3ce6c9 test: create fresh ModelResponse per test to avoid shared mutable state 2026-03-03 14:54:11 -03:00
yuneng-jiang
b4980340fb
Merge pull request #22680 from BerriAI/litellm_fix_mcp_server_dates
[Fix] MCP server: preserve created_at and updated_at timestamps
2026-03-03 09:53:37 -08:00
github-actions[bot]
8665e92aa8
chore: regenerate poetry.lock to match pyproject.toml (#3)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-03 17:52:45 +00:00
Chesars
f6264a9c0f docs(openrouter): add image edit documentation
Add OpenRouter image edit docs to both the provider page and the
main image_edits reference page, including supported models, parameter
mappings (size→aspect_ratio, quality→image_size), usage examples,
proxy configuration, and a note about 4K quality model support.
2026-03-03 14:50:41 -03:00
yuneng-jiang
76e3dba0f8 fix mcp server created_at and updated_at timestamps being overwritten with current time
- Add created_at field to MCPServer type (was missing)
- Map created_at from LiteLLM_MCPServerTable in build_mcp_server_from_table()
- Use server.created_at and server.updated_at instead of datetime.now() in _build_mcp_server_table() and health check table builder
- Add regression tests to verify timestamps are preserved through round-trip conversions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 09:41:45 -08:00
Chesars
1fe2e92d32 fix(main): forward enable_json_schema_validation to acompletion_with_mcp
The parameter was declared in completion() signature but not passed
to acompletion_with_mcp, causing per-request JSON schema validation
to silently fall back to the global default when MCP tools are present.
2026-03-03 14:34:32 -03:00
Harshit28j
b44755db96 fix(proxy): make common_checks opt-in for custom auth via custom_auth_run_common_checks
Replaces the skip_route_check approach from PR #22662 with a configurable
opt-in flag. By default, common_checks() is not run for custom auth flows,
preserving backwards compatibility with pre-#22164 behavior.

Users who want budget/team/route enforcement on custom auth can enable it:
  general_settings:
    custom_auth_run_common_checks: true

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 22:50:34 +05:30
Harshit28j
22e682b1e8 feat: guardrail-mode-default-list 2026-03-03 22:45:32 +05:30
Sameer Kankute
afc7b87b36
Merge pull request #22656 from BerriAI/litellm_add_vector_store_Ui
Add support for Attaching knowledge base to model via UI
2026-03-03 22:25:59 +05:30
Sameer Kankute
daa0397f30
Merge pull request #22674 from BerriAI/litellm_gemini-3.1-flash-lite-preview
Day 0 gemini 3.1 flash lite preview support
2026-03-03 22:23:17 +05:30
Sameer Kankute
9d06106af0 Fix gemini-3.1-flash-lite-preview for streaming 2026-03-03 22:22:57 +05:30
Sameer Kankute
c3fe4634b6 Add correct pricing for gemini 3.1 flash lite 2026-03-03 22:06:16 +05:30
Ephrim Stanley
b83373d29c Managed batches - Address PR bot comments from #22464 2026-03-03 11:01:49 -05:00
Cesar Garcia
a0cc550f48
Merge pull request #22665 from Chesars/feat/add-zai-glm-5-model-pricing
feat(models): add zai/glm-5 and zai/glm-5-code to model cost map
2026-03-03 12:17:42 -03:00
Chesars
75518c3ca7 feat(models): add zai/glm-5 and zai/glm-5-code to model cost map
Add native ZhipuAI GLM-5 and GLM-5-Code model entries with pricing
from docs.z.ai/guides/overview/pricing.
2026-03-03 12:03:40 -03:00
Harshit28j
7d322e0d44 Merge branch 'main' of https://github.com/BerriAI/litellm into litellm_custm_auth 2026-03-03 20:24:44 +05:30
Cesar Garcia
dfd7203d7f
Merge pull request #22650 from Chesars/fix/add-missing-dashscope-glm5-pricing
fix(pricing): add 7 missing DashScope model pricing entries
2026-03-03 11:53:30 -03:00
Cesar Garcia
105a40ba4f
Merge pull request #22649 from Chesars/fix/add-missing-openrouter-model-pricing
fix(pricing): add 5 missing OpenRouter model pricing entries
2026-03-03 11:53:07 -03:00
Harshit28j
6d535e5639 fix(proxy): allow custom auth routes to bypass route authorization checks
Custom user-added routes (e.g. /ldap/ngs/ready) used with Depends(user_api_key_auth) were being rejected as admin-only after _run_post_custom_auth_checks was introduced in commit 14badde13c.

The route authorization check in common_checks is designed for LiteLLM's own management routes. Custom auth flows that add their own routes should be trusted since the custom auth function already validated the request. Budget and expiry checks still run.

Add skip_route_check parameter to common_checks() and pass skip_route_check=True from _run_post_custom_auth_checks() to skip route authorization while preserving budget/team/model checks.

Regression test added: test_common_checks_skip_route_check_for_custom_auth

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-03 20:20:47 +05:30
Chesars
59bde4a81a refactor(proxy): extract encode_batch_response_ids helper and fix list_batches encoding
Extract duplicated batch ID encoding logic into a shared helper
encode_batch_response_ids() in common_utils.py. Use it in create_batch,
retrieve_batch, and cancel_batch. Also add encoding to list_batches
when x-litellm-model is used.
2026-03-03 11:38:50 -03:00
Chesars
7506fd0426 fix(proxy): re-encode response IDs in cancel_batch for model-based routing 2026-03-03 11:22:43 -03:00
Sameer Kankute
c1b39a6425
Merge pull request #22651 from BerriAI/litellm_encrypted_content_affinity_2
Add support for encrypted content affinity
2026-03-03 19:43:47 +05:30
Sameer Kankute
a9ee8ff5d2
Merge pull request #22641 from BerriAI/litellm_remove_default_litellm_thinking
[Chore]Remove defualt hardcoded thinking levels for gemini 3 family
2026-03-03 19:42:40 +05:30
Sameer Kankute
bdfc602dbf
Merge pull request #22625 from BerriAI/litellm_azure_ai_finetune
Fix: Azure ai finetuning api
2026-03-03 19:42:17 +05:30
Chesars
9fd4c00b06 fix(proxy): re-encode response IDs in retrieve_batch for model-based routing
The provider returns raw IDs in the retrieve response (output_file_id,
error_file_id). These need to be encoded with model info so the client
can use them for subsequent file download calls through the proxy.
2026-03-03 11:06:38 -03:00
Harshit Jain
bb1da7091a
Merge pull request #22631 from Harshit28j/litellm_bump_litellm_08_03
bump: version 1.82.0 → 1.82.1
2026-03-03 19:35:56 +05:30
Sameer Kankute
88dd1b5801
Merge pull request #22657 from BerriAI/revert-22654-litellm_add_Qwen3.5-397B-A17B
Revert "feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model"
2026-03-03 19:35:39 +05:30
Sameer Kankute
24ec7f882f
Revert "feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model" 2026-03-03 19:35:26 +05:30
Sameer Kankute
6c0387d170 Add support for Attaching knowledge base to model via UI 2026-03-03 19:31:55 +05:30
Chesars
9463de0c66 fix: correct indentation from commit suggestions and add missing Optional import 2026-03-03 10:51:48 -03:00
Sameer Kankute
974c02fae4
Merge pull request #22654 from Varad2001/litellm_add_Qwen3.5-397B-A17B
feat(togetherai): add support for togetherai/Qwen3.5-397B-A17B model
2026-03-03 19:19:41 +05:30