Skip to content

Add Custom routers documentation page#256

Open
hongyi-chen wants to merge 5 commits into
mainfrom
docs/custom-routers
Open

Add Custom routers documentation page#256
hongyi-chen wants to merge 5 commits into
mainfrom
docs/custom-routers

Conversation

@hongyi-chen

Copy link
Copy Markdown
Collaborator

Summary

Adds a standalone Custom routers documentation page under Inference & providers, and cross-references it from related pages.

Custom routers let users define a router that automatically selects a concrete model for each task, using either complexity-based or rule-based routing. Admins can publish team-synced routers to an entire team (Enterprise).

Changes

  • New page agent-platform/inference/custom-routers.mdx - how routing works, the two routing types (complexity-based and rule-based), creating a router in settings, authoring routers as YAML files, selecting a router from the model picker, team-synced routers for Enterprise admins, and credit/availability behavior.
  • Model choice - added an intro mention and a short "Custom routers" subsection linking to the new page.
  • Sidebar - new entry in src/sidebar.ts under Inference & providers, after Model choice.
  • Admin Panel - brief pointer added to the Models settings section.

Notes for reviewers

  • Naming follows the current product copy: Custom routers, with Complexity-based and Rule-based routing. If the in-app labels differ at publish time, align the page and sidebar label to match.
  • No screenshots are included in this first draft.
  • style_lint --changed passes for the new page. Two pre-existing screenshot-width warnings on unrelated figures in model-choice.mdx and admin-panel.mdx are left unchanged.

Conversation: https://staging.warp.dev/conversation/2a9a2183-616a-474c-bad3-36ea7a1a813b
Run: https://oz.staging.warp.dev/runs/019f0024-3ae2-7680-bebe-e15a191fee16
Plans:

This PR was generated with Oz.

Add a standalone Custom routers page under Inference & providers covering
complexity-based and rule-based routing, creating routers in settings or as
YAML files, selecting them from the model picker, and team-synced routers for
Enterprise admins. Cross-reference the page from Model choice, the sidebar, and
the Admin Panel Models section.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jun 25, 2026
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jun 25, 2026 8:44pm

Request Review

Tighten the intro, sharpen Key features labels, smooth a few sentences, and
remove minor redundancy.

Co-Authored-By: Oz <oz-agent@warp.dev>
@hongyi-chen hongyi-chen marked this pull request as ready for review June 25, 2026 19:26
@oz-for-oss

oz-for-oss Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@hongyi-chen

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This PR adds a new Custom routers documentation page, links it from Model choice and Admin Panel docs, and adds the page to the Inference & providers sidebar. The structure and YAML examples mostly match the implementation, and I did not find security or spec-alignment issues.

Concerns

  • The Warp app currently exposes the router type dropdown as Complexity and Prompt, with prompt rules labeled Description and Model; the draft documents Complexity-based, Rule-based, and Classification prompt, which would send readers looking for UI labels that are not present.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment on lines +51 to +54
3. Under **Routing type**, choose **Complexity-based** or **Rule-based**.
4. Configure the routing:
* **Complexity-based** - Select a **Default** model, then assign models to **Easy**, **Medium**, and **Hard**.
* **Rule-based** - Select a **Default model**, then click **Add rule** for each rule, write a **Classification prompt** describing when to use the model, and select the model. Rules are matched top to bottom, so order them by precedence.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] These labels do not match the current router editor UI: the dropdown options are Complexity and Prompt, prompt rules use Description and Model, and the button is + Add rule.

Suggested change
3. Under **Routing type**, choose **Complexity-based** or **Rule-based**.
4. Configure the routing:
* **Complexity-based** - Select a **Default** model, then assign models to **Easy**, **Medium**, and **Hard**.
* **Rule-based** - Select a **Default model**, then click **Add rule** for each rule, write a **Classification prompt** describing when to use the model, and select the model. Rules are matched top to bottom, so order them by precedence.
3. Under **Routing type**, choose **Complexity** or **Prompt**.
4. Configure the routing:
* **Complexity** - Select a **Default** model, then assign models to **Easy**, **Medium**, and **Hard**.
* **Prompt** - Select a **Default model**, then click **+ Add rule** for each rule, enter a **Description** for when to use the model, and select the **Model**. Rules are matched top to bottom, so order them by precedence.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i'll keep this as is since we'll be changing the copy afterwards

Document that router targets must be Warp-supported models (custom inference
endpoint models can't be targets) and that, like Auto models, custom routers
consume Warp credits and don't use your BYOK keys.

Co-Authored-By: Oz <oz-agent@warp.dev>
Update the example routers to current models (Claude Opus 4.8, Claude Sonnet
4.6) and add Claude Opus 4.8 to the Model choice table.

Co-Authored-By: Oz <oz-agent@warp.dev>
default: claude-4-6-sonnet-high
routing:
- description: debugging or fixing failing tests
model: claude-4-8-opus-high

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

might wanna link out to the page that lists out the model IDs? https://docs.warp.dev/agent-platform/inference/model-choice/#available-models

(just realized that page is missing some entries)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good call — updated the examples to link to the model IDs list (/agent-platform/inference/model-choice/#available-models) in 599d4ed. Opening a separate PR to add the missing public model entries to that page.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

updated and added some missing OSS models


A custom router resolves to a concrete model, so credit usage matches whichever model the router selects for each task. See [Credits](/support-and-community/plans-and-billing/credits/) for how credits are consumed.

Like Warp's built-in Auto models, custom routers consume Warp credits and don't draw on your own provider keys, even if you've configured [Bring Your Own API Key (BYOK)](/agent-platform/inference/bring-your-own-api-key/). To run a model on your own key, select that model directly instead of a router.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm actually not sure about this - need to check lol

@szgupta szgupta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

generally lgtm

Point the model_id reference to the Model choice #available-models section so
readers can quickly find valid model IDs.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants