Commit graph

32339 commits

Author SHA1 Message Date
Harshit28j
6fce7415bd Fix Langfuse failure path kwargs and add session_id trace tests
Fix: The Langfuse failure logging path was passing self.model_call_details
(which includes original_response, potentially a coroutine) instead of the
clean local kwargs copy. This aligns the failure path with the success path
behavior (litellm_logging.py:2956).

Reverted the session_id-as-trace_id approach as it causes trace collisions
in Langfuse (multiple calls in the same session would overwrite each other).
Instead, session_id is correctly used only for Langfuse session grouping via
trace_params["session_id"], while each call retains its own unique trace_id.

Added 4 tests:
- session_id correctly passed as trace session_id (not trace_id)
- session_id preserved for ERROR level (failure) logs
- explicit trace_id takes priority over session_id
- failure path kwargs excludes original_response

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:45:39 +05:30
Harshit28j
6068b9dfd0 Fix Langfuse trace_id mapping for failed logs and prioritize session_id
This fix addresses Bug 1 where failed LiteLLM logs were using request_id instead of session_id for Langfuse trace mapping, breaking trace correlation.

Changes:
1. Fix kwargs inconsistency in failure path (litellm_logging.py:2956)
   - Changed from passing self.model_call_details to passing local kwargs variable
   - Matches success path behavior and excludes original_response (potentially a coroutine)

2. Prioritize session_id as trace_id fallback (langfuse.py:607-615)
   - When no explicit trace_id is provided, now uses session_id from metadata
   - This ensures traces with the same session_id are grouped together in Langfuse
   - Maintains backward compatibility: only activates when session_id is set

