Skip to content

docs: add Routing Plugins page (SDK + complexity-router proxy YAML) - #572

Merged
krrish-berri-2 merged 2 commits into
mainfrom
claude/router-plugins-docs-d2f4a7
Jul 15, 2026
Merged

docs: add Routing Plugins page (SDK + complexity-router proxy YAML)#572
krrish-berri-2 merged 2 commits into
mainfrom
claude/router-plugins-docs-d2f4a7

Conversation

@krrish-berri-2

Copy link
Copy Markdown
Contributor

Summary

Adds a Routing Plugins doc page under Routing & Load Balancing, covering both the SDK entry point (Router(plugins=[...]), BerriAI/litellm#32972) and the proxy YAML support that landed for the complexity auto-router (complexity_router_config.plugins, BerriAI/litellm#33251).

The page reuses jeann2013's framing from discussion BerriAI/litellm#32168 (pipeline that enriches routing context; concrete e2e scenario with language, domain, tenant, budget plugins) and adds:

  • what plugins can and can't do (narrow candidates, publish signals, stop pipeline; read-only over messages, metadata, deployment pool)
  • RoutingContext shape with per-field notes on read vs write
  • request lifecycle showing where the pipeline runs relative to auto-router dispatch and healthy-deployment filtering
  • proxy YAML wiring (complexity_router_config.plugins, dotted paths resolved relative to config.yaml) with the CostCeilingPlugin example from feat(router): resolve auto-router routing plugins from proxy YAML config litellm#33251's proof-of-fix
  • SDK equivalent using the same plugin
  • behaviors specific to the complexity router integration: session_affinity disabled when plugins configured, adaptive=True + plugins raises at config-validation, tier narrowing that empties the pool raises rather than falling back to default_model
  • limitations: async only, unsupported strategies (legacy usage-based-routing v1), proxy YAML wired only for complexity router today, include/exclude-only filtering (no weighted scoring yet)

Also adds a sidebar entry for the new page under Routing & Load Balancing.

Test plan

  • npm run start locally and confirm /docs/routing_plugins renders with correct code highlighting, admonition, and sidebar placement
  • Confirm the internal link to router_settings.plugins in docs/proxy/config_settings.md resolves
  • Confirm the PR + discussion links resolve

…xy YAML

Documents the Router routing-plugin pipeline (#32972) and the proxy YAML
support for the complexity auto-router (#33251): what plugins can and
can't do, RoutingContext shape, request lifecycle, and both SDK and
config.yaml wiring for combining plugins with the complexity router.
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Jul 15, 2026 7:10pm

Request Review

@krrish-berri-2
krrish-berri-2 enabled auto-merge (squash) July 15, 2026 19:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6362cdd3a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/routing_plugins.md
},
},
],
plugins=[cost_ceiling_plugin],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move SDK complexity plugin into the config

In the complexity-router SDK example, passing the cost ceiling as a top-level Router(plugins=...) does not run it against the classified tier pool; that constructor pipeline only sees the outer auto_router/complexity_router deployment, while tier-pool filtering is wired through complexity_router_config.plugins. Users copying this snippet can still route to gpt-4o, so the plugin instance should be placed in the complexity_router_config dict instead.

Useful? React with 👍 / 👎.

Comment thread docs/routing_plugins.md

## Reference

Config: [`router_settings.plugins`](./proxy/config_settings#router_settings---reference).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reference the proxy plugin config key

This reference points readers to router_settings.plugins, but the proxy YAML support documented above is complexity_router_config.plugins; the target row labels router_settings.plugins as SDK-only. Proxy users following this reference will put dotted paths under a key the proxy does not resolve for complexity-router tier filtering, so the final reference should point to/add the complexity-router config key instead.

Useful? React with 👍 / 👎.

@krrish-berri-2
krrish-berri-2 merged commit 066778d into main Jul 15, 2026
3 checks passed
@krrish-berri-2
krrish-berri-2 deleted the claude/router-plugins-docs-d2f4a7 branch July 15, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants