Commit graph

39980 commits

Author SHA1 Message Date
Sameer Kankute
d02a70ab4e
Fix greptile comments 2026-03-27 20:11:28 +05:30
Sameer Kankute
fc6865c3a3
Fix greptile comments 2026-03-27 20:11:28 +05:30
Sameer Kankute
303072dc44
Fix greptile comments 2026-03-27 20:11:28 +05:30
Sameer Kankute
173695f5e0
Fix greptile comments 2026-03-27 20:11:27 +05:30
Sameer Kankute
8db867c51c
fix(routing): address state consistency and type safety issues
- Check alias target pattern to detect stale team aliases
- Fix PrismaClient type annotation to Optional
- Eliminate in-place mutation in index update logic

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
e8fb7762b3
perf(routing): optimize team model checks and improve test coverage
- Use O(1) team index lookup instead of map_team_model in alias guard
- Fix MockPrismaClient to validate where clause filters
- Add comment explaining DB query trade-off for team deployments

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
8aa58bdcaa
fix(routing): prevent stale model_aliases from interfering with team routing
- Skip model_aliases rewrite if model resolves to team deployments
- Add test coverage for sibling-preservation branch
- Update MockPrismaClient to support sibling deployment scenarios

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
298df75066
fix(router): guard None model_info and deduplicate team index logic
- Guard against None model_info in sibling deployment check
- Extract _update_team_model_index helper to eliminate duplication

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
f5b7298854
fix(management): query DB directly for sibling deployments on rename
- Add clarifying comments to test assertions
- Query prisma DB instead of in-memory router to avoid stale state
- Prevents incorrect deletion of old public name when siblings exist

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
4f302f10d0
fix(router): prevent cross-team deployment leakage in fallback path
Guard should_include_deployment fallback to only return deployments
matching the requested team_id, preventing public-name collisions
from leaking deployments across teams

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
ef9ea1f8f2
fix(router): address Greptile P1/P2 performance issues
- Guard against llm_router=None to prevent silent deletion
- Add O(1) team_model index to avoid O(n) scan on every team request

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
248fb8bc90
fix(router): address remaining Greptile P0/P1 issues
- Update map_team_model test to expect public name return
- Only remove old public name if no sibling deployments use it

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
7b5e7e05b1
fix(router): address Greptile review comments
- Add None guard for original_model_name in _add_team_model_to_db
- Remove stale old public name when renaming team model
- Add comment clarifying team deployment early-return priority

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
1835e9a252
chore(team-routing): remove temporary candidate pool logs
Remove temporary fire-emoji router logs used for local verification while keeping team sibling deployment routing behavior unchanged.

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
aeb932d707
fix(team-routing): keep team model routing on public names
Remove team model_alias rewrites and resolve team deployments by team_public_model_name with team_id so sibling deployments stay in the routing candidate pool, with explicit logs showing candidate selection before load balancing.

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
5534b40ab3
fix(team-routing): use deterministic team model group names
Use a deterministic internal model_name for team-scoped deployments so sibling deployments with the same public model share a routing group. This makes team alias writes idempotent and preserves multi-deployment failover/load balancing behavior.

Made-with: Cursor
2026-03-27 20:11:27 +05:30
Sameer Kankute
e635cee712
feat(fine-tuning): address greptile review feedback (greploop iteration 5)
- Remove unused FineTuningJob import from test
- Document "canceling" → "cancelled" mapping in _AZURE_STATUS_MAP

Made-with: Cursor
2026-03-27 20:04:41 +05:30
Sameer Kankute
528bac5a27
feat(fine-tuning): address greptile review feedback (greploop iteration 4)
- Add cancel/retrieve overrides in AzureOpenAIFineTuningAPI to normalize responses
- Expand _AZURE_STATUS_MAP to handle all known Azure statuses
- Add "pending" to OpenAIFileObject.status allowed values
- Fix async test mock to return awaitable LiteLLMFineTuningJob
- Add test_openai_file_object_accepts_pending_status

Made-with: Cursor
2026-03-27 20:04:41 +05:30
Sameer Kankute
d4d91684cf
address greptile review feedback (greploop iteration 3)
- Remove redundant _ensure_training_type call from acreate_fine_tuning_job
- Use explicit _AZURE_STATUS_MAP for status normalization

