Skip to content

docs: document the Jev complexity router classifier - #1525

Merged
mateo-berri merged 4 commits into
mainfrom
litellm_jev_complexity_classifier_docs
Sep 18, 2026
Merged

mateo-berri merged 4 commits into
mainfrom
litellm_jev_complexity_classifier_docs

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a "Jev classifier (TypeSafe AI)" section to docs/auto_router/setup.md for the classifier_type: jev shipped by BerriAI/litellm#41615. It covers the jev_classifier_config fields (model, api_key with the TYPESAFE_API_KEY fallback, api_base with the TYPESAFE_API_BASE fallback, timeout_ms, instructions, the circuit breaker settings), the rule that api_base needs an explicit api_key so the proxy's TypeSafe key is only sent to TypeSafe's host, that team members cannot set either through the management API, how tier labels become the choice criteria, the classifier_probabilities, classifier_confidence, classifier_model and classifier_cost fields on the routing decision, and that failures fall back the same way the LLM classifier does. Links to the pass-through page from #1524

Resolves LIT-7975

User Flow

Before: an operator setting up the complexity router finds no way to pick Jev as the classifier

  1. They open https://docs.litellm.ai/docs/auto_router/setup and read the classifier section: it describes the heuristic and LLM classifiers only
  2. They search the page for jev or TypeSafe and get no match, so they do not learn that classifier_type: jev exists or which jev_classifier_config fields it takes
  3. They fall back to reading the litellm source to find the field names and the credential rules

After: the page walks them through the Jev classifier

  1. They open https://docs.litellm.ai/docs/auto_router/setup and find the "Jev classifier (TypeSafe AI)" section under the classifier docs
  2. It shows the classifier_type: jev block with every jev_classifier_config field and its default, the TYPESAFE_API_KEY and TYPESAFE_API_BASE fallbacks, and the rule that api_base needs an explicit api_key
  3. It names the routing decision fields they will see in the spend log (cause: jev_classifier, classifier_model, classifier_probabilities, classifier_confidence, classifier_cost) and links to the pass-through page for direct Jev calls

Screenshots / Proof of Fix

Before (docs main, the live site)

curl -sS https://docs.litellm.ai/docs/auto_router/setup | grep -ci 'jev'
0

The page's classifier section ends after the LLM classifier, with no Jev entry

pr1525-0795383711-docs1525_before.png

pr1525-0795383711-docs1525_before_section.png

After (0795383, local docusaurus build of this branch, with 5c74859 on top: a one-sentence wording change inside the same section that cannot change what the screenshots show; the Vercel preview is login-protected)

npm run start from this branch serves the page with the "Jev classifier (TypeSafe AI)" section: the config block, the credential rules, the spend-log fields, the fallback behavior, and the link to the pass-through page

pr1525-0795383711-docs1525_tip_local.png

pr1525-0795383711-docs1525_tip_local_section.png

Dependents checked: no sidebar change (only docs/auto_router/setup.md moves, and the structure, writing-style, and Vercel checks are green at the tip), the /docs/pass_through/typesafe link target is on docs main since #1524 merged, and litellm's env-var docs check already passes for TYPESAFE_API_KEY and TYPESAFE_API_BASE through that page

Caveats

Low

  • The section documents feat(router): add TypeSafe Jev as a complexity router classifier litellm#41615, which is landing right behind this merge; if that PR never ships, this section is a one-file revert
  • The config block shows every field with its default, including api_key: null and api_base: null; the prose right under it explains the fallbacks, so a reader copying the block as is gets the environment-key behavior

Link to Devin session: https://app.devin.ai/sessions/b8ce9e101c644969abb9bcc9dfa2c333
Open in Devin Desktop: https://app.devin.ai/desktop/session/b8ce9e101c644969abb9bcc9dfa2c333?variant=devin
Requested by: @mateo-berri


Note

Low Risk
Documentation-only change with no runtime or security behavior impact.

Overview
Adds a Jev classifier (TypeSafe AI) section to the Auto Router setup guide, documenting classifier_type: jev alongside the existing heuristic and LLM classifier notes.

The new section includes a full jev_classifier_config example, env fallbacks (TYPESAFE_API_KEY, TYPESAFE_API_BASE), the rule that custom api_base requires an explicit api_key, management-API restrictions on credentials, spend-log fields (jev_classifier, probabilities, confidence, cost), LLM-classifier-style fallbacks, and compatibility with tier_definitions / enable_non_reasoning_tier. It links to the TypeSafe pass-through docs.

Reviewed by Cursor Bugbot for commit 5c74859. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
litellm Ready Ready Preview Sep 18, 2026 12:32am UTC

Request Review

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5c74859. Configure here.

@mateo-berri mateo-berri 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.

LGTM

@mateo-berri
mateo-berri merged commit 1785d6d into main Sep 18, 2026
5 checks passed
@mateo-berri
mateo-berri deleted the litellm_jev_complexity_classifier_docs branch September 18, 2026 00:36

This branch was successfully deployed

1 active deployment
Preview — 5c74859b Deployed Sep 18, 2026 by vercel[bot]
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.

1 participant