Commit Graph
28351 Commits
Author SHA1 Message Date
yuneng-jiang 40ad0e2e96 Customer Usage Docs 2025-12-06 13:17:54 -08:00
yuneng-jiangandGitHub 6de0ffbf04 Merge pull request #17609 from BerriAI/litellm_ui_mcp_fix
[Fix] UI - MCP Test Tool Fix
2025-12-06 11:30:34 -08:00
yuneng-jiang 19cacaaed5 UI MCP Test Tool Fix 2025-12-06 11:18:48 -08:00
Ishaan Jaffer 6bb4087b22 docs fix 2025-12-06 11:09:46 -08:00
Alexsander HamirandGitHub c44e075b2d feat: add script to create branches with litellm_ prefix (#17606)
Add utility scripts to create branches with litellm_ prefix from contributor branches.
This helps maintain consistent branch naming conventions for CI/CD.

- scripts/create_litellm_branch.sh (Bash for macOS/Linux)
- scripts/create_litellm_branch.ps1 (PowerShell for Windows)

Usage:
  ./scripts/create_litellm_branch.sh [source_branch] [new_branch_name]
  ./scripts/create_litellm_branch.ps1 [source_branch] [new_branch_name]

Features:
- Auto-prefixes branch names with litellm_
- Handles existing branches gracefully
- Validates branch names
- Supports local and remote source branches
2025-12-06 10:41:39 -08:00
Ishaan JaffandGitHub a9b654224e 1.80.8 RC docs (#17605)
* stash docs

* docs fix

* doc fix

* docs fix
2025-12-06 10:40:00 -08:00
Ishaan Jaffer edcfc13ebb bump: version 1.80.7 → 1.80.8 2025-12-06 10:18:23 -08:00
Ishaan Jaffer bfdcfca8b0 fix test 2025-12-06 10:15:00 -08:00
Ishaan Jaffer 8f98725503 fix mypy linting 2025-12-06 10:09:30 -08:00
Ishaan Jaffer bcf601b8a6 bump proxy extras pip 2025-12-06 10:00:22 -08:00
Ishaan Jaffer 71ea926f9a test_no_duplicate_spend_logs 2025-12-06 09:56:05 -08:00
ca7241188a feat: Add xhigh reasoning effort for gpt-5.1-codex-max (#17585)
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-12-06 09:48:18 -08:00
Cesar GarciaandGitHub 0f1d6c37d2 docs: add gpt-5.1-codex-max to OpenAI provider documentation (#17602)
Add gpt-5.1-codex-max model to:
- Model list table
- Reasoning effort table
- Verbosity note
2025-12-06 09:46:48 -08:00
Ishaan Jaffer 6358be3d0b fix build from PIP 2025-12-06 09:44:09 -08:00
Alexsander HamirandGitHub 09dcd381d7 fix: mark test_caching_with_reasoning_content as flaky and handle InternalServerError (#17603)
- Add @pytest.mark.flaky(retries=3, delay=1) decorator to handle intermittent Anthropic API failures
- Add error handling to skip test when Anthropic API returns InternalServerError
- Prevents false test failures due to external API 500 errors
2025-12-06 09:41:09 -08:00
Krrish Dholakia 497856e1e3 docs: document multi tenant architecture 2025-12-06 09:27:30 -08:00
Alexsander HamirandGitHub 8172f6cdd6 Fix security vulnerability: update mdast-util-to-hast to 13.2.1 (CVE-2025-66400) (#17601) 2025-12-06 09:26:26 -08:00
yuneng-jiangandGitHub 03706e4841 Merge pull request #17600 from BerriAI/litellm_ui_build_3
[Infra] Building UI for release
2025-12-06 09:22:38 -08:00
Alexsander HamirandGitHub 1254a92e66 fix: make test_log_langfuse_v2_handles_null_usage_values more robust (#17599)
- Reset mock call counts at start of test to ensure clean state
- Add span method to mock trace to handle log_provider_specific_information_as_span calls
- Re-establish mock chain before test call to ensure fresh state
- Add exception handling to catch and report errors during test execution
- Add verification that trace was called before checking generation

This should fix the flaky test that was failing intermittently with
'Expected generation to have been called once. Called 0 times.'
2025-12-06 09:21:00 -08:00
yuneng-jiang 0917f72bbd Building UI for release 2025-12-06 09:18:20 -08:00
yuneng-jiangandGitHub fe23eee079 Merge pull request #17598 from BerriAI/litellm_ui_customer_usage_banner
[Feature] UI - Add Info Banner for Customer Usage
2025-12-06 09:04:39 -08:00
yuneng-jiang fa47861ca0 Add banner for customer usage 2025-12-06 08:57:15 -08:00
Alexsander HamirandGitHub 53e2516ace fix: make test_watsonx_gpt_oss_prompt_transformation deterministic (#17597)
- Remove network dependency by mocking HuggingFace template fetch
- Use mock template that produces correct format for test validation
- Test now focuses on transformation logic, not network calls
- Fixes flaky test failures due to network timeouts/rate limits

The test verifies that prompt transformation occurs (not simple
concatenation), which doesn't require the actual HuggingFace template.
Mocking makes the test deterministic and faster while still validating
the core behavior.
2025-12-06 08:48:39 -08:00
Alexsander HamirandGitHub db40a38999 Add retry logic to apk package installation in Dockerfile.non_root (#17596)
- Add retry loop (3 attempts with 5s delay) to builder stage apk add command
- Add retry logic to runtime stage apk upgrade and apk add commands
- Improves resilience to transient network errors during package downloads
2025-12-06 08:17:50 -08:00
Alexsander HamirandGitHub 73075c7d24 fix: add retry logic for flaky Azure image generation health check test (#17595)
- Add missing @pytest.mark.asyncio decorator
- Implement retry logic with exponential backoff (3 retries)
- Only retry on transient Azure internal server errors
- Fail immediately on non-transient errors

This fixes the flaky test_azure_img_gen_health_check which was failing
due to transient Azure internal server errors that are outside our control.
2025-12-06 08:11:52 -08:00
Alexsander HamirandGitHub 1e89aa3068 Fix: Resolve flakiness in three integration tests (#17594)
Fixed three flaky tests that were intermittently failing in CI:

1. test_no_duplicate_spend_logs (test_litellm/responses/test_no_duplicate_spend_logs.py)
   Problem: Used await asyncio.sleep(1) to wait for async logging completion,
            which created race conditions. The async logging worker queues tasks
            in the background, and sleep() doesn't guarantee completion.

   Fix: Replaced sleep() with GLOBAL_LOGGING_WORKER.flush() which properly waits
        for the logging queue to empty, ensuring all async logging tasks complete
        before assertions run.

2. test_log_langfuse_v2_handles_null_usage_values (test_litellm/integrations/test_langfuse.py)
   Problem: Used datetime.datetime.now() twice for start_time and end_time, which
            could cause timing inconsistencies between test runs, especially in
            CI environments with variable execution speeds.

   Fix: Use fixed timestamps instead of datetime.now() to ensure consistent timing
        across all test runs, eliminating timing-related flakiness.

3. test_watsonx_gpt_oss_prompt_transformation (test_litellm/llms/watsonx/test_watsonx.py)
   Problem: Directly accessed mock_post.call_args without checking if it exists,
            which could be None if the mock wasn't called or if an exception
            occurred before the POST request. The test catches exceptions and
            continues, making this a potential failure point.

   Fix: Added proper assertions and use call_args_list[0] for safer access:
        - Assert that call_args_list has at least one call
        - Assert that call_args is not None
        - Assert that 'data' key exists in kwargs
        This ensures the test fails with clear error messages rather than
        intermittent AttributeError exceptions.

All fixes maintain the original test intent while making them deterministic
and reliable in CI environments.
2025-12-06 07:57:03 -08:00
Alexsander HamirandGitHub 99ab9fd145 Fix: Ensure guardrail metadata is preserved in request_data (#17593)
Fixed bug in add_guardrail_to_applied_guardrails_header where guardrail
information was lost when request_data didn't have a metadata key. The
function would create a new metadata dict but never assign it back to
request_data, causing the x-litellm-applied-guardrails header to be
missing from responses.

This fixes the failing test_guardrails_with_api_key_controls test.
2025-12-06 07:50:15 -08:00
Alexsander HamirandGitHub 00a9f99718 Fix flaky test: test_logging_non_streaming_request (#17592)
- Filter async_log_success_event calls by expected input message
- Bridge models (openai/codex-mini-latest) may make internal calls that also log
- Test now asserts exactly one call with the expected input 'Hey' instead of asserting total call count
- Makes test robust to bridge-related double logging while still validating core behavior
2025-12-06 07:40:23 -08:00
Alexsander HamirandGitHub 3db6d2a1ed Reapply Langfuse logger test mock setup fix (#17591)
Reapplies the fix from commit a885e21543 that was
reverted in 6c9556be67.

The original revert was done because the test was flaky and giving false
negatives. This fix properly mocks the Langfuse client to ensure the test
can correctly verify that _log_langfuse_v2 converts None usage values to 0.

Changes:
- Add mock_langfuse_client.client attribute to prevent errors during init
- Add trace_id to mock_langfuse_generation for proper return value handling
- Remove redundant mock setup code
- Explicitly set logger.Langfuse to mock client after initialization
- Set logger.langfuse_sdk_version to ensure _supports_* methods work correctly
2025-12-06 07:26:34 -08:00
Alexsander HamirandGitHub 6c9556be67 Revert "Fix Langfuse logger test mock setup (#17588)" (#17590)
This reverts commit a885e21543.
2025-12-06 06:25:47 -08:00
Alexsander HamirandGitHub 998b27c655 fix: preserve usage from JSON response for OpenAI provider in Bedrock (#17589)
- Skip usage recalculation if usage was already set from response JSON
- Fixes test_bedrock_openai_response_parsing which expected usage values from JSON response
- Prevents overwriting correct usage values with token counting for OpenAI imported models
2025-12-06 06:17:46 -08:00
Alexsander HamirandGitHub a885e21543 Fix Langfuse logger test mock setup (#17588)
* Fix test_log_langfuse_v2_handles_null_usage_values test failure

The test was failing because the logger's Langfuse client wasn't properly
mocked. Even though sys.modules was mocked, the logger's __init__ method
creates its own Langfuse client instance that wasn't using the test's mock.

Changes:
- Explicitly set logger.Langfuse to the mock client after initialization
- Set logger.langfuse_sdk_version to ensure _supports_* methods work correctly
- Added mock_langfuse_client.client attribute to prevent errors during init
- Added trace_id to mock_langfuse_generation for proper return value handling
- Removed redundant mock setup code

This ensures the test can properly verify that _log_langfuse_v2 correctly
converts None usage values to 0 by allowing the mock's generation method
to be called and asserted.

Fixes: AssertionError: Expected 'generation' to have been called once. Called 0 times.
2025-12-06 05:56:24 -08:00
Alexsander HamirandGitHub 415a8ab9a6 Fix: remove merge markdown (#17586) 2025-12-06 05:38:16 -08:00
yuneng-jiangandGitHub 2dd2f84b86 Merge pull request #17553 from BerriAI/litellm_ui_use_auth_new_login
[Fix] Change useAuthorized Hook to redirect to new Login Page
2025-12-05 21:06:07 -08:00
yuneng-jiangandGitHub 60bbe323f7 Merge pull request #17569 from BerriAI/litellm_ui_flaky_test_2
[Fix] Flaky UI Test
2025-12-05 21:03:51 -08:00
Ishaan Jaffer 8b499adba6 Revert "Add license metadata to health/readiness endpoint. (#15997)"
This reverts commit d89990e0c5.
2025-12-05 19:31:30 -08:00
YutaSaitoandGitHub 12850969fb Merge pull request #17570 from BerriAI/litellm_fix_mcp_test 2025-12-06 11:24:35 +09:00
yuneng-jiang 1f2bf08136 Fix flaky ui test 2025-12-05 17:55:07 -08:00
Yuta Saito 21a18128ec fix: mcp test 2025-12-06 10:54:22 +09:00
Ishaan Jaffer ce4b5daf70 ollama fix 2025-12-05 17:25:55 -08:00
Ishaan Jaffer f0a93fb9b9 test_string_cost_values_edge_cases 2025-12-05 17:25:55 -08:00
yuneng-jiangandGitHub fdb49c97f2 Merge pull request #17562 from BerriAI/litellm_ui_compare_images
[Feature] Support Images in Compare UI
2025-12-05 17:24:05 -08:00
Ishaan Jaffer 96e4c9e078 fix _update_metadata_with_tags_in_header 2025-12-05 17:20:14 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
83291d394e build(deps): bump mdast-util-to-hast in /ui/litellm-dashboard (#17444)
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-05 17:12:51 -08:00
Ishaan Jaffer eaa7e61f57 test fixes 2025-12-05 17:12:01 -08:00
Ishaan Jaffer 58f8be60a1 fix REDIS_DAILY_END_USER_SPEND_UPDATE_QUEUE 2025-12-05 17:07:09 -08:00
yuneng-jiangandGitHub 82376d8b76 Merge pull request #17564 from BerriAI/litellm_end_user_spend_redis_test
[Fix] CI/CD - Adding end user and org to service types
2025-12-05 16:44:37 -08:00
yuneng-jiang 86baa9e5fb Adding end user and org to service types 2025-12-05 16:38:09 -08:00
yuneng-jiangandGitHub 8e74a3b692 Merge pull request #17563 from BerriAI/litellm_v2_login_test_fix
[Fix] Mock server_root_path for v2/login test
2025-12-05 16:23:51 -08:00
yuneng-jiangandGitHub df8b0e8389 Merge pull request #17506 from BerriAI/litellm_ui_customer_usage
[Feature] Customer Usage UI
2025-12-05 16:18:42 -08:00