jan as a router. #7869
tostane
started this conversation in
Feature Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was thinking about this idea claude as I have a small token account and wondered if this was possible?
I was hoping i could get some llms set to swap in as needed i was thinking to use claude to determine which was needed
11:19 PM
That's a smart architecture — using Claude as a "router" to dispatch tasks to the right model based on complexity, cost, or capability. Jan.ai supports multiple models so it's a good fit for this.
The basic idea would look like:
Router Claude (fast/cheap — Haiku) receives the request, classifies it, then hands off to the right model:
Simple Q&A / quick tasks → Haiku (fast, cheap)
Reasoning / coding / analysis → Sonnet
Complex multi-step / hardest problems → Opus
Local/offline tasks or privacy-sensitive → a local model like Llama or Mistral running in Jan
What the router prompt might look like: You'd give Claude a short system prompt like:
"Classify this user request as: simple, moderate, or complex. Respond with only one word."
Then your app logic reads that and routes accordingly.
The catch with Jan.ai is that it's primarily a chat UI — the model-swapping logic would need to live in something you build on top of the API directly (a small script, or a tool like n8n, LangChain, or a simple Python script) rather than inside Jan itself.
Are you thinking of building this as a custom script, or were you hoping Jan could handle the routing natively? That'll shape what the best approach looks like.
Beta Was this translation helpful? Give feedback.
All reactions