Commit graph

35825 commits

Author SHA1 Message Date
yuneng-jiang
b75266d254 merge origin/main, resolve test file conflicts
Resolved conflicts in ScoreChart.test.tsx and HelpLink.test.tsx by
preferring origin/main's renderWithProviders pattern and merging
unique tests from both branches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:57:31 -07:00
Krish Dholakia
af8363a77f
Merge pull request #24023 from Arindam200/v0-docs
docs: Revamp documentation site with new navigation, landing pages, and styling
2026-03-18 12:52:59 -07:00
yuneng-jiang
bbc120095e address greptile review feedback (greploop iteration 3)
- Remove Ant Design CSS class selector coupling in ExportFormatSelector test
- Lift mock fns out of TestTable component body to enable callback assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:48:01 -07:00
yuneng-jiang
56ed8379e2 address greptile review feedback (greploop iteration 2)
- Add explicit vi import to ScoreChart.test.tsx
- Use custom matcher for I/O modes to avoid cross-element text issues
- Use version-agnostic regex for Save button assertion
- Add comments noting placeholder data in GuardrailConfig tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:42:19 -07:00
yuneng-jiang
7714d1be0b address greptile review feedback (greploop iteration 3)
Add typeof string guards to all array element returns in resolveMode
to prevent non-string values from sneaking through via any-widening.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:40:56 -07:00
yuneng-jiang
6902355f5b address greptile review feedback (greploop iteration 2)
Replace unsafe `as string[]` cast in modeMatches with runtime type
check via `.some()`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:34:03 -07:00
yuneng-jiang
40721ab18f address greptile review feedback (greploop iteration 1)
- Move vi.useRealTimers() to afterEach for proper cleanup
- Use label-based DOM queries instead of fragile positional indexes
- Remove leftover debug console.log from AgentHubTableColumns.tsx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:31:25 -07:00
yuneng-jiang
1c8b5f77c9 address greptile review feedback (greploop iteration 1)
Add modeMatches() helper so array guardrail_mode values (e.g.
["pre_call", "post_call"]) place the entry in all matching timeline
buckets, not just the first. Updated test to verify both buckets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:29:57 -07:00
Arindam200
4da2730607 Refactor TOC component to use Docusaurus Link for navigation 2026-03-19 00:59:56 +05:30
yuneng-jiang
20c1d984a6 [Test] UI: Add unit tests for 10 previously untested components
Add Vitest + RTL tests covering DebugWarningBanner, HelpLink, ExportFormatSelector, ExportSummary, ExportTypeSelector, UsageExportHeader, MetricCard, ScoreChart, GuardrailConfig, and AgentHubTableColumns. 73 tests total.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:18:42 -07:00
yuneng-jiang
b13a7c6790 Fix guardrail_mode.replace crash when backend returns non-string value
The backend type for guardrail_mode is Optional[Union[str, List[str], Dict]]
but the UI typed it as just string, causing a crash when .replace() was
called on null/object/array values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:17:19 -07:00
yuneng-jiang
441f768abd Merge remote-tracking branch 'origin' into litellm_yj_march_17_2026 2026-03-18 12:07:50 -07:00
yuneng-jiang
dcc0c70936 [Refactor] Extract _convert_teams_to_response_models to fix PLR0915
list_team_v2 had 51 statements (limit 50). Extract the team-to-response-model
conversion loop into a helper function to satisfy ruff PLR0915.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:59:44 -07:00
Krish Dholakia
244bdffd1b
Merge pull request #23509 from michelligabriele/fix/pass-through-duplicate-failure-logs
fix(proxy): prevent duplicate callback logs for pass-through endpoint failures
2026-03-18 11:57:50 -07:00
Arindam200
6d12161627 Enhance navigation and sorting functionality in Docusaurus config 2026-03-18 21:45:43 +05:30
Arindam200
06901143aa Update release notes section 2026-03-18 21:25:08 +05:30
Krish Dholakia
0d7425a437
Merge pull request #23774 from michelligabriele/fix/model-level-guardrails-non-streaming-postcall
fix(proxy): model-level guardrails not executing for non-streaming post_call
2026-03-18 08:26:02 -07:00
Arindam200
9ad52b1bf3 update: authors image url & linkedin url 2026-03-18 20:42:29 +05:30
Arindam Majumder
643bfdd042
Update docs/my-website/docs/proxy/docker_quick_start.md
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-18 20:36:56 +05:30
Arindam200
4bedb6439e update sidebar 2026-03-18 20:13:56 +05:30
Arindam200
ca71028798 merge: update sidebars for mcp docs
Made-with: Cursor
2026-03-18 20:05:07 +05:30
Arindam200
40c7873166 chore(docs): add mcp_zero_trust sidebar entry
Made-with: Cursor
2026-03-18 20:04:41 +05:30
Krish Dholakia
b4a5e51668
Merge pull request #23820 from joereyna/release-notes/v1.82.3-v2 2026-03-18 07:10:24 -07:00
Alexandros Solanos
3759d1c82f
Merge branch 'main' into improve-llm-repeated-message-detection-performance 2026-03-18 12:55:36 +01:00
Mr. Ånand
76c8b388f6
Merge pull request #5 from Astrodevil/v0-docs
docs: Learn page updates, card links, integrations, sidebar changes
2026-03-18 17:20:31 +05:30
Mr. Ånand
143cd66fa0 docs: Learn page updates, card links, integrations, sidebar changes
- Remove Explore section from Learn page
- Common Tasks: Stream Responses → core_request_response_patterns, Use Tools → tools_integrations, Add Routing → routing-load-balancing
- Rename Router & Fallbacks card to Routing & Load Balancing on docs index
- Fix Agent & MCP Gateway cards, add letta to Agent SDKs sidebar
- Gateway quickstart: Make LLM Requests card first, rename from Connect SDKs
- Integrations: fix View all links (observability_integrations, guardrail_providers)
- SDK quickstart: remove Use Gateway card, keep When To Use Gateway section

