litellm/docs/my-website/docs/proxy
Ishaan Jaff b87d1f8dad
[Feat] - Ishaan main merge branch (#23596)
* fix(bedrock): respect s3_region_name for batch file uploads (#23569)

* fix(bedrock): respect s3_region_name for batch file uploads (GovCloud fix)

* fix: s3_region_name always wins over aws_region_name for S3 signing (Greptile feedback)

* fix: _filter_headers_for_aws_signature - Bedrock KB (#23571)

* fix: _filter_headers_for_aws_signature

* fix: filter None header values in all post-signing re-merge paths

Addresses Greptile feedback: None-valued headers were being filtered
during SigV4 signing but re-merged back into the final headers dict
afterward, which would cause downstream HTTP client failures.

Made-with: Cursor

* feat(router): tag_regex routing — route by User-Agent regex without per-developer tag config (#23594)

* feat(router): add tag_regex support for header-based routing

Adds a new `tag_regex` field to litellm_params that lets operators route
requests based on regex patterns matched against request headers — primarily
User-Agent — without requiring per-developer tag configuration.

Use case: route all Claude Code traffic (User-Agent: claude-code/x.y.z) to
a dedicated deployment by setting:

  tag_regex:
    - "^User-Agent: claude-code\\/"

in the deployment's litellm_params. Works alongside existing `tags` routing;
exact tag match takes precedence over regex match. Unmatched requests fall
through to deployments tagged `default`.

The matched deployment, pattern, and user_agent are recorded in
`metadata["tag_routing"]` so they flow through to SpendLogs automatically.

* fix(tag_regex): address backwards-compat, metadata overwrite, and warning noise

Three issues from code review:

1. Backwards-compat: `has_tag_filter` was widened to activate on any non-empty
   User-Agent, which would raise ValueError for existing deployments using plain
   tags without a `default` fallback. Fix: only activate header-based regex
   filtering when at least one candidate deployment has `tag_regex` configured.

2. Metadata overwrite: `metadata["tag_routing"]` was overwritten for every
   matching deployment in the loop, leaving inaccurate provenance when multiple
   deployments match. Fix: write only for the first match.

3. Warning noise: an invalid regex pattern logged one warning per header string
   rather than once per pattern. Fix: compile first (catching re.error once),
   then iterate over header strings.

Also adds two new tests covering these cases, and adds docs page for
tag_regex routing with a Claude Code walk-through.

* refactor(tag_regex): remove unnecessary _healthy_list copy

* docs: merge tag_regex section into tag_routing.md, remove standalone page

- Add ## Regex-based tag routing (tag_regex) section to existing
  tag_routing.md instead of a separate page
- Remove tag_regex_routing.md standalone doc (odd UX to have a separate
  page for a sub-feature)
- Remove proxy/tag_regex_routing from sidebars.js
- Add match_any=False debug warning in tag_based_routing.py when regex
  routing fires under strict mode (regex always uses OR semantics)

* fix(tag_regex): address greptile review - security docs, strict-mode enforcement, validation order

- Strengthen security note in tag_routing.md: explicitly state User-Agent
  is client-supplied and can be set to any value; frame tag_regex as a
  traffic classification hint, not an access-control mechanism
- Move tag_regex startup validation before _add_deployment() so an invalid
  pattern never leaves partial router state
- Enforce match_any=False strict-tag policy: when a deployment has both
  tags and tag_regex and the strict tag check fails, skip the regex fallback
  rather than silently bypassing the operator's intent
- Extract per-deployment match logic into _match_deployment() helper to
  keep get_deployments_for_tag() readable
- Add two new tests: strict-mode blocks regex fallback, regex-only
  deployment still matches under match_any=False

* fix(ci): apply Black formatting to 14 files and stabilize flaky caplog tests

- Run Black formatter on 14 files that were failing the lint check
- Replace caplog-based assertions in TestAliasConflicts with
  unittest.mock.patch on verbose_logger.warning for xdist compatibility
- The caplog fixture can produce empty text in pytest-xdist workers
  in certain CI environments, causing flaky test failures

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-14 09:40:00 -07:00
..
guardrails Merge pull request #23410 from BerriAI/docs_policyy_builder 2026-03-11 19:03:55 -07:00
ui ui logo (#23556) 2026-03-13 08:44:08 -07:00
access_control.md fix: prompt registry 2026-02-18 00:34:54 +05:30
access_groups.md fix: prompt registry 2026-02-18 00:34:54 +05:30
admin_ui_sso.md fix: update Okta SSO docs and custom SSO handler example 2026-03-04 17:59:55 +02:00
ai_hub.md docs(ai_hub.md): document mcp servers on ai hub 2025-11-22 16:07:38 -08:00
alerting.md feat: add optional digest mode for Slack alert types (#21683) 2026-02-21 15:19:17 -08:00
architecture.md (Feat) - Show Error Logs on LiteLLM UI (#8904) 2025-02-28 20:10:09 -08:00
arize_phoenix_prompts.md Arize Phoenix OSS - Prompt Management Integration (#17750) 2025-12-09 22:53:42 -08:00
auto_routing.md docs: v1.81.14-stable release notes (#21839) 2026-02-21 14:50:50 -08:00
billing.md Fix #11856: Update billing.md docs to call the new GPT-4o model (#11858) 2025-06-18 08:19:36 -07:00
budget_reset_and_tz.md docs: Clean up budget reset and timezones documentation (#22428) 2026-02-28 17:37:25 -08:00
caching.md feat(semantic-cache): support configurable vector dimensions for Qdrant (#21649) 2026-02-21 00:51:15 -08:00
call_hooks.md fix: prompt registry 2026-02-18 00:34:54 +05:30
cli.md fix: prompt registry 2026-02-18 00:34:54 +05:30
cli_sso.md fix: clarify EXPERIMENTAL_UI_LOGIN ignores LITELLM_UI_SESSION_DURATION, add regression test 2026-02-26 04:41:07 -08:00
clientside_auth.md [Security] Fixes for docs (#11776) 2025-06-16 16:20:55 -07:00
config_management.md Revert "Revert "(feat) Allow using include to include external YAML files in a config.yaml (#6922)"" 2024-11-27 16:08:59 -08:00
config_settings.md fix(proxy): prevent OOM/Prisma connection loss from unbounded managed-object poll (#23472) 2026-03-13 11:01:40 -07:00
configs.md fix: prompt registry 2026-02-18 00:34:54 +05:30
control_plane_and_data_plane.md [Feature] UI - Allow setting base_url in API reference docs (#16674) 2025-11-18 11:27:28 -08:00
cost_tracking.md docs: add PayGo/priority cost tracking for Gemini Vertex AI 2026-03-06 08:36:31 +05:30
credential_usage_tracking.md [Docs] Add Credential Usage Tracking documentation 2026-02-25 10:52:24 -08:00
custom_auth.md fix: prompt registry 2026-02-18 00:34:54 +05:30
custom_pricing.md docs: add PayGo/priority cost tracking for Gemini Vertex AI 2026-03-06 08:36:31 +05:30
custom_prompt_management.md Add sdk focused examples (#16441) 2025-11-10 18:39:34 -08:00
custom_root_ui.md Fix rendering ui on non-root images (#12226) 2025-07-01 22:08:35 -07:00
custom_sso.md fix: update Okta SSO docs and custom SSO handler example 2026-03-04 17:59:55 +02:00
customer_routing.md Controll fallback prompts client-side (#7334) 2024-12-20 19:09:53 -08:00
customer_usage.md fix: prompt registry 2026-02-18 00:34:54 +05:30
customers.md Mcp user permissions (#21462) 2026-02-18 18:53:59 -08:00
db_deadlocks.md fix: prompt registry 2026-02-18 00:34:54 +05:30
db_info.md docs: fix docs 2025-11-17 17:54:26 -08:00
debugging.md docs(debugging.md): document new feature 2025-09-11 20:17:39 -07:00
deleted_keys_teams.md fix: prompt registry 2026-02-18 00:34:54 +05:30
deploy.md fix: prompt registry 2026-02-18 00:34:54 +05:30
docker_quick_start.md fix: prompt registry 2026-02-18 00:34:54 +05:30
dynamic_logging.md [Feat] AI Gateway - Allow admins to disable, dynamic callback controls (#16750) 2025-11-17 18:29:07 -08:00
dynamic_rate_limit.md docs: link dynamic TPM/RPM limiting to request prioritization doc (#22988) 2026-03-07 19:27:41 -08:00
email.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
embedding.md fix: prompt registry 2026-02-18 00:34:54 +05:30
endpoint_activity.md fix: prompt registry 2026-02-18 00:34:54 +05:30
enterprise.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
error_diagnosis.md [Docs] Add guide on how to debug gateway error vs provider error (#17387) 2025-12-02 14:10:00 -08:00
fallback_management.md fix: prompt registry 2026-02-18 00:34:54 +05:30
forward_client_headers.md feat(proxy): client-side provider API key precedence for Anthropic /v1/messages 2026-03-06 18:20:46 +05:30
health.md add docs and formatting 2026-02-28 14:08:09 +05:30
image_handling.md docs(image_handling.md): architecture doc on image handling on the proxy 2025-03-21 14:19:05 -07:00
ip_address.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
jwt_auth_arch.md Litellm release notes 07 12 2025 (#12563) 2025-07-12 19:31:13 -07:00
keys_teams_router_settings.md fix: prompt registry 2026-02-18 00:34:54 +05:30
litellm_managed_files.md fix: prompt registry 2026-02-18 00:34:54 +05:30
litellm_prompt_management.md docs - ai gateway prompt management (#16990) 2025-11-22 18:49:29 -08:00
load_balancing.md Add docs for encrypted_content_affinity 2026-03-03 18:36:07 +05:30
logging.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
logging_spec.md feat: change guardrail_information to list type (#16127) 2025-11-02 09:47:49 -08:00
managed_batches.md docs(managed_batches.md): update docs 2025-11-17 18:00:08 -08:00
managed_finetuning.md docs(managed_finetuning.md): cleanup 2025-05-24 18:21:06 -07:00
management_cli.md [Feat] AI Gateway Auth - Allow using JWTs for signing in with Proxy CLI (#16756) 2025-11-17 19:47:29 -08:00
master_key_rotations.md docs: add doc for rotating master key 2025-03-06 23:22:01 -08:00
metrics.md (docs) show /daily_metrics 2024-02-27 19:34:47 -08:00
model_access.md [Docs] Add docs on APIs for model access management (#16673) 2025-11-14 17:07:54 -08:00
model_access_groups.md [Docs] Add docs on APIs for model access management (#16673) 2025-11-14 17:07:54 -08:00
model_access_guide.md [Docs] Add docs on APIs for model access management (#16673) 2025-11-14 17:07:54 -08:00
model_compare_ui.md docs 1.80.5 2025-11-22 13:52:26 -08:00
model_discovery.md Litellm release notes 04 19 2025 (#10169) 2025-04-19 17:26:30 -07:00
model_management.md fix: broken link on model_management.md (#16217) 2025-11-03 17:00:03 -08:00
multi_tenant_architecture.md docs(multi_tenant_architecture.md): add new architecture doc 2025-12-04 11:13:50 -08:00
multiple_admins.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
native_litellm_prompt.md Gitlab based Prompt manager (#14988) 2025-10-01 18:13:11 -07:00
oauth2.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
pagerduty.md Litellm release notes 07 12 2025 (#12563) 2025-07-12 19:31:13 -07:00
pass_through.md Add allow defining default query params for a pass through 2026-02-19 12:48:03 +05:30
pass_through_guardrails.md [Feat] UI - allow adding pass through guardrails through UI (#17226) 2025-11-27 12:27:16 -08:00
perf.md docs - fix build time issues 2024-06-15 16:12:37 -07:00
pricing_calculator.md fix: prompt registry 2026-02-18 00:34:54 +05:30
prod.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
project_management.md docs project management 2025-11-12 16:24:23 -08:00
prometheus.md Revert "feat(proxy): add Prisma DB pool and engine health metrics to Promethe…" 2026-03-09 14:55:11 -07:00
prompt_management.md fix docs and format 2026-02-18 02:49:52 +05:30
provider_budget_routing.md tag budgets fixes 2024-12-18 10:28:37 -08:00
provider_discounts.md fix: prompt registry 2026-02-18 00:34:54 +05:30
provider_margins.md fix: prompt registry 2026-02-18 00:34:54 +05:30
public_routes.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
public_teams.md Doc updates + management endpoint fixes (#8138) 2025-01-30 22:56:41 -08:00
pyroscope_profiling.md fix: prompt registry 2026-02-18 00:34:54 +05:30
quick_start.md fix: prompt registry 2026-02-18 00:34:54 +05:30
rate_limit_tiers.md docs(index.md): new release notes 2024-12-26 22:01:29 -08:00
realtime_webrtc.md Fix the live tester 2026-03-12 22:14:08 +05:30
reject_clientside_metadata_tags.md Add enforce user param functionality (#17088) 2025-11-25 09:36:24 -08:00
release_cycle.md fix: prompt registry 2026-02-18 00:34:54 +05:30
reliability.md doc improvement 2026-03-09 15:39:27 -07:00
request_headers.md Mcp user permissions (#21462) 2026-02-18 18:53:59 -08:00
request_tags.md Proxy request tags docs (#22129) 2026-02-25 14:29:00 -08:00
response_headers.md docs latency headers 2025-06-26 07:58:23 -07:00
rules.md (docs) use port 4000 2024-03-08 21:59:00 -08:00
security_encryption_faq.md docs(security_encryption_faq.md): answers common questions about data at rest vs. in transit 2025-10-06 17:34:10 -07:00
self_serve.md Corrected docs updates sept 2025 (#14916) 2025-09-25 15:49:19 -07:00
service_accounts.md Litellm dev 07 05 2025 p4 (#12350) 2025-07-05 19:38:42 -07:00
shared_health_check.md fix: prompt registry 2026-02-18 00:34:54 +05:30
spend_logs_deletion.md fix: prompt registry 2026-02-18 00:34:54 +05:30
sync_anthropic_beta_headers.md fix: prompt registry 2026-02-18 00:34:54 +05:30
sync_models_github.md docs fix spend tracking (#16675) 2025-11-14 17:22:21 -08:00
tag_budgets.md [Feat] Tag Management - Add support for setting tag based budgets (#15433) 2025-10-10 19:24:50 -07:00
tag_routing.md [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
team_based_routing.md Controll fallback prompts client-side (#7334) 2024-12-20 19:09:53 -08:00
team_budgets.md added doc 2026-03-13 17:24:15 -07:00
team_logging.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
team_model_add.md fix: update calendly on repo 2026-02-23 06:13:59 -08:00
temporary_budget_increase.md Litellm release notes 07 12 2025 (#12563) 2025-07-12 19:31:13 -07:00
timeout.md Update docs for stream_timeout and timeout (#14073) 2025-08-29 09:59:07 -07:00
token_auth.md docs: add JWT-to-Virtual-Key mapping documentation 2026-03-05 03:59:59 +05:30
ui.md Adding a small section to the UI docs 2025-11-20 20:31:38 -08:00
ui_credentials.md [Docs] Add Credential Usage Tracking documentation 2026-02-25 10:52:24 -08:00
ui_logs.md fix: prompt registry 2026-02-18 00:34:54 +05:30
ui_logs_sessions.md fix(session): correctly place litellm_session_id at root level instead of metadata (#11088) 2025-05-24 09:12:11 -07:00
ui_project_management.md Update docs/my-website/docs/proxy/ui_project_management.md 2026-02-28 18:15:09 -08:00
ui_spend_log_settings.md fix: prompt registry 2026-02-18 00:34:54 +05:30
ui_store_model_db_setting.md Revert "fix(vertex_ai): enable context-1m-2025-08-07 beta header (#21870)" (#21876) 2026-02-21 20:12:01 -08:00
ui_team_soft_budget_alerts.md fix: prompt registry 2026-02-18 00:34:54 +05:30
user_keys.md fix: prompt registry 2026-02-18 00:34:54 +05:30
user_management_heirarchy.md (feat) Organizations: allow org admins to create teams on UI + (feat) IBM Guardrails (#15924) 2025-10-25 11:13:39 -07:00
user_onboarding.md docs: Letta Guide (#14798) 2025-09-23 16:18:57 -07:00
users.md added doc 2026-03-13 17:24:15 -07:00
veo_video_generation.md [Feat] Allow using Veo Video Generation through LiteLLM Pass through routes (#14228) 2025-09-03 18:25:43 -07:00
virtual_keys.md fix: prompt registry 2026-02-18 00:34:54 +05:30
worker_startup_hooks.md Gflags worker parameters (#22931) 2026-03-06 18:09:57 -08:00