Commit Graph

347 Commits

Author SHA1 Message Date
Sameer Kankute 45867ba934 Correct model map path 2026-01-29 16:33:50 +05:30
Sameer Kankute b0dec49e9a Remove validate job from lint 2026-01-29 16:26:00 +05:30
Sameer Kankute 39dea34dfa Add Validate model_prices_and_context_window.json job 2026-01-29 16:25:10 +05:30
Sameer Kankute fa80dc610d Add test to check if model map is corretly formatted 2026-01-29 16:14:32 +05:30
Alexsander Hamir 69bd4426e8 [Release Day] - Fixed CI/CD issues & changed processes (#19902) 2026-01-28 17:57:24 -08:00
Krrish Dholakia 45a9886798 fix: change oss staging branch name to reflect they're oss 2026-01-22 11:50:27 -08:00
Cesar Garcia 7515f179e7 fix: sync Helm chart version with LiteLLM release version (#19438)
Replace independent auto-incrementing chart versioning with 1-1 sync
to LiteLLM version. This allows users to easily map Helm chart versions
to LiteLLM versions without needing to inspect appVersion.

Changes:
- Remove auto-increment logic that read from OCI registry
- Chart version now equals LiteLLM tag without 'v' prefix (v1.81.0 -> 1.81.0)
- appVersion equals full Docker tag (v1.81.0)
- Update both ghcr_deploy.yml and ghcr_helm_deploy.yml workflows

Before: helm chart 0.1.837 -> user has to guess LiteLLM version
After:  helm chart 1.81.0  -> matches LiteLLM v1.81.0

References:
- https://codefresh.io/docs/docs/ci-cd-guides/helm-best-practices/
2026-01-20 14:13:26 -08:00
Yuta Saito 7d7b78a53d test: Pydantic version up
mcp 1.25.0 depends on pydantic<3.0.0 and >=2.11.0
2026-01-20 10:49:33 +09:00
Yuta Saito b229410fb5 test: ci requirements mcp version up 2026-01-20 10:42:58 +09:00
Cesar Garcia 095bb6de8d feat: add auto-labeling for 'claude code' issues (#19242) 2026-01-17 03:31:48 +05:30
Harshit Jain 37c014c805 ci(github): add automated duplicate issue checker and template safeguards (#19218) 2026-01-17 00:17:20 +05:30
Matthias Humt 9adc19deab Normalize OpenAI SDK BaseModel choices/messages to avoid Pydantic serializer warnings (#18972)
* Normalize BaseModel choices + suppress serializer warnings

* Fix ModelResponse normalization and test deps
2026-01-14 03:40:11 +05:30
Cesar Garcia 46dd420833 fix: sync Helm chart versioning with production standards and Docker versions (#18868)
* fix: sync Helm chart versioning with production standards and Docker versions

- Update Chart.yaml version from 0.4.10 to 1.0.0 (SemVer 0.x is for development, 1.0+ for production)
- Update appVersion from v1.50.2 to v1.80.12 to match current Docker image version
- Update workflow defaults from 0.1.0 to 1.0.0 for new chart version scheme
- Maintain independent chart versioning per Helm best practices

This ensures:
- Helm chart follows SemVer production standards (1.x instead of 0.x)
- appVersion stays synchronized with Docker/application version
- Chart version remains independent for flexibility (can update chart without waiting for app releases)

* fix: sync Helm chart appVersion with Docker image tags in release workflow

Updates the GitHub workflow to ensure Helm chart appVersion matches the
Docker image tags that are actually published:

- For stable/rc releases: Uses the workflow input tag (e.g., v1.80.12)
- For latest/dev releases: Uses the release_type to match main-{type} tags
- Makes 'tag' input required to prevent accidental releases with wrong versions
- Simplifies fallback logic by removing git-describe dependency

This ensures the chart's appVersion correctly references Docker images
that exist, preventing deployment failures from missing image tags.

* Update ghcr_deploy.yml
2026-01-12 17:04:59 +05:30
Cesar Garcia 153fd7ad0a fix: prevent Prisma migration workflow from running in forks (#18863)
- Add repository check to only run workflow in BerriAI/litellm
- Prevents workflow failures and wasted resources in forked repositories
- Avoids confusion for external contributors
2026-01-09 22:56:32 +05:30
Cesar Garcia 86b71d4713 fix(workflow): Update issue labeling with working regex pattern (#18821)
* fix: align max_tokens with max_output_tokens for consistency

Fixed inconsistent max_tokens definitions in model_prices_and_context_window.json.
According to LiteLLM convention, max_tokens should equal max_output_tokens when available.

Models fixed:
- deepseek-chat: 131072 → 8192 (now equals max_output_tokens)
- dashscope/qwen-flash: 1000000 → 32768 (now equals max_output_tokens)
- databricks/databricks-gemma-3-12b: 128000 → 32000 (now equals max_output_tokens)

This ensures consistency across all providers where max_tokens represents
the maximum number of tokens that can be generated in the output.

* fix(workflow): Update issue labeling with working regex pattern

- Replace contains() with regex pattern using \s* for flexible whitespace matching
- Consolidate 4 separate steps into single unified component labeling step
- Tested and verified pattern works for all components: SDK, Proxy, UI Dashboard, Docs
- Pattern handles GitHub's issue body formatting with ### headers and variable newlines
2026-01-08 23:48:41 +05:30
Cesar Garcia e34e8b4650 Fix component label automation to prevent false positives (#18765)
* Fix component label automation to prevent false positives

The GitHub Actions workflow was applying component labels (SDK, Proxy, UI Dashboard, Docs) too broadly by only checking if the component name appeared anywhere in the issue body. This caused issues to be mislabeled when users mentioned these terms in their descriptions.

Changes:
- Add more specific condition that checks for both the dropdown field header "What part of LiteLLM is this about?" AND the component name
- Applied to all 4 component labels: SDK, Proxy, UI Dashboard, and Docs
- Labels will now only be applied when users actually select the option from the dropdown

Fixes issues being incorrectly labeled with 'docs' and other component labels.

* Use more specific pattern to match dropdown selection exactly

Updated the label conditions to use a more precise pattern that matches
the dropdown header immediately followed by the selected value. This
prevents false positives when users mention component names in their
descriptions but select a different component.

Before: Checked for header AND component name anywhere in body
After: Checks for exact pattern "header\n\ncomponent"

This ensures labels are only applied when the component is actually
selected from the dropdown, not just mentioned in the issue text.

* Fix component label automation and require explicit user selection

This PR fixes two issues with component labeling:

1. **Improved label accuracy**: Updated the workflow to use exact pattern
   matching ("### What part of LiteLLM is this about?\n\nDocs") instead of
   broad substring matching. This prevents false positives where issues were
   mislabeled when users mentioned component names in their descriptions.

2. **Require explicit component selection**: Added empty string ('') as the
   first dropdown option to prevent GitHub from auto-selecting "SDK" as the
   default. Users must now consciously select which component their issue
   relates to.

Changes:
- Updated all component label conditions in label-component.yml workflow
- Added empty string as first option in bug_report.yml dropdown
- Added empty string as first option in feature_request.yml dropdown
- Labels only apply when users actually select a component from the dropdown

This ensures accurate labeling and prevents the default SDK label from
being applied to all new issues.
2026-01-07 20:01:14 +05:30
Ishaan Jaffer 6112160a16 Revert "[Fix] Security - Remove example API keys with high entropy (#18255)"
This reverts commit 24edbccf5c.
2025-12-20 20:48:11 +05:30
Alexsander Hamir 24edbccf5c [Fix] Security - Remove example API keys with high entropy (#18255) 2025-12-19 10:09:50 -08:00
Cesar Garcia cd9b71093a Improve issue labeling: add component dropdown and more provider keywords (#17957)
- Replace "ML Ops Team" dropdown with "What part of LiteLLM is this about?"
  with options: SDK, Proxy, UI Dashboard, Docs, Other
- Add component dropdown to feature_request.yml template
- Rename label-mlops.yml to label-component.yml and update to auto-label
  issues with sdk, proxy, ui-dashboard, or docs based on selection
- Add more provider keywords to issue-keyword-labeler: gemini, cohere,
  mistral, groq, ollama, deepseek
2025-12-16 09:38:39 +05:30
Krish Dholakia edfb4148dc Add workflow to create daily staging branches (#18020)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-16 08:13:54 +05:30
Cesar Garcia eb94c95e72 fix: add semver prerelease suffix to helm chart versions for non-stable releases (#17678)
Helm chart versions now include a prerelease suffix based on release_type:
- stable: 0.1.830 (no suffix)
- rc: 0.1.830-rc
- latest: 0.1.830-latest

This allows users to easily identify stable vs non-stable chart versions.
Helm also hides prerelease versions by default, preventing accidental
upgrades to non-stable versions.

Also fixes version extraction to strip existing suffixes before bumping.
2025-12-12 03:51:37 -08:00
saisurya237 f3ead2c153 add a new feature fix to expose the team alias when authenticating th… (#17725)
* CLI SSO: show team aliases in team selection

* temp poetry lock fix

* add poetry.lock to gitignore

* Revert proxy_server background job refactor

* Revert proxy_server background job refactor

* rever gitignore and poetry lock file
2025-12-10 10:10:28 -08:00
Lior Drihem 62b84d6aad Prompt security litellm (#16365)
* add prompt security guardrails provider

* cosmetic

* small

* add file sanitization and update context window

* add pdf and OOXML files support

* add system prompt support

* add tests and documentation

* remove print

* fix PLR0915 Too many statements (96 > 50)

* cosmetic

* fix mypy error

* Fix failed tests due to naming conflict of responses directory with same-named pip package

* Fix mypy error: use 'aembedding' instead of 'embeddings' for async embedding call type

* Fix: Install enterprise package into Poetry virtualenv for tests

The GitHub Actions workflow was installing litellm-enterprise to system Python
using 'python -m pip install -e .', but tests run in Poetry's virtualenv using
'poetry run pytest'. This caused ImportError for enterprise package types.

Changed to 'poetry run pip install -e .' so the package is available in the
same virtualenv where pytest executes.

Fixes enterprise test collection errors in GitHub Actions CI.

* Move Prompt Security guardrail tests to tests/test_litellm/

Per reviewer feedback, move test_prompt_security_guardrails.py from
tests/guardrails_tests/ to tests/test_litellm/proxy/guardrails/ so
it will be executed by GitHub Actions workflow test-litellm.yml.

This ensures the Prompt Security integration tests run in CI.

---------

Co-authored-by: Ori Tabac <oritabac@prompt.security>
Co-authored-by: Vitaly Neyman <vitaly@prompt.security>
2025-11-24 11:44:20 -08:00
YutaSaito 8b33328cc1 Perf speed up pytest (#15951)
* perf: Skip sleep delays in base_mail.py during tests to improve test speed

* perf: Mock datetime.now in parallel_request_limiter_v3.py to improve test speed

* pref: Mock urllib system calls in test_aiohttp_transport.py to improve test speed

* chore: add --durations=50 to visualize slowest tests

* pref: reduce setup phase overhead by widening fixture scope in conftest.py

* test: stabilize flaky tests

* fix: minor issue
2025-10-27 19:43:40 -07:00
Ishaan Jaffer 46d754a0f9 fix workflow 2025-10-18 11:14:18 -07:00
Krrish Dholakia 7be9a32934 test: make lint test stricter 2025-09-27 13:33:25 -07:00
Krrish Dholakia c2e2b699e6 fix: fix linting error 2025-09-27 12:43:06 -07:00
Krrish Dholakia 5cdeb63cdd test: fix tests 2025-09-27 11:09:25 -07:00
Krrish Dholakia 09556d0a44 test: add debugging step to linting 2025-09-27 10:58:14 -07:00
Krrish Dholakia 82eeca7870 test: update test 2025-09-27 10:49:21 -07:00
Krrish Dholakia a569e4d711 test: update test to not stop on first error (allows us to see all issues) 2025-09-27 10:23:46 -07:00
Krrish Dholakia 5bae1f6540 perf(test-mcp.yml): run mcp tests on linting 2025-09-22 17:41:43 -07:00
Ishaan Jaff 4b7c114c2a google-cloud-aiplatform 2025-09-02 14:15:00 -07:00
Krish Dholakia 8b11452d9e Merge branch 'main' into add-vercel-ai-gateway-provider 2025-08-29 22:27:08 -07:00
Ishaan Jaff 76f1064229 [Bug Fix] litellm incompatible with newest release of openAI v1.100.0 (#13728)
* fix imports OpenAI SDK

* ResponseText fixes

* fixes ResponseText

* fix imports

* catch AttributeError

* fix import

* use openai==1.100.1

* fix build from PIP

* fix lint test

* Print OpenAI version

* fix Install dependencies
2025-08-18 18:26:17 -07:00
Jugal Bhatt 936c36bd5f Increase timeout for test-litellm workflow from 20 to 25 minutes to accommodate longer test execution times. 2025-08-14 15:41:58 -07:00
Sameer Kankute 74496eefea Implement GitHub Action to auto-label issues with provider keywords (#13537)
* Add auto issue labelling for llm_translation

* Add logging

* make the formatting better

* make the formatting better

* make the formatting better

* make the formatting better
2025-08-12 21:18:20 -07:00
Ishaan Jaff eb4bd26f24 [Bug Fix] - Get Routes (#13466)
* fixes get_routes_for_mounted_app

* fix - use _safe_get_endpoint_name

* fix code QA check

* test_get_routes_for_mounted_app_with_static_files

* test fixes
2025-08-09 12:52:23 -07:00
Ishaan Jaff 3905cee579 test fixes 2025-08-08 18:50:09 -07:00
joshualipman123 9904dd8f55 only add/update vercel ai gateway models 2025-08-04 17:22:36 -07:00
joshualipman123 072c1c8109 Add cache pricing and max output tokens to vercel ai gateway data 2025-07-31 18:10:25 -07:00
joshualipman123 1ea28ccf67 Add Vercel AI Gateway provider support 2025-07-30 10:01:05 -07:00
Krish Dholakia 23d562b1a2 build(github/manual_pypi_publish.yml): manual workflow to publish pip package - used for pushing dev releases (#12985)
* build(github/manual_pypi_publish.yml): manual workflow to publish pip package - used for pushing dev releases

* ci: remove redundant file
2025-07-25 09:26:47 -07:00
Ishaan Jaff b8e404dd95 [Feat] Backend Router - Add Auto-Router powered by semantic-router (#12955)
* add router.json

* test_router_auto_router

* async_pre_routing_hook

* fixes for auto router

* add async_pre_routing_hook

* add LiteLLMRouterEncoder

* update test auto_router_embedding_model

* add auto_router_embedding_model

* add AutoRouter

* fix async_pre_routing_hook

* update async_pre_routing_hook

* fix auto router

* fix router.json

* working router init

* working embedding encoder

* working auto router

* test_router_auto_router

* test auto router

* add semantic-router as optional for litellm

* add extras

* semantic_router==0.1.10

* ruff fix

* use aiohttp==3.10.11

* python-dotenv==1.0.1

* test auto router

* test_router_auto_router

* semantic_router

* test_is_auto_router_deployment

* fix check

* fix docker build step

* add semantic_router

* Revert "add semantic_router"

This reverts commit 537b67288798731a119d811f643b682086377ee9.
2025-07-24 18:32:56 -07:00
Ishaan Jaff 46c950b17b [Bug Fix] Add swagger docs for LiteLLM /chat/completions, /embeddings, /responses (#12618)
* update ProxyChatCompletionRequest

* use custom OpenAPI schema

* use customize_openapi_schema

* add_llm_api_request_schema_body

* add embeddings and response spec

* fix add_llm_api_request_schema_body

* TestCustomOpenAPISpec

* fixes linting

* fix linting

* bump timeout
2025-07-15 13:37:22 -07:00
Andres Carrillo 9f7847feb1 feat: non-root docker hub push (#12413) 2025-07-11 08:34:32 -07:00
Krish Dholakia df49b24bc0 Azure - responses api bridge - respect responses/ + Gemini - generate content bridge - handle kwargs + litellm params containing stream (#12224)
* fix(main.py): handle router custom azure model name for responses api bridge

* fix(responses/handler): ensure azure model name is stripped before sending to provider

Fixes model name error

* fix(google_genai/main.py): handle stream=true being set in kwargs

* docs: cleanup icons from sidebar

* fix(test-litellm.yml): add google-genai to test litellmyml

* fix(main.py): strip 'responses/' from bridge

* fix(main.py): fix linting errors

* fix(types/openai.py): allow item to be none

handle azure streaming response

* fix(base.py): allow extra fields + handle azure item = none value in response output item added event

* fix(main.py): correctly handle removing responses/

* test(test_main.py): add unit tests
2025-07-02 13:53:52 -07:00
Cole McIntosh e91802da39 feat: add local LLM translation testing with artifact generation (#12120)
- Move from CircleCI dependency to direct pytest execution
- Add Python script to generate beautiful markdown reports
- Update GitHub workflow to run tests directly
- Update Makefile to use the new test runner script
- Generate both JUnit XML and markdown artifacts
- Group test results by provider with detailed statistics
2025-06-27 21:24:19 -07:00
Cole McIntosh c4f3cc6de2 Enhance CircleCI integration in LLM translation testing workflow. Updated commit SHA retrieval method, improved pipeline search logic, and refined artifact downloading process. Added checks for test workflows and job statuses, with placeholder results creation if no artifacts are found. Updated artifact upload step for clarity. 2025-06-26 10:06:30 -06:00
Cole McIntosh d5d0dfc26f Add GitHub Actions workflow for LLM translation testing artifacts 2025-06-26 10:05:33 -06:00