Testing:
- All 28 existing Langfuse tests pass (excluding pre-existing test_langfuse_e2e_sync which fails due to missing API key)
- Specifically verified trace_id resolution tests still pass

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-12 14:45:39 +05:30
Ishaan Jaffer
ba0d541b19 Revert "Revert "fix(http_handler): bypass cache when shared_session is provided for aiohttp tracing (#20630)""
This reverts commit 0b69c21eca.
2026-02-21 12:32:41 -08:00
yuneng-jiang
f9398eef80 Merge pull request #21237 from BerriAI/litellm_ui_access_groups
[Infra] UI - Unit Tests: Increase timeout on Long Running Tests
2026-02-14 18:19:47 -08:00
yuneng-jiang
81f2855434 Merge pull request #21235 from BerriAI/litellm_ui_access_groups
[Infra] Fixes + UI Build
2026-02-14 18:18:56 -08:00
Ishaan Jaffer
ff502e8b91 DEFAULT_ACCESS_GROUP_CACHE_TTL 2026-02-14 16:48:57 -08:00
Ishaan Jaffer
d24869c7ce docs fix 2026-02-14 16:47:01 -08:00
Ishaan Jaffer
9e7dde508f docs fix 2026-02-14 16:45:57 -08:00
Ishaan Jaff
eb432bf911
Litellm notes 181 12 (#21231)
* docs

* docs

* docs

* docs

* fix SCHEMA

* LiteLLM_PolicyTable

* litellm-proxy-extras = {version = "0.4.39",
2026-02-14 16:39:22 -08:00
yuneng-jiang
55f169aa69
Merge pull request #21190 from BerriAI/litellm_access_groups_inte
[Feature] Access Group Checks
2026-02-14 16:28:09 -08:00
yuneng-jiang
da5fbfe17c
Merge pull request #21230 from BerriAI/litellm_e2e_tab_tests
[Fix] UI - E2E Tests: Injecting localStorage Values to Hide Usage Indicator
2026-02-14 16:00:04 -08:00
yuneng-jiang
ff646c154d fixing linting 2026-02-14 15:58:42 -08:00
Ishaan Jaffer
62d3cab965 test fixes 2026-02-14 15:54:20 -08:00
yuneng-jiang
0d6fcee23e injecting localstorage values to hide usageIndicator, prompts, and new badges 2026-02-14 15:49:27 -08:00
Ishaan Jaffer
0b1a9f6623 litellm_mapped_tests_proxy_part2 2026-02-14 15:37:18 -08:00
Ishaan Jaffer
9ce7871d8a test_queue_flush_limit 2026-02-14 15:34:45 -08:00
Ishaan Jaffer
0d697e6c3e litellm_mapped_tests_mcps 2026-02-14 15:20:25 -08:00
Ishaan Jaffer
d5824d871c access_group_ids 2026-02-14 14:43:03 -08:00
yuneng-jiang
ee088992f5
Merge pull request #21224 from BerriAI/litellm_ui_gh_build
[Infra] New Github Workflow For UI Build on Every PR
2026-02-14 13:56:32 -08:00
yuneng-jiang
6e70e59346 adding timeout 2026-02-14 13:53:21 -08:00
yuneng-jiang
2c02a71ef4 addressing comments and build fail 2026-02-14 13:52:26 -08:00
yuneng-jiang
bb9049de44 add new ui build github workflow 2026-02-14 13:46:21 -08:00
Ishaan Jaffer
703bf5add0 BUMP Enterprise PIP 2026-02-14 13:40:48 -08:00
Ishaan Jaffer
ed06f04a67 bump: version 1.81.11 → 1.81.12 2026-02-14 13:29:12 -08:00
Ishaan Jaffer
80b080e00c code QA fx 2026-02-14 13:29:03 -08:00
yuneng-jiang
5cf91e573e Merge remote-tracking branch 'origin' into litellm_access_groups_inte 2026-02-14 13:27:36 -08:00
Ishaan Jaffer
bd766706c5 VertexAILlama3StreamingHandler 2026-02-14 13:18:26 -08:00
Ishaan Jaffer
55a78e564d test_anthropic_messages_with_all_beta_headers 2026-02-14 13:03:52 -08:00
Ishaan Jaffer
add3183308 IGNORE_FUNCTIONS 2026-02-14 12:59:15 -08:00
Ishaan Jaffer
b8f572fc39 test_responses_api_shell_tool_streaming_sees_shell_output 2026-02-14 12:55:44 -08:00
Ishaan Jaffer
3987198fca test_partner_models_httpx_streaming 2026-02-14 12:41:35 -08:00
Ishaan Jaffer
6a4b531057 def get_advanced_model_for_shell_tool(self) -> Optional[str]:
AZURE
2026-02-14 12:29:42 -08:00
Ishaan Jaffer
bab2bcad8c test_openai_codex_stream 2026-02-14 12:28:18 -08:00
Ishaan Jaffer
582fbf9040 test_anthropic_custom_headers 2026-02-14 12:22:14 -08:00
Ishaan Jaffer
ec7eb79634 ANTHROPIC_API_KEY 2026-02-14 12:20:55 -08:00
Ishaan Jaffer
ad72d162cd avector_store_create 2026-02-14 12:16:33 -08:00
Krish Dholakia
fa0b26c611
ci/cd fixes (#21218)
* fix: add a2a-sdk to dev deps

* fix: fix test

* fix: update poetry lock

* test: cleanup bad/hanging tests
2026-02-14 12:11:53 -08:00
Ishaan Jaffer
e373da6653 test_partner_models_httpx_streaming 2026-02-14 12:09:18 -08:00
Alexsander Hamir
7944b67842
Fix CI/CD pyroscope test failure (#21219) 2026-02-14 12:07:20 -08:00
Ishaan Jaffer
e5bbafba62 test_completion_openrouter_reasoning_effort 2026-02-14 12:04:05 -08:00
Ishaan Jaffer
ff9fbe7fe2 test_other_constraints_preserved 2026-02-14 12:00:48 -08:00
Krish Dholakia
644f66a7d3
Agent Guardrails - on streaming output (#21206)
* fix(ui/): add mcp input as an example for custom code guardrails

* feat(a2a/): ensure a2a guardrails works on response output

* feat(a2a/): support streaming guardrails

* fix(ui/): add mcp input as an example for custom code guardrails
2026-02-14 11:36:52 -08:00
Ishaan Jaffer
977d1f90d2 test fixes 2026-02-14 11:33:45 -08:00
Ishaan Jaffer
77dd3cb2b2 test_responses_api_shell_tool_streaming_sees_shell_output 2026-02-14 11:32:52 -08:00
Ishaan Jaffer
1730008657 claude-sonnet-4-5-20250929 2026-02-14 11:28:45 -08:00
Ishaan Jaffer
966541a999 scaleway fix 2026-02-14 11:26:11 -08:00
mubashir1osmani
4727aa41fc
fix(langfuse_otel): prevent empty proxy request spans from being sent to Langfuse
fix(langfuse_otel): prevent empty proxy request spans from being sent to Langfuse
2026-02-14 14:22:32 -05:00
jquinter
a15a2fa77c
Merge pull request #21212 from BerriAI/fix/jwt-email-domain-validation-error
Fix: JWT email domain validation error message
2026-02-14 16:20:08 -03:00
Ishaan Jaffer
ad910de1e3 test_o1_parallel_tool_calls 2026-02-14 10:47:38 -08:00
Julio Quinteros Pro
90d61432cf Fix LiteLLM_JWTAuth annotations access bug
The __init__ method was trying to access self.__annotations__ before
super().__init__() was called, resulting in an empty annotations dict.

Changed to use the class annotations directly: LiteLLM_JWTAuth.__annotations__
instead of self.__annotations__.

This fixes the ValueError:
"Invalid arguments provided: user_email_jwt_field, user_id_upsert,
user_allowed_email_domain. Allowed arguments are: ."

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 15:44:02 -03:00