Commit Graph

966 Commits

Author SHA1 Message Date
Ishaan Jaffer 52294029a0 test_vertex_ai_gemini_2_5_pro_streaming 2026-02-21 16:59:22 -08:00
Ishaan Jaff d7b22d340b fix(tests): move test_router_azure_acompletion to llm_translation testing (#21837) 2026-02-21 14:41:53 -08:00
Ishaan Jaff c810f5cd63 fix(tests): replace fake France Azure endpoint in test_router_azure_acompletion (#21818) 2026-02-21 13:26:59 -08:00
Ishaan Jaff 1ed529092f fix(test): replace flaky test_vertex_ai_gemini_audio_ogg with mocked version (#21807)
Previously made a real Vertex AI call with a Wikimedia URL that intermittently
failed with URL_REJECTED-REJECTED_FC_TIMEOUT.

Now mocks HTTPHandler.post and VertexBase._ensure_access_token so the test
verifies the translation (OGG -> file_data with audio/ogg mime_type) without
any real network calls. Runs in ~0.36s instead of ~60s.
2026-02-21 12:49:06 -08:00
Ishaan Jaff a0e76f4f25 fix(tests): mock httpx in RPM limit pass-through tests (#21793)
* fix(tests): isolate flaky files endpoint tests from global proxy state

* test(secret_managers): add mocked unit test for write/read JSON secret cycle

* fix(tests): mock httpx in rpm limit pass-through tests to avoid real Cohere API calls
2026-02-21 11:55:48 -08:00
Ishaan Jaff a5e886de79 fix(tests): read CI_CD_DEFAULT_ANTHROPIC_MODEL env var instead of hardcoding model (#21781)
* fix(tests): read CI_CD_DEFAULT_ANTHROPIC_MODEL env var in bedrock KB tests

* fix(tests): read CI_CD_DEFAULT_ANTHROPIC_MODEL env var in test_router

* fix(tests): read CI_CD_DEFAULT_ANTHROPIC_MODEL env var in test_router_retries

* fix(tests): read CI_CD_DEFAULT_ANTHROPIC_MODEL env var in test_router_timeout
2026-02-21 10:46:49 -08:00
Harshit Jain f3ff9bf54f Merge pull request #21009 from BerriAI/litellm_docker-count-no-req
add tests for hotpath & docker container
2026-02-21 20:57:28 +05:30
Sameer Kankute 4d6b7699cc Fix sonnet 3.7 tests 2026-02-20 17:29:16 -08:00
Sameer Kankute adb91d442a Fix: test_pass_through_endpoint_bing 2026-02-20 17:28:17 -08:00
Sameer Kankute 36fd14357c FIx: replace deprecated claude-3-7-sonnet-20250219 with claude-4-sonnet-20250514 2026-02-20 17:27:59 -08:00
yuneng-jiang 65dc7556a8 [Fix] Fix web search model info regression, deprecated prompt caching model, undocumented env keys
- Revert test_anthropic_web_search_in_model_info to use claude-3-5-haiku-latest
  (model info test doesn't make API calls, so the -latest alias is fine here)
- Replace claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in
  test_anthropic_prompt_caching.py (10 instances)
- Include pending doc updates for COMPETITOR_LLM_TEMPERATURE and
  MAX_COMPETITOR_NAMES env vars in config_settings.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:26:58 -08:00
yuneng-jiang c27b65d09e [Fix] Replace deprecated claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in test_completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:26:02 -08:00
Julio Quinteros Pro 1dc3f1e530 fix(tests): skip remaining real prisma DB tests in CI and related test suites
Add @pytest.mark.skip to all test functions that use the real `prisma_client`
fixture (requiring an external PostgreSQL connection) across 7 test files.

Files updated:
- tests/proxy_unit_tests/test_proxy_server.py (5 tests)
- tests/proxy_admin_ui_tests/test_key_management.py (11 tests)
- tests/proxy_admin_ui_tests/test_role_based_access.py (5 tests)
- tests/proxy_admin_ui_tests/test_usage_endpoints.py (3 tests)
- tests/local_testing/test_blocked_user_list.py (2 tests)
- tests/local_testing/test_add_update_models.py (1 test)
- tests/local_testing/test_update_spend.py (1 test)

Total: 28 new skip markers added.

Note: tests using mock_prisma_client (properly mocked) are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 13:25:42 -03:00
Harshit Jain 19c8f78c2f fix: update docker test file to right path 2026-02-19 18:44:28 +05:30
Ishaan Jaff 323aed7211 fix: CI failures - missing env key doc + streaming test (#21510)
* docs: add DATABRICKS_API_KEY to environment settings reference

* fix: streaming test usage check on Pydantic model

* fix: mock litellm.proxy.proxy_server in test_skip_server_startup
2026-02-18 18:20:32 -08:00
Ishaan Jaffer 3987198fca test_partner_models_httpx_streaming 2026-02-14 12:41:35 -08:00
Ishaan Jaffer e373da6653 test_partner_models_httpx_streaming 2026-02-14 12:09:18 -08:00
Ishaan Jaffer e5bbafba62 test_completion_openrouter_reasoning_effort 2026-02-14 12:04:05 -08:00
yuneng-jiang c41459c8e3 fixing mistral model deprecation, cloud zero transform bug 2026-02-12 17:53:04 -08:00
pb 713d3022ae fix(scheduler): remove orphan entries from queue - causing memory leak. (#20866)
* fix(scheduler): remove timed-out requests from queue to prevent memory leak

Fixes #20059

* fix(scheduler): use actual model param instead of hardcoded gpt-3.5-turbo in schedule_acompletion

* trigger CLA recheck

---------

Co-authored-by: Piyush Bhawsar <piyush100x@Piyushs-MacBook-Pro-3.local>
2026-02-10 22:34:52 -08:00
Alexsander Hamir ebce0e5f8c [Release - 02/10/2026] v1.81.10-nightly 2026-02-10 16:26:30 -08:00
Sameer Kankute bffd7956a6 Merge pull request #19132 from BerriAI/litellm_gemini_schema_fix
fix: Preserved nullable object fields by carrying schema properties
2026-02-10 15:28:18 +05:30
shin-bot-litellm 537f7af583 fix(test): update deprecated gemini embedding model (#20621)
Replace text-embedding-004 with gemini-embedding-001.

The old model was deprecated and returns 404:
'models/text-embedding-004 is not found for API version v1beta'

Co-authored-by: Shin <shin@openclaw.ai>
2026-02-06 18:35:40 -08:00
Ishaan Jaff 887a907e42 [Fix] Guardrails API - Ensure OpenAI Moderations Guard works with OpenAI Embeddings (#20523)
* init OpenAIEmbeddingsHandler

* init apply_guardrail

* use apply guardrails for OpenAI moderations

* test_embeddings_handler_string_input

* test_openai_moderation_guardrail_apply_guardrail

* fix typing

* test_openai_moderation_responses_api_input_field

* test fixes
2026-02-05 14:40:15 -08:00
Sameer Kankute f1df5ea9a9 Merge pull request #20252 from BerriAI/main
merge main
2026-02-02 14:54:50 +05:30
shin-bot-litellm db120c524b fix(test): accept both AuthenticationError and InternalServerError in batch_completion test (#20186)
The test uses an invalid API key to verify that batch_completion returns
exceptions rather than raising them. However, depending on network conditions,
the error may be:
- AuthenticationError: API properly rejected the invalid key
- InternalServerError: Connection error occurred before API could respond

Both are valid outcomes for this test case.

Co-authored-by: shin-bot-litellm <shin-bot-litellm@users.noreply.github.com>
2026-01-31 13:36:27 -08:00
shin-bot-litellm fea40925cf test: remove hosted_vllm from OpenAI client tests (#20163)
hosted_vllm no longer uses the OpenAI client, so these tests
that mock the OpenAI client are not applicable to hosted_vllm.

Removes hosted_vllm from:
- test_openai_compatible_custom_api_base
- test_openai_compatible_custom_api_video
2026-01-31 10:10:45 -08:00
Sameer Kankute 5ac3f75996 Add disable flahg for anthropic gemini cache translation 2026-01-30 14:58:10 +05:30
Sameer Kankute df072979e5 Merge branch 'main' into litellm_oss_staging_01_28_2026 2026-01-29 17:39:42 +05:30
Alexsander Hamir 69bd4426e8 [Release Day] - Fixed CI/CD issues & changed processes (#19902) 2026-01-28 17:57:24 -08:00
Brian Caswell 920ef665a3 inspect BadRequestError after all other policy types (#19878)
As indicated by https://docs.litellm.ai/docs/exception_mapping,
BadRequestError is used as the base type for multiple exceptions.  As
such, it should be tested last in handling retry policies.

This updates the integration test that validates retry policies work as
expected.

Fixes #19876
2026-01-27 18:15:04 -08:00
michelligabriele 8c4ccdc313 test(proxy): add regression tests for vertex passthrough model names with slashes (#19855)
Added test cases for custom model names containing slashes in Vertex AI
passthrough URLs (e.g., gcp/google/gemini-2.5-flash).

Test cases:
- gcp/google/gemini-2.5-flash
- gcp/google/gemini-3-flash-preview
- custom/model
2026-01-27 17:34:40 -08:00
Sameer Kankute 9883c2fd64 Fix: timeout exception raised eror 2026-01-27 12:32:37 +05:30
Ishaan Jaffer f2fd54ffcf test fixes 2026-01-24 14:27:56 -08:00
Ishaan Jaffer 489c986cac test_hanging_request_azure 2026-01-24 13:14:48 -08:00
Ishaan Jaffer 6587cd228b test_partner_models_httpx_streaming 2026-01-24 10:58:35 -08:00
yuneng-jiang 86676142c9 Fixing failing tests 2026-01-23 22:33:00 -08:00
yuneng-jiang fbe5ae9e17 fixing flaky tests 2026-01-23 12:20:27 -08:00
yuneng-jiang 8b5b343841 attempt fix flaky tests 2026-01-23 12:10:08 -08:00
Sameer Kankute 12463809bd Merge pull request #19638 from BerriAI/main
merge main in stagin 1 22 26
2026-01-23 14:54:17 +05:30
Alexsander Hamir 57d777bc69 Fix unsafe access to request attribute (#19573) 2026-01-22 10:58:29 -08:00
Sameer Kankute b729622bf5 Fix: generationConfig removal from tests 2026-01-22 19:00:37 +05:30
Emerson Gomes c8669cf8fa Fix Azure RPM calculation formula (#19513)
* Fix Azure RPM calculation formula

* updated test
2026-01-21 21:03:23 -08:00
Sameer Kankute aeb38ffa9b Merge pull request #19497 from BerriAI/main
merge main
2026-01-21 18:43:27 +05:30
Sameer Kankute a5ea08a0bf Fix test_default_api_base failing because of chatgpt as provider 2026-01-21 09:32:38 +05:30
Sameer Kankute 0b9f6b543f Fixes test_aaabasic_gcs_logger 2026-01-21 08:58:16 +05:30
Sameer Kankute 9e1275b76c Merge branch 'main' into litellm_staging_01_19_2026 2026-01-20 19:19:36 +05:30
Sameer Kankute cd96c8cbb0 Fix:test_aaaaazure_tenant_id_auth 2026-01-20 17:39:08 +05:30
Sameer Kankute a4bfdf2427 Fix: total timeout is not respected 2026-01-20 09:37:43 +05:30
Emerson Gomes 13d887a275 Fix queue persistence to Redis (#19304)
* Fix queue persistence to Redis

* add test
2026-01-19 19:01:34 -08:00