- storageUtils: replace deprecated escape()/unescape() with
TextEncoder/TextDecoder for UTF-8 base64 encoding
- chatHistory: use setObfuscated/getObfuscated consistently across
ChatUI.tsx, useChatHistory.ts, and tests
- Tests updated and passing (39/39)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- sanitizeImageSrc: use URL parsing to return parsed.href instead of the
raw input string, breaking the taint chain for CodeQL's xss-through-dom
- handleImageUpload: sanitize blob URLs at creation time before storing
- LoginPage: validate SSO code format with a regex guard so CodeQL no
longer flags the user-controlled-bypass
CodeQL javascript-security-extended now reports zero findings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Port security fix from litellm_security_fixes_v1.82.3: use
isValidReturnUrl() guard and reconstruct a safe path from parsed URL
components before calling window.location.replace().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Incomplete string escaping: add backslash escaping before quote
escaping in TeamGuardrailsTab, CodeSnippets; use regex /g flag in
public_model_hub wildcard replace
- Clear-text storage: obfuscate sensitive sessionStorage values
(API keys, OAuth state, MCP form state) via base64 encoding through
new storageUtils helper
- XSS-through-DOM: add sanitizeImageSrc helper to validate image src
URLs use safe schemes (blob:, data:, http:, https:) before rendering
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Vitest + RTL unit tests for WorkerDropdown, AccessGroupSelector,
MemberTable, ModelSelector, and AutoRotationView (37 tests total).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add `if: github.repository == 'BerriAI/litellm'` guard to scheduled
jobs in stale.yml, codeql.yml, and create_daily_staging_branch.yml.
This matches the existing pattern in auto_update_price_and_context_window.yml
and prevents these workflows from running unnecessarily on fork repositories.
Verify that spend_logs_metadata is correctly merged into combined_metadata
and flows through to Prometheus custom labels. Tests cover: basic extraction,
precedence when keys overlap, all three metadata sources combined, and None
handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add spend_logs_metadata to combined_metadata in Prometheus logger so
custom metadata from x-litellm-spend-logs-metadata header can be used
in Prometheus custom labels.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Thread project_alias alongside project_id through the metadata pipeline so
callbacks receive the human-readable project name. DRY up duplicate metadata
dict construction in proxy_track_cost_callback and pass_through_endpoints by
reusing get_sanitized_user_information_from_key — future metadata fields only
need adding in one place.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two independent bugs prevented post-call OpenAI Moderation guardrail
results from reaching downstream logging callbacks (Langfuse, Datadog).
Bug 1: process_output_response() created a throwaway request_data dict,
so guardrail info written by @log_guardrail_information was discarded.
Fixed by threading the real request_data from the unified guardrail
dispatcher through all 13 BaseTranslation handlers, with litellm_metadata
injection preserved for third-party guardrails (Zscaler, Prompt Security).
Also extended to process_output_streaming_response for consistency.
Bug 2: The @log_guardrail_information decorator collapsed the full
moderation API response (categories, scores, flagged status) to "allow".
Fixed by overriding _process_response/_process_error on
OpenAIModerationGuardrail to stash and log the full response, following
the established Model Armor pattern.
- Use Select.Option with font-medium alias + Text secondary ID to match OrganizationDropdown
- Default page size to 20
- Add useInfiniteTeams mock to AddModelForm tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- OldTeams: refresh table via fetchTeamsV2 after team create instead of appending
- TeamDropdown: rewrite with useInfiniteTeams for paginated fetch, scroll-to-load, and debounced search
- Update all TeamDropdown consumers to use the new self-fetching API
- Dashboard layout: switch from Sidebar2 to SidebarProvider (leftnav)
- Leftnav: add MIGRATED_PAGES routing for path-based navigation (api-reference)
- Navbar: remove chat button
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New docs page covering the HA control plane architecture where each
worker instance has its own DB, Redis, and master key. Includes a
React component diagram, setup configs, SSO notes, and local testing
instructions.
Extract multiline `or` chain from LiteLLM_AuditLogs constructor to fix
pydantic mypy plugin field-type misattribution, and add explicit
Optional[bool] annotation to avoid variable name shadowing conflict.
Addresses Greptile feedback that test assertions were weakened when
removing summary: "detailed" expectations — now every default-behavior
test explicitly asserts that "summary" is absent from the result.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>