Instructions to use scombat/s1d1-router with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use scombat/s1d1-router with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="scombat/s1d1-router")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("scombat/s1d1-router") model = AutoModelForSequenceClassification.from_pretrained("scombat/s1d1-router", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tutorials/03-claude-code.md from scombat/s1d1-router: direct link, hf CLI and curl.
- Browser
- Download file 2.89 kB
-
https://huggingface.co/scombat/s1d1-router/resolve/main/tutorials/03-claude-code.md
- Command line
-
hf download hf://scombat/s1d1-router/tutorials/03-claude-code.md
-
curl -L -o 03-claude-code.md https://huggingface.co/scombat/s1d1-router/resolve/main/tutorials/03-claude-code.md
Claude Code
Facts from the Claude Code documentation (2026-10-15):
- Model:
--model,/model,ANTHROPIC_MODEL,modelin settings; aliaseshaiku,sonnet,opus,fable,opusplan(Opus in plan mode, Sonnet to execute);CLAUDE_CODE_SUBAGENT_MODEL; a sub-agent can pinmodelandeffortin its frontmatter. - Effort:
--effort,/effort,CLAUDE_CODE_EFFORT_LEVEL,effortLevelin settings; levelslow,medium,high,xhigh,max(maxnot accepted ineffortLevel);ultrathinkin a prompt raises depth for one turn. - Gateway:
ANTHROPIC_BASE_URL+ANTHROPIC_AUTH_TOKEN. Anthropic does not support routing Claude Code to non-Claude models through a gateway: keep the pool to Claude models. - With
CLAUDE_CODE_GATEWAY_HINT_HEADERS=1(v2.1.273+) a custom gateway receivesx-claude-code-session-id,x-claude-code-prompt-id(one id per user prompt),x-claude-code-request-class(main,subagent,workflow,compaction,auxiliary).
1. Simplest: choose at launch (documented flags, router untested)
python integrations/serve.py --model scombat/s1d1-router --policy integrations/policy.example.yaml &
python integrations/routed.py claude "refactor the parser and add tests"
routed.py asks the router about your first prompt and starts claude --model <model> --effort <effort> "<prompt>".
The session keeps that model; use /model and /effort to change it. Nothing is intercepted.
2. Per request, through a gateway (untested end to end)
export ANTHROPIC_BASE_URL=http://localhost:4000
export ANTHROPIC_AUTH_TOKEN=<litellm key>
export CLAUDE_CODE_GATEWAY_HINT_HEADERS=1
claude --model s1d1-auto
with the LiteLLM hook of 02-litellm.md (A). The hook routes on the last human text of the request (tool results are
skipped), remembers one decision per x-claude-code-prompt-id, and leaves auxiliary requests alone.
Cautions from the gateway guide:
- keep forwarding
anthropic-beta/anthropic-versionand thesystemarray unchanged; do not rewrite bodies exceptmodeland the effort field; - changing the model between turns can make the API reject old thinking blocks ("bound to a different conversation"); Claude Code then drops earlier thinking and retries, at the price of the cache. This is why the policy is escalate-only per session;
- a rejected
output_config.effortis retried without it by Claude Code.
3. No router at all: the same policy as static settings
{
"model": "sonnet",
"effortLevel": "medium",
"availableModels": ["haiku", "sonnet", "opus", "fable"]
}
plus CLAUDE_CODE_SUBAGENT_MODEL=haiku for exploration sub-agents, a sub-agent frontmatter with model: haiku and
effort: low for cheap searches, and opusplan to plan with Opus and execute with Sonnet. The router replaces these
fixed choices with a choice per prompt.