Made-with: Cursor
2026-03-18 17:19:27 +05:30
Andrzej Pomirski
cf8d1ac521 fix: streaming container_id and consistent Pydantic types in output
- Populate container_id on streaming code_interpreter_results by
  re-emitting at message_delta when container info arrives
- Reconstruct Pydantic OutputCodeInterpreterCall objects from plain
  dicts in _extract_tool_result_output_items so responses_output
  has uniform types across streaming and non-streaming paths
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
d10007cef4 test: add non-bash skip test and mock end-to-end streaming integration test
- test_non_bash_tool_result_skipped: verifies text_editor results produce
  zero code_interpreter_call items
- test_end_to_end_streaming_chunks_to_code_interpreter_output: exercises
  full path from Anthropic SSE chunks through ModelResponseIterator,
  stream_chunk_builder, and _extract_tool_result_output_items without
  a live server
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
8f60117228 fix: guard code_interpreter conversion to bash_code_execution results only
Skip non-bash tool result types (e.g. text_editor_code_execution_tool_result)
to avoid producing empty code_interpreter_call items in Responses API output.
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
3962fbc33a fix: non-dict tool result content falls back to outputs=None
Replace str(content) fallback with empty string so non-dict content
(e.g. list-shaped text_editor results) produces outputs=None instead
of raw Python object representations in logs.
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
5b3e84f383 fix: address remaining review feedback
- Empty stdout/stderr now produces outputs=None (matching OpenAI parity)
  instead of outputs=[{logs:""}], in both streaming and non-streaming paths
- Fix test fixture to use real Anthropic type "bash_code_execution_tool_result"
  instead of "code_execution_tool_result"
- Add test for empty-output → outputs=None behavior
- Add unit tests for _extract_tool_result_output_items: Pydantic objects,
  plain dicts (post-model_dump), empty/missing provider_specific_fields,
  and in-place substitution preserving output ordering
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
4be1d76fd7 fix: empty stdout/stderr produces str(content) instead of empty logs
When both stdout and stderr are empty strings, the `if parts else
str(content)` fallback produced the raw dict representation as logs.
Drop the fallback so logs is correctly empty.
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
2bf8751f6b fix: streaming code_interpreter_results dropped for multiple code executions
stream_chunk_builder uses "last value wins" for list-valued
provider_specific_fields keys. _build_code_interpreter_results was
emitting only new items (incremental), so earlier results were silently
dropped when multiple sequential code executions occurred.

- Emit cumulative list from _build_code_interpreter_results, matching
  web_search_results pattern
- Assemble server_tool_use input from input_json_delta deltas at
  content_block_stop (Anthropic streams input: {} in start block)
- Handle dict items in _extract_tool_result_output_items after
  model_dump() serialization in stream_chunk_builder
- Simplify _merge_provider_specific_fields to last-value-wins for lists,
  matching stream_chunk_builder semantics
2026-03-18 12:37:13 +01:00
Andrzej Pomirski
92b89353ae fix: surface Anthropic code execution results as code_interpreter_call in Responses API
PR #18945 added support for capturing Anthropic server-side tool results
(bash_code_execution_tool_result, etc.) in provider_specific_fields, but
the data never reached the Responses API output because:

1. Non-streaming: provider_specific_fields wasn't copied into _hidden_params
2. Streaming: chunk delta's provider_specific_fields wasn't accumulated
3. Tool results weren't mapped to standard output items

This fix:
- Copies provider_specific_fields to _hidden_params in transform_response()
- Accumulates provider_specific_fields from streaming chunk deltas
- Maps bash_code_execution_tool_result to code_interpreter_call output items
  with code and outputs (matching OpenAI's native shape)
- Removes redundant function_call items for server-side tools
- Adds OutputCodeInterpreterCall type to the output union
2026-03-18 12:37:13 +01:00
Cursor Agent
3f7f23cd3c
chore: restore original dev_config.yaml
Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-18 08:51:12 +00:00
Cursor Agent
5e7645a99b
chore: remove unused imports (get_key_object, _cache_key_object)
These were only used in block_key/unblock_key for cache refresh,
which now uses _delete_cache_key_object instead.

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-18 08:47:44 +00:00
Cursor Agent
b428cfb4a4
test: add unit tests for block_key/unblock_key with non-existent keys
- test_block_key_nonexistent_key_returns_404: verifies block_key returns
  404 (not misleading 401) when the key doesn't exist in the DB
- test_unblock_key_nonexistent_key_returns_404: same for unblock_key
- test_block_key_existing_key_succeeds: verifies block_key succeeds and
  invalidates cache for existing keys
- Update test_unblock_key_supports_both_sk_and_hashed_tokens to reflect
  the new cache invalidation pattern (_delete_cache_key_object instead
  of get_key_object + _cache_key_object)

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-18 08:44:22 +00:00
Cursor Agent
19efe556cb
fix: /key/block and /key/unblock return 404 instead of misleading 401 for non-existent keys
The block_key() and unblock_key() handlers previously returned a
misleading 401 'Authentication Error' when the body 'key' didn't exist
in the database, even though authentication (via Authorization header)
succeeded correctly.

Root cause: After auth passed, the handlers called get_key_object() for
cache refresh. This function was designed for auth token lookup and
raises ProxyException(code=401) when a token isn't found. Additionally,
Prisma's update() silently returns None for non-existent records instead
of raising an error, so the code reached get_key_object() without
detecting the missing key.

Fix:
- Add an explicit existence check (find_unique) before the update
- Return 404 ProxyException with 'Key not found' if the key doesn't exist
- Replace get_key_object() + manual cache update with _delete_cache_key_object()
  to invalidate the cache (next read will re-fetch from DB)
- Reuse the find_unique result for audit logs, eliminating duplicate queries

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-18 08:41:32 +00:00
Arindam Majumder
464e5fa2b4
Merge pull request #4 from Astrodevil/v0-docs
V0 docs
2026-03-18 13:46:21 +05:30
Arindam200
b200d472f5 fix: docker proxy guide 2026-03-18 13:38:23 +05:30
yuneng-jiang
bbabdaab38
Merge pull request #23973 from BerriAI/litellm_/fervent-hypatia
[Refactor] UI - Playground: Extract FilePreviewCard from ChatUI
2026-03-18 00:44:17 -07:00
yuneng-jiang
cd549bf4f5 [Refactor] UI - Playground: Extract FilePreviewCard from ChatUI
Extract duplicate file preview JSX blocks (responses and chat image
previews) into a reusable FilePreviewCard component, reducing ~50
lines of duplicated markup in ChatUI.tsx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 00:40:00 -07:00
Arindam200
70a9e6038e fix:expected response 2026-03-18 13:03:39 +05:30
Arindam200
3fd50c9132 docker proxy guide fix 2026-03-18 12:58:57 +05:30
yuneng-jiang
b0990e2684 Revert "fix: prevent body 'key' field from overriding Authorization header in auth"
This reverts commit 2c874a7f3c.
2026-03-17 23:02:54 -07:00
yuneng-jiang
d2e77e74ee
Merge pull request #23938 from BerriAI/litellm_/sweet-austin
[Feature] /v2/team/list: Add org admin access control, members_count, and indexes
2026-03-17 23:01:41 -07:00
yuneng-jiang
2c874a7f3c fix: prevent body 'key' field from overriding Authorization header in auth
On /key/block, /key/unblock, and /key/update, the request body 'key'
field could contaminate the api_key Security dependency, causing the
auth layer to authenticate against the target key instead of the
caller's bearer token. This returned 401 for a nonexistent body key
even when the Authorization header contained a valid master key.

Added a guard in user_api_key_auth that re-reads the Authorization
header directly from the request, ensuring the header is always the
authoritative source for authentication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:00:05 -07:00
Krish Dholakia
cec3e9e7d4
Merge pull request #23808 from voidborne-d/fix/shared-aiohttp-session-auto-recovery
fix: auto-recover shared aiohttp session when closed
2026-03-17 22:23:01 -07:00
joereyna
8a4ef0bd05 revert: restore full changelog base to v1.82.0-stable 2026-03-17 22:17:12 -07:00
joereyna
19f82c229b fix: update full changelog base from v1.82.0-stable to v1.82.0 2026-03-17 22:11:43 -07:00