Commit Graph
36424 Commits
Author SHA1 Message Date
yuneng-jiangandClaude Opus 4.6 a75964f040 Fix batch retrieve double-encoding: resolve output_file_id via DB lookup instead of hooks
The previous approach populated _hidden_params to trigger the managed files
hook, but the hook also re-encodes response.id (batch ID), causing double-
encoding when the DB already stores unified IDs. Instead, resolve raw
output_file_id/error_file_id to unified IDs via a direct DB lookup (same
pattern as resolve_input_file_id_to_unified), which avoids the hook entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:27:40 -07:00
yuneng-jiangandClaude Opus 4.6 ff869e91b0 Fix flaky caching tests: use mock_response, add parallelism, remove fail-fast
- Replace real OpenAI/Anthropic/Bedrock API calls with mock_response in
  ~20 cache tests to eliminate network-dependent flakiness
- Remove -x (fail-fast) from caching_unit_tests so all failures are reported
- Add parallelism: 2 with circleci tests run --split-by=timings
- Improve pip dependency cache key (v2-caching-deps) with fallback key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:23:19 -07:00
yuneng-jiangandClaude Opus 4.6 67e905f0d0 Fix flaky encrypted_content_affinity tests: clear HTTP client cache, disable retries
Tests failed intermittently in CI (-n 8 workers) because cached
AsyncHTTPHandler instances from other tests bypassed the class-level
mock on AsyncHTTPHandler.post, causing real requests to OpenAI with
mock API keys. Router retries (default 2) masked the root cause.

- Add autouse fixture to flush litellm.in_memory_llm_clients_cache
  before/after each test so mocks always apply to fresh clients
- Set num_retries=0 on all Router instances to surface mock failures
  immediately instead of silently retrying

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:18:34 -07:00
yuneng-jiangandClaude Opus 4.6 31e6393458 Fix flaky proxy_e2e_azure_batches_tests: populate _hidden_params for DB-cached batch retrieval
When a completed batch is served from the DB cache, _hidden_params was empty,
causing the managed files hook to skip output_file_id translation from raw
provider IDs to unified IDs. This fix populates unified_batch_id and model_id
on the early-return path, with a guard against double-encoding when the DB
already stores unified IDs.

Also reduces file deletion retry delay (20s→5s), reruns (5→2), and CI timeout
(30m→15m) to cut worst-case runtime from ~16min to ~4min.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:13:30 -07:00
yuneng-jiangandClaude Opus 4.6 87e3e84e6b Set semgrep job to medium resource class explicitly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:07:06 -07:00
yuneng-jiangandClaude Opus 4.6 2e27e32d33 Downsize remaining xlarge CI jobs to match actual workload
4 mapped test jobs (llms, core, core_utils, integrations) were running on
xlarge with -n 16 workers on 8 vCPUs, causing unnecessary context switching.
Downsized to large with worker counts matched to available cores.
MCPs job (2 test files) downsized from large to medium.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 14:50:13 -07:00
yuneng-jiangandClaude Opus 4.6 82d3b23526 Update deprecated Together AI model in test_completion_together_ai_llama
Llama-3.2-3B-Instruct-Turbo is no longer available as a serverless model
on Together AI. Switch to Llama-3.3-70B-Instruct-Turbo which is still
available and has cost data in the model prices map.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 14:02:42 -07:00
yuneng-jiangandClaude Opus 4.6 ed1320e6d1 Fix test_completion_sagemaker_messages_api retry flakiness
Add num_retries=0 to the async acompletion call to prevent retries
when the mock returns invalid response data. The test only validates
request payload format, not retry behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 13:57:50 -07:00
yuneng-jiangandClaude Opus 4.6 717d37cc5b Fix flaky CI: update deprecated model, filter leaked async task logs
- test_router_context_window_check_pre_call_check_out_group: replace deprecated
  gpt-3.5-turbo-1106 (removed from model_cost, returns max_input_tokens=0) with
  gpt-4.1-mini + mock_response