Made-with: Cursor
2026-03-27 20:04:41 +05:30
Sameer Kankute
a9c7b17bfa
address greptile review feedback (greploop iteration 2)
- Call _ensure_training_type in acreate_fine_tuning_job async override

Made-with: Cursor
2026-03-27 20:04:41 +05:30
Sameer Kankute
2484d202f8
address greptile review feedback (greploop iteration 1)
- Move trainingType injection to AzureOpenAIFineTuningAPI handler
- Guard normalization with is_azure flag to only apply to Azure responses
- Override acreate_fine_tuning_job in Azure handler to use is_azure=True
- Update test to directly test _ensure_training_type method
- Add test for OpenAI unchanged behavior

Made-with: Cursor
2026-03-27 20:04:41 +05:30
Sameer Kankute
265f2eb090
feat(fine-tuning): fix Azure OpenAI fine-tuning job creation
- Default trainingType=1 for Azure when omitted to avoid misleading "base model does not support fine-tuning" error
- Normalize Azure FineTuningJob responses (pending→queued, null fields→defaults) to match OpenAI schema
- Add pending status support to OpenAIFileObject for Azure file uploads
- Add test coverage for trainingType default and response normalization

Made-with: Cursor
2026-03-27 20:04:41 +05:30
Krrish Dholakia
88ed4f90ab docs(security_update_march_2026): publish safe versions - confirmed by veria labs 2026-03-27 05:51:01 -07:00
Krrish Dholakia
a671275f5c ci: add zizmor github action 2026-03-27 05:33:21 -07:00
Sameer Kankute
226e18534e
Add correct pricing 2026-03-27 11:04:29 +05:30
Sameer Kankute
06c8476544
feat(gemini): add gemini-3.1-flash-live-preview to model cost map
Made-with: Cursor
2026-03-27 11:04:29 +05:30
Krrish Dholakia
dfb543369b fix: address zizmor comments 2026-03-26 21:09:01 -07:00
yuneng-jiang
b20cff8673
Merge pull request #24654 from BerriAI/litellm_publish_to_pypi_migrate
[Infra] Migrate PyPI Publishing from CircleCI to GitHub Actions OIDC
2026-03-26 19:09:00 -07:00
Yuneng Jiang
ba8455a3be
[Infra] Migrate PyPI publishing from CircleCI to GitHub Actions OIDC
- Add .github/workflows/publish_to_pypi.yml with OIDC trusted publisher
- Remove publish_to_pypi job from .circleci/config.yml
- Zero long-lived tokens, all actions SHA-pinned, build deps version-pinned
2026-03-26 19:02:14 -07:00
Nicholas Gigliotti
92654bad37 Refactor _supports_native_structured_outputs to use standard supports_* utility pattern
Addresses Greptile review feedback: replace direct litellm.model_cost
lookup with the standard _supports_factory infrastructure used by
supports_reasoning, supports_native_streaming, etc.

- Add supports_native_structured_output() utility in litellm/utils.py
- Add supports_native_structured_output field to ModelInfoBase type
- Wire field into _get_model_info_helper return dict
- Delegate from Bedrock _supports_native_structured_outputs to utility
- Add field to JSON schema validator in test_utils.py
2026-03-26 21:49:03 -04:00
Nicholas Gigliotti
b45ef7f6b9 Keep multimodal gemini-embedding-2-preview entry to align with #23599
Main has two duplicate keys for vertex_ai/gemini-embedding-2-preview.
Our JSON round-trip collapsed them to the second (text-only) entry, but
PR #23599 intentionally keeps the first (multimodal pricing) entry.
Restore the multimodal entry to avoid conflicts.
2026-03-26 20:23:12 -04:00
Nicholas Gigliotti
0ef8eb6121 Add test assertion for deepseek.v3-v1:0 native structured output 2026-03-26 20:23:12 -04:00
Nicholas Gigliotti
d7e55bf105 Fix test state leakage: restore env and model_cost after each test
Wrap cost-map-dependent tests in try/finally to restore
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] and litellm.model_cost,
preventing test-ordering sensitivity.
2026-03-26 20:23:12 -04:00
Nicholas Gigliotti
ed06dded19 Remove native structured output flag from minimax-m2.1, kimi-k2.5, qwen3-coder-next
Integration testing confirmed:
- minimax.minimax-m2.1: Bedrock rejects outputConfig.textFormat (400)
- moonshotai.kimi-k2.5: Bedrock rejects outputConfig.textFormat (400)
- qwen.qwen3-coder-next: unavailable in us-east-1 and us-west-2
2026-03-26 20:23:12 -04:00
Nicholas Gigliotti
a7ebc72c26 Add native structured output flag for deepseek.v3-v1:0
Integration tested 28/28 (10 sync + 10 streaming + extras) on the
native outputConfig.textFormat path in us-west-2. deepseek.v3.2 does
not support native structured output (Bedrock returns 400).
2026-03-26 20:23:12 -04:00
Nicholas Gigliotti
aba027beed Remove native structured output flag from models broken on Bedrock
Integration testing confirmed gemma-3 (4b/12b/27b) ignores the JSON
schema and returns free text, and nemotron-nano (9b/12b) errors with
"Tool calling is not supported in streaming mode" even on sync calls.
Remove the flag so these models fall back to the tool-call approach.
Also fix test assertions to match (nemotron-nano-3-30b is supported,
gemma-3 and nemotron-nano-12b are not).
2026-03-26 20:23:12 -04:00
Nicholas Gigliotti
cb66672017 Replace hardcoded Bedrock native structured output model set with cost JSON lookup
Move the source of truth for which Bedrock models support native structured
outputs (outputConfig.textFormat) from a hardcoded substring set
(BEDROCK_NATIVE_STRUCTURED_OUTPUT_MODELS) to the cost JSON via a new
"supports_native_structured_output" flag. This makes it possible to add
support for new models (including Claude Sonnet 4.6, which was missing)
by updating the JSON alone, with no code changes needed.
2026-03-26 20:23:12 -04:00
Krrish Dholakia
efd73a44f4 fix(index.md): test commit 2026-03-26 16:12:00 -07:00
Krrish Dholakia
8f425ec3ff fix: update ioc to include checkmarx.zone 2026-03-26 15:43:01 -07:00
ishaan-berri
6153793f81
Merge pull request #24649 from BerriAI/ishaan-berri-patch-1
Update README.md
2026-03-26 15:22:23 -07:00
ishaan-berri
b69ce9fafa
Update README.md 2026-03-26 15:22:11 -07:00
yuneng-jiang
25feae9f0f
Merge pull request #24607 from BerriAI/litellm_gha_pin_pt_2
[Infra] Pin GHA dependencies and remove unused load test files
2026-03-26 08:47:38 -07:00
yuneng-jiang
bdf4acc472
Merge pull request #24468 from BerriAI/litellm_opencode-drop-reasoningSummary-docs
docs(opencode): add guidance for dropping reasoningSummary param
2026-03-25 23:00:56 -07:00
Yuneng Jiang
84be6f69ef fix google-cloud-aiplatform pin to be compatible with google-genai==1.22.0
Pin to 1.115.0 (latest version that doesn't require google-genai>=1.59.0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:37:43 -07:00
Yuneng Jiang
1beb687f54 pin GHA dependencies + remove unused load test files
Pin all pip install commands to exact versions and SHA-pin all GitHub
Actions to prevent supply chain attacks. Remove snok/install-poetry
in favor of direct pip install. Delete orphaned load test scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:32:08 -07:00
Krrish Dholakia
df2a36dd27 docs: document new github + gitlab ci scripts 2026-03-25 20:17:10 -07:00
yuneng-jiang
437341c9b5
Merge pull request #24594 from BerriAI/litellm_gha_pin_helm
[Infra] Pins GitHub Action workflows to specific hashes
2026-03-25 18:17:21 -07:00
Yuneng Jiang
b90a0af0d7 remove extra @ 2026-03-25 17:46:37 -07:00
Yuneng Jiang
a989587525 re-add helm unit test with checksum pin 2026-03-25 17:38:36 -07:00
Yuneng Jiang
f86b240d7e pin github scripts + remove unused 2026-03-25 17:38:36 -07:00