Jev Model Routing logo

Jev Model Routing

CommunityPopular
kerpopule
jev-model-routing

Use to pick the cheapest good-enough model or effort for a turn or a delegated task (lanes small to escalate), to decide continue/retry/verify/escalate/complete after each cycle, or to tune routing.

Overview

Publisherkerpopule
Repositoryhermes-jev-skills
Skill namejev-model-routing
Stars
1K
Forks
103
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by kerpopule on GitHub. Read the source before you install it.

Installation

Install the Jev Model Routing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/kerpopule/hermes-jev-skills/tree/main/skills/jev-model-routing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kerpopule/hermes-jev-skills.git /tmp/hermes-jev-skills
mkdir -p .claude/skills
cp -r /tmp/hermes-jev-skills/skills/jev-model-routing .claude/skills/jev-model-routing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Jev Model Routing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Jev Model Routing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Jev Model Routing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Model routing with Jev

Jev reads a turn and answers three questions in one ~0.4 s request: how hard is it, what kind of work is it, and would a mistake be costly. Code then walks your pool for that tier and specialty and takes the first model that fits (images, context size). You do not pick models by feel; you ask.

On Hermes it is automatic

With the hermes-jev plugin enabled, each fresh user turn is routed once, before the first model call. Tool-loop follow-ups reuse that decision. Switches, per profile:

/jev                    status
/jev routing shadow     decide and log, but do not switch (start here)
/jev routing on         switch models
/jev routing off
/jev notice on          show "[Jev] medium · coding → kimi-k2.7-code · confidence 0.97" on routed replies

A plugin can swap the model, not the provider connection. On OpenRouter that still means every vendor (DeepSeek, GLM, Kimi, MiniMax, Grok, Qwen, Gemini, GPT). If you run /model yourself, your choice wins and Jev stays out of the way.

For a Hermes custom provider, the plugin cannot infer the backing models.dev provider. It now keeps the current model and logs custom provider needs an explicit provider_aliases.custom instead of blaming an unrelated pool. If and only if that endpoint actually serves the pool's models, set "provider_aliases": {"custom": "venice"} (replace venice with the real pool prefix) in routing.json. Check the endpoint and every pool model before enabling routing; an alias is an operator assertion, not cross-provider discovery. This does not edit any live routing mode.

Asking directly (any agent)

Before delegating a task or spawning a sub-agent, ask which model should get it:

bash
jev route --prompt "<the task, in the person's words>" --current "<provider:model you are on>"

Use model_id from the reply. routed: false means stay where you are; reason says why. Relay notice if the person likes to see routing.

Lanes: delegating a task, and every step after it

For work you hand to a sub-agent or worker, finish with the smallest model and lowest effort that still gets it right. Jev decides; it never writes code, patches or designs.

bash
jev lane classify --task "<the work, in the person's words>"        # first lane + model/effort
jev lane step --task "..." --lane <lane> --attempt <n> \
    --run "<test cmd>" --run "<lint/typecheck cmd>" --scope "<path glob>"   # after each cycle
LaneClaude Code (subagent)Hermes Kanban card (default map)
smalljev-lane-small: Haiku, lowgpt-5.6-luna, medium
mediumjev-lane-medium: Sonnet, mediumgpt-6-sol, medium (today's default)
highjev-lane-high: Opus, mediumgpt-6-sol, medium
escalatejev-lane-escalate: Opus, highgpt-6-astra, high

jev lane targets --host hermes shows the map in force; <hermes root>/jev/lanes.json (or ~/.config/jev/lanes.json) overrides any field. The Hermes map was calibrated on one fleet's own history (see docs/lanes.md); re-measure yours with jev lane replay-build / replay-report.

  • One request, all questions. classify asks the lane (with an other escape: work a person should see first), security sensitivity and underspecification together. Code applies the thresholds: a small pick needs 0.7 confidence; a medium pick below 0.5 goes to high; security ≥ 0.7 is at least high. keep_current means keep the model you had (do it yourself, or ask).
  • Code first. A model the person named, two failed attempts, or your own security-path check decide without asking Jev.
  • Deterministic checks first. step runs the tests, compiler, type checker and linter you name and reads git diff. A failing check is retry (and escalate once the same lane failed twice); files outside --scope are retry; unrun checks are verify; security files changed on small/medium are escalate. Jev is asked only what is left: is it implemented, is it in scope, what next.
  • Escalate one lane at a time, on evidence only. escalate from the top lane returns person.
  • Complete is earned. complete is refused (becomes verify, with complete_refused) unless the checks ran and passed and the diff stayed in scope. Say when a check failed; never hide it.
  • Only the tail of each long check output goes to Jev. Never compact or filter the agent's own reasoning.
  • Jev down: classify keeps the current model, step says verify.

On Hermes, jev lane shadow (from cron) classifies new Kanban cards and logs what it would choose; /jev lanes shadow|on|off is the switch and <hermes root>/jev/LANES_OFF wins. on sets the card's model and effort before dispatch; turn it on only after jev lane shadow-report shows fewer tokens at the same first-try success, and with the owner's yes.

The pools

jev models list shows every model this machine can call (the models.dev catalog, filtered to providers you hold a key or login for) with price, context and abilities. Pools live in ~/.hermes/jev/routing.json (or ~/.config/jev/routing.json):

json
{"tiers": {"simple": {"general": ["openrouter:deepseek/deepseek-v4.1-flash"], "coding": ["..."]},
           "medium": {"general": ["..."], "coding": ["..."], "research": ["..."], "writing": ["..."], "vision": ["..."]},
           "hard":   {"general": ["..."], "coding": ["..."]}},
 "exclude": ["*:free"], "private_profiles": ["billing"], "mode": "redacted-text"}
  • jev models suggest --write creates a first draft from price bands. Then edit: order matters, first fit wins.
  • Specialties are general, coding, writing, research, vision. A missing specialty falls back to general. A pool never falls down a tier, only up.
  • When the person names a model they like for something, put it first in that pool. Do not invent model ids: copy them from jev models list --search <name>.

Guarantees you can rely on

  • Hard is earned: it needs real probability mass on "substantial" or "expert" (0.6 by default), read from the per-level spread Jev returns, never from an averaged score.
  • Unsure is not hard. An unsure answer about a harmless turn keeps the current model; about a risky turn it picks medium.
  • Risk words (production, delete, migration, security, payment, legal…) set a floor of medium, however short the prompt. They do not buy the hard tier on their own.
  • Jev judges the ask: a long turn is read as its opening plus, mostly, its end (ask_chars). Boilerplate in the middle is not what gets scored.
  • Reasoning effort is off by default and only writes the standard reasoning_effort field when routing is on. Opt in with an exact provider:model capability map, for example "effort": {"enabled": true, "levels": ["low", "medium", "high", "high"], "models": {"openrouter:your-verified-model-id": ["low", "medium", "high"]}}. Replace the example ID with a model actually verified to accept those levels; xhigh is not presumed supported. The requested level must appear in the exact model's allowed list, and an existing reasoning_effort or extra_body.reasoning always wins. Shadow/off never mutate requests. The pick reuses the routing difficulty answer without another Jev call; unsupported or malformed configuration fails open. No fleet effort setting or live routing is activated by installation.
  • Template turns are not routed: anything starting with a skip_prefixes entry ([kanban], [SESSION HANDOFF…) or from a skip_session_prefixes session (cron) keeps the model its profile or job was configured with.
  • Large context (strictly above sticky_context_tokens, ~32k by default): never switches to a cheaper model, because rebuilding the prompt cache costs more than it saves. If either model has no catalog price, it conservatively keeps the current model too. Cache keys include the exact side of this guard, not only a coarse context bucket.
  • Opt-in effort routing cannot undercut the resolved routing tier: medium floors the difficulty bucket at routine, hard at substantial. An unsure kept decision also gets at least routine. A large-context keep preserves the resolved floor through effort_tier without triggering a model switch or escalation. Explicit caller effort and exact-model capability checks still win.
  • Turns that look like they contain secrets, and any profile listed in private_profiles, send Jev only coarse features (length, code present, risk words), never text. Those turns, and a profile with mode: features, also opt out of the merged request below.
  • Its three questions normally travel in the same request as skill selection's stage 1 (jevkit/turn.py), because Jev charges per request and not per question, and the connection underneath is pooled (a fresh TLS session per call used to be ~275 ms of the ~520 ms a decision cost). Measured live 2026-09-21/22: one question ~180-250 ms warm, and 1784 ms → 672 ms per turn that needs both, 3 requests → 2. Each feature still reads its own answers through its own thresholds. /jev merge_requests off separates them again.
  • Jev down, slow (2.5 s budget) or malformed: current model, no delay beyond the budget. An answer that contradicts itself — a spread that does not cover the options, mass that does not sum to one, a chosen option that is not the maximum, a score that disagrees with its own distribution — is refused as invalid_response and lands here too.

Tuning

Decisions are logged without prompt text to <hermes home>/logs/jev-decisions.jsonl. Run in shadow for a day, read which tier real turns land in, then move models between pools. Change thresholds from your own traces, never from a hunch.

Frequently asked questions

What does the Jev Model Routing AI skill do?

Use to pick the cheapest good-enough model or effort for a turn or a delegated task (lanes small to escalate), to decide continue/retry/verify/escalate/complete after each cycle, or to tune routing.

Why use Jev Model Routing on TypingMind?

Because you install it once and use it with any model. Jev Model Routing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Jev Model Routing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/kerpopule/hermes-jev-skills/tree/main/skills/jev-model-routing. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Jev Model Routing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Jev Model Routing?

As many as you like. As long as a model supports skills, you can use Jev Model Routing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Jev Model Routing AI skill free?

Yes. It is published on GitHub by kerpopule under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