- test_async_fallbacks: filter "Task was destroyed but it is pending" messages
  that leak from parallel test execution in CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 13:38:35 -07:00
yuneng-jiangandClaude Opus 4.6 968d7a3eca Fix test isolation: save/restore pre_call_rules and post_call_rules
test_post_call_rule_streaming in test_rules.py sets
litellm.post_call_rules but never cleans up. Since
pytest_collection_modifyitems sorts tests by name across modules,
the leaked rule causes failures in test_streaming.py,
test_register_model.py, and test_sagemaker.py.

Add pre_call_rules and post_call_rules to the isolate_litellm_state
fixture's save/restore and clear lists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 13:28:14 -07:00
brtydse100RheagalFiregreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
dd1ea3d39e Support multiple headers mapped to the customer user role (#23664)
* added the header mapping feature

* added tests

* final cleanup

* final cleanup

* added missing test and logic

* fixed header sending bug

* Update litellm/proxy/auth/auth_utils.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* added back init file in responses + fixed test_auth_utils.py  int local_testing

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-15 14:20:45 +05:30
bbarwikandRheagalFire 7ed9be55b1 fix: merge annotations from all streaming chunks in stream_chunk_builder
Previously, stream_chunk_builder only took annotations from the first
chunk that contained them, losing any annotations from later chunks.

This is a problem because providers like Gemini/Vertex AI send grounding
metadata (converted to annotations) in the final streaming chunk, while
other providers may spread annotations across multiple chunks.

Changes:
- Collect and merge annotations from ALL annotation-bearing chunks
  instead of only using the first one
2026-03-15 14:20:45 +05:30
yuneng-jiangandClaude Opus 4.6 568726b06e Fix test_aaarouter_dynamic_cooldown_message_retry_time isolation issue
The test relied on a global side effect (customLogger initialization in
litellm_logging.py) from prior tests' success callbacks to dispatch
failure callbacks. When tests run in parallel by file, no prior test
initializes customLogger, so the Router's deployment_callback_on_failure
was never invoked and cooldowns were never set.

Rewrite to directly call deployment_callback_on_failure with a proper
RateLimitError containing retry-after headers, testing the cooldown
logic without depending on the logging callback chain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 00:14:39 -07:00
yuneng-jiangandClaude Opus 4.6 023654d9ad Fix flaky CI tests: mock timeout race, update deprecated model, fix callback leak
- test_hanging_request_azure: mock httpx.AsyncClient.send to simulate slow
  response instead of racing real network latency against a 10ms timeout.
  The old non-existent deployment (gpt-4o-new-test) returned 404 faster
  than the timeout, causing NotFoundError instead of APITimeoutError.
- test_completion_together_ai_llama: update model from deprecated
  Meta-Llama-3.1-8B-Instruct-Turbo to Llama-3.2-3B-Instruct-Turbo
  (Together AI removed the old model from serverless).
- conftest.py: clear litellm.callbacks list before each test to prevent
  proxy hooks (SkillsInjectionHook, VirtualKeyModelMaxBudgetLimiter)
  from leaking across tests via Router initialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 23:45:58 -07:00
yuneng-jiangandClaude Opus 4.6 bcd887ea61 Fix test_async_fallbacks_streaming to use mock_response instead of real API
The test was failing because it depended on real API calls to deprecated
models. Now uses mock_response to validate streaming through the router
without external dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 23:45:40 -07:00
yuneng-jiangandClaude Opus 4.6 f73ff72ab5 Fix router test isolation: update deprecated model, remove shared Redis state
- test_async_fallbacks_streaming: replace deprecated gpt-3.5-turbo fallback
  with gpt-4o-mini, fix use of module-level kwargs variable
- test_ausage_based_routing_fallbacks: remove Redis dependency to prevent
  shared state across parallel CI containers (test already uses mock_response)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 23:35:51 -07:00
yuneng-jiangandClaude Opus 4.6 f838bea85b Optimize CI: parallelize router and guardrails test jobs, fix test isolation
- Router testing: add CircleCI parallelism=4 with timing-based test splitting
- Guardrails testing: add pytest-xdist -n 4, suppress DEBUG logs with LITELLM_LOG=WARNING
- Rewrite conftest.py in both test dirs for xdist compatibility (save/restore pattern)
- Fix module-level Router instances in test_router_fallback_handlers, test_router_custom_routing, test_acooldowns_router

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 22:54:44 -07:00
yuneng-jiangandClaude Opus 4.6 509137580c Consolidate duplicate Docker image builds to reuse pre-built image
build_and_test, helm_chart_testing, and test_bad_database_url each rebuilt
Dockerfile.database from scratch (~5-10 min each) despite build_docker_database_image
already building and persisting it to workspace. Now all three load the
pre-built image via workspace, eliminating 3 redundant Docker builds.

Also removes orphaned test_nonroot_image job definition (not referenced in workflow).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 21:44:07 -07:00
yuneng-jiangandClaude Opus 4.6 cc80771835 Cache Next.js build cache for ui_build job
Add restore_cache/save_cache for .next/cache to eliminate the
"No build cache found" warning and speed up subsequent Next.js builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 21:29:18 -07:00
yuneng-jiangandClaude Opus 4.6 614768257b Switch test_bad_database_url from Dockerfile.non_root to Dockerfile.database
test_bad_database_url only validates DB error handling — it doesn't need
the UI. Dockerfile.non_root does a full npm install + next build which is
unnecessary overhead for this test. Dockerfile.database skips the UI build
(build_admin_ui.sh is a no-op for OSS) making the Docker build much faster.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 21:25:04 -07:00
yuneng-jiangandClaude Opus 4.6 e38ee6a531 Optimize ui_build job and gate ui_unit_tests behind it
- Switch ui_build from machine VM to docker executor (cimg/node:20.19)
- Add npm cache (restore_cache/save_cache) keyed on package-lock.json
- Use npm ci instead of rm -rf node_modules && npm install
- Gate ui_unit_tests behind ui_build (don't run tests if build fails)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 21:19:32 -07:00
yuneng-jiangandClaude Opus 4.6 45ff66ab90 Add ui_unit_tests as requirement for publish_to_pypi
ui_unit_tests was gated behind ui_build but not required for publishing.
This ensures UI unit tests must pass before PyPI publish.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 20:59:16 -07:00
yuneng-jiangandGitHub 548e7ebd60 Merge pull request #23678 from BerriAI/litellm_security_bump_mar14
[Fix] Bump PyJWT to ^2.12.0 for Security
2026-03-14 20:52:21 -07:00
yuneng-jiangandClaude Opus 4.6 95b6821436 Speed up ui_unit_tests CI job (~20min -> ~5-7min)
- Switch from machine VM to docker executor (cimg/node:20.19)
- Add npm cache with restore_cache/save_cache
- Use npm ci instead of npm install (stop deleting node_modules/package-lock.json)
- Enable parallel test execution with --pool forks --maxForks=3
- Bump resource_class to medium+ for 3 vCPUs
- Remove unnecessary requires: ui_build dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 20:16:44 -07:00
yuneng-jiangandClaude Opus 4.6 d3587b1d8e fix: bump PyJWT to 2.12.0 in all Dockerfiles and tar to 7.5.11
All Dockerfiles were pinning PyJWT 2.9.0 (Dockerfile, Dockerfile.database,
Dockerfile.dev) or had a stale wheel build for 2.9.0 (Dockerfile.non_root).
Updated to 2.12.0 to match pyproject.toml. Also bumps tar to 7.5.11 in
Dockerfile.non_root for security.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:54:54 -07:00
yuneng-jiangandClaude Opus 4.6 1f485007fb fix: update PyJWT pin in Dockerfile.non_root to 2.12.0
The wheels directory contains 2.12.0 after the pyproject.toml bump,
so the hardcoded 2.10.1 pin fails at build time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:53:52 -07:00
yuneng-jiangandClaude Opus 4.6 eb7222c7cb [Infra] Reduce CI no_output_timeout and tighten Playwright timeouts
- Change no_output_timeout from 120m/60m to 15m across all test jobs
- Fix multi-line YAML formatting for no_output_timeout entries
- Reduce Playwright per-test timeout from 4min to 3min
- Add 15s actionTimeout and 30s navigationTimeout to Playwright config

Hanging tests now fail in 15min instead of 2hrs, cutting wasted CI time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:38:10 -07:00
yuneng-jiang 188a864a78 updating poetry lock 2026-03-14 19:21:50 -07:00
yuneng-jiang c1dadc0c80 bumping pyJWT for security 2026-03-14 19:17:19 -07:00
yuneng-jiangandGitHub b988a8df91 Merge pull request #23654 from BerriAI/litellm_internal_dev_03_14_2026
[Infra] Merge internal dev with main
2026-03-14 19:13:34 -07:00
codspeed-hq[bot]GitHubcodspeed-hq[bot] <117304815+codspeed-hq[bot]@users.noreply.github.com>
be20a8a93d Add CodSpeed performance benchmarks (#23676)
Co-authored-by: codspeed-hq[bot] <117304815+codspeed-hq[bot]@users.noreply.github.com>
2026-03-14 18:44:36 -07:00
yuneng-jiang 82fc819abf Merge remote-tracking branch 'origin' into litellm_internal_dev_03_14_2026 2026-03-14 18:35:03 -07:00
yuneng-jiangandGitHub d907a81270 Merge pull request #23674 from BerriAI/litellm_fix_hanging_httpx_tests
[Fix] Hanging CI Tests in custom_httpx test_http_handler
2026-03-14 18:20:38 -07:00
yuneng-jiangandClaude Opus 4.6 460f6208c5 Fix __main__ exit bug, close litellm_async_client, restore global state
- Fix __main__ block: test returns None now, so always exited 1
- Close litellm_async_client in test_ssl_verification_with_aiohttp_transport
- Save/restore litellm.force_ipv4 and litellm.disable_aiohttp_transport
  in test_force_ipv4_transport and test_aiohttp_disabled_transport

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:14:42 -07:00
yuneng-jiangandClaude Opus 4.6 062cd4a2a1 Remove gc.get_objects() from test_gemini_session_leak.py
count_aiohttp_sessions() iterates every object in the Python GC,
which hangs in CI when xdist workers have millions of loaded objects.
Replace with direct session.closed checks — same coverage, no hang.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:00:26 -07:00
yuneng-jiangandClaude Opus 4.6 b14eadef86 Fix hanging CI tests in test_http_handler.py
- Remove real HTTP call to example.com in test_force_ipv4_transport
  (hangs in CI when network is slow/unavailable)
- Close leaked aiohttp.ClientSession in test_ssl_verification_with_aiohttp_transport
- Add cleanup for transports in test_aiohttp_transport_trust_env_setting
- Add cleanup for handler in test_ssl_security_level
- Add cleanup for transport in test_ssl_context_transport

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:40:33 -07:00
yuneng-jiangandClaude Opus 4.6 27f1d33e05 Downgrade resource_class on over-provisioned CI jobs
21 jobs were using xlarge (8 vCPU, 16GB) despite running trivial or
low-parallelism workloads. Downgrades 6 trivial container-check/UI jobs
to medium (2 vCPU) and 15 lightweight test jobs to large (4 vCPU).
Only the 5 high-parallelism mapped test jobs (-n 8/16) remain on xlarge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:15:08 -07:00
b96f033c90 fix: prisma migrate deploy failures on pre-existing instances (#23655)
* fix: prisma migrate deploy failures on pre-existing instances

Fixes failed migrations due to idempotent schema changes on pre-existing litellm instances.

Problems:
1. P3018 recovery handler never returned True on successful resolution, causing "Database setup failed after multiple retries" even when the final recovery succeeded
2. _roll_back_migration exceptions escaped the P3018 handler, preventing _resolve_specific_migration from running
3. Migration SQL used ADD COLUMN/DROP COLUMN without IF [NOT] EXISTS, failing if schema was already modified

Changes:
- Add return True after successful P3018 idempotent error recovery
- Wrap _roll_back_migration in try/except to allow recovery continuation even if rollback fails
- Make migration.sql idempotent with IF NOT EXISTS / IF EXISTS clauses

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* test: add migration SQL idempotency safety tests

Adds TestMigrationSQLIdempotency test class that statically validates all
migration SQL files created after 2026-03-11 use idempotent DDL:
- ADD COLUMN must use IF NOT EXISTS
- DROP COLUMN must use IF EXISTS
- DROP INDEX must use IF EXISTS
- CREATE INDEX must use IF NOT EXISTS

This prevents the class of errors where prisma migrate deploy fails on
pre-existing instances because the schema was already modified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: also catch TimeoutExpired in P3018 rollback handler

_roll_back_migration uses subprocess.run with timeout=60, so it can raise
subprocess.TimeoutExpired in addition to CalledProcessError. Without
catching this, a slow database during rollback would escape the handler
and bypass _resolve_specific_migration — the same class of bug.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: make all 85 migration SQL files idempotent, remove test cutoff

Fixed all existing migration files to use IF [NOT] EXISTS for DDL
statements (ADD COLUMN, DROP COLUMN, DROP INDEX, CREATE INDEX).
Removed the date cutoff from the idempotency tests so they now
validate all migrations, not just recent ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: make migration failure non-fatal by default, add --require_db_migration flag

By default the proxy now warns and continues when database migration
fails. Pass --require_db_migration (or set REQUIRE_DB_MIGRATION=true)
to restore the previous behavior of exiting with an error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: wrap _resolve_specific_migration in try/except, guard RENAME COLUMN and ADD CONSTRAINT

Three fixes:

1. _resolve_specific_migration in the P3018 handler was not wrapped in
   try/except, so failures there would bypass the return True and
   propagate unexpectedly — partially defeating the rollback fix.

2. Bare RENAME COLUMN in 20260303000000_update_tool_table_policies was
   non-idempotent. Wrapped in DO $$ IF EXISTS block. Also wrapped all
   28 bare ADD CONSTRAINT statements across 9 migration files in
   DO $$ IF NOT EXISTS (pg_constraint) blocks.

3. Added test_rename_column_is_guarded and test_add_constraint_is_guarded
   to TestMigrationSQLIdempotency for full DDL coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: retry after resolving idempotent migration, guard DROP CONSTRAINT

Three fixes:

1. Both P3009 and P3018 idempotent handlers returned True after
   resolving a single migration, exiting before remaining pending
   migrations were applied. Now they continue the retry loop so
   prisma migrate deploy runs again for any remaining migrations.

2. Two migration files had bare DROP CONSTRAINT without a DO $$ IF
   EXISTS guard, which fails if the constraint was already dropped.
   Wrapped both in idempotent DO $$ blocks.

3. Added test_drop_constraint_is_guarded to catch unguarded DROP
   CONSTRAINT in future migrations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: P3009 try/except, CREATE TABLE IF NOT EXISTS, restore fail-fast default

Four fixes:

1. P3009 idempotent handler now has the same try/except around
   _roll_back_migration and _resolve_specific_migration as the P3018
   handler. Previously a rollback or resolve failure in the P3009 path
   would propagate and leave the migration unresolved.

2. Added IF NOT EXISTS to all 57 bare CREATE TABLE statements across
   34 migration files. Added test_create_table_uses_if_not_exists to
   catch this pattern.

3. Reverted the backwards-incompatible default behavior change: the
   proxy now fails fast on migration failure (original behavior).
   Added --skip_db_migration_check / SKIP_DB_MIGRATION_CHECK to
   opt into warn-and-continue instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-14 16:54:21 -07:00
yuneng-jiang d28e42d7ce chore: update Next.js build artifacts (2026-03-14 23:50 UTC, node v22.16.0) 2026-03-14 16:50:13 -07:00
yuneng-jiangandGitHub cda8fbef50 Merge pull request #23668 from BerriAI/litellm_fix_redaction_filter_logging_v2
fix: redact secrets from proxy log output
2026-03-14 16:47:59 -07:00
yuneng-jiangandGitHub d4c396ddb0 Merge pull request #23671 from BerriAI/litellm_team_admin_user_filter_org_scope
[Fix] Team Admin 403 on /user/filter/ui With Org Scope Flag
2026-03-14 16:47:38 -07:00
yuneng-jiangandClaude Opus 4.6 1d753c3fa6 [Fix] Allow team admins to query /user/filter/ui when scope_user_search_to_org is enabled
When scope_user_search_to_org flag is ON, team admins (non-org-admins) were
getting 403 because the code only checked for ORG_ADMIN role in org memberships.
Now checks all org memberships (any role) and falls back to the API key's team_id
to resolve the org.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 16:38:34 -07:00
Ryan Crabbe e45c82aea0 docs: add LITELLM_DISABLE_REDACT_SECRETS to environment variable reference v1.82.0.patch5 2026-03-14 15:59:52 -07:00
Ryan Crabbe 47ddd0d0bf fix: redact secrets from proxy log output
Add SecretRedactionFilter to scrub API keys, tokens, and credentials
from all log records (messages, args, tracebacks, extra fields).

- Enable redaction by default; opt out with LITELLM_DISABLE_REDACT_SECRETS=true
- Redact patterns: sk-*, Bearer tokens, x-api-key values, base64 creds
- Handle JSON formatter exception hooks and percent-style format args
- Snapshot dict iteration to avoid RuntimeError during concurrent logging
2026-03-14 15:52:31 -07:00
ryan-crabbeGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
c95783e641 Update tests/test_litellm/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-14 15:42:17 -07:00
Ryan Crabbe c60f1dd590 test: add regression test for fresh-instance default role sync
Asserts that GET /get/internal_user_settings returns
INTERNAL_USER_VIEW_ONLY on a fresh DB with no saved settings,
matching the runtime fallback in SSO/SCIM/JWT provisioning.
2026-03-14 15:36:26 -07:00
Ryan Crabbe 6970e1000c fix: align DefaultInternalUserParams Pydantic default with runtime fallback
The Pydantic default for user_role was INTERNAL_USER, but all runtime
provisioning paths (SSO, SCIM, JWT) fall back to INTERNAL_USER_VIEW_ONLY
when no settings are saved. This caused the UI to show "Internal User"
on fresh instances while new users actually got "Internal Viewer".
2026-03-14 15:28:37 -07:00
yuneng-jiangandGitHub 61d1e33d73 Merge pull request #23665 from BerriAI/litellm_fix_responses_bridge_overwrite
[Fix] Responses Bridge Overwrite on Second Bridge Check
2026-03-14 15:22:31 -07:00
Krrish Dholakia e0b3fcb34c refactor: update pr template to invite users to slack oss 2026-03-14 15:19:40 -07:00
yuneng-jiangandClaude Opus 4.6 2bd527e62e [Fix] Prevent second responses_api_bridge_check from overwriting first
The second `responses_api_bridge_check` call unconditionally overwrote
`responses_api_model_info` set by the first call. For models using the
`responses/` prefix (e.g. `azure/responses/<deployment>`), the first
check correctly detected `mode: "responses"` and stripped the prefix,
but the second check then overwrote it with an empty dict since the
model no longer started with `responses/`.

Skip the second check when the first already detected responses mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 15:19:14 -07:00