From Router
Native model and effort routing within your provider. Anthropic, DeepSeek, z.ai, MiniMax, MiMo and Kimi defaults, custom provider profiles, classifier advice and one model per subagent.
15 events · 36 calls
Ships in Router. Installing the plugin adds it to Claude Code.
A mod runs inside Claude Code as you, unsandboxed. This is what its source calls.
http.fetchfs.writefs.existsfs.listfs.readfs.statenv.getsettings.readcommand.runprompt.submitprompt.submitEach event it registers a hook on, with the matcher when it sets one
session.startsession.attachcommand.run{command=model}config.set{key=model}classic.PostModelSwitchcommand.run{command=router}prompt.autocompleteturn.startprompt.submitagent.spawnturn.stepturn.completeclassic.StopFailuresession.compactsession.endui.render{component=Spinner}ui.render{component=SessionMode}ui.render{component=Placed}ui.render{component=AbovePrompt|Pane}Every mods API method its source calls, by namespace
listaftersleepregisterrungetexistslistreadstatwritefetchsubmitcwdidmessagesmodelrootsurfacesusageversionreadgetsetdeletegetkeyssetclosecopylogopenplaceresolvetoastviewANTHROPIC_BASE_URLCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASCLAUDE_CODE_PROMPT_CACHE_TTLCLAUDE_CODE_SUBAGENT_MODELCLAUDE_CODE_SUBAGENT_MODEL_FORCECLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTLCLAUDE_CODE_USE_BEDROCKCLAUDE_CODE_USE_FOUNDRYCLAUDE_CODE_USE_VERTEXCLAUDE_CONFIG_DIRCLAUDE_PLUGIN_OPTION_CLOUDFLARE_ACCOUNT_IDCLAUDE_PLUGIN_OPTION_CLOUDFLARE_API_TOKENCLAUDE_PLUGIN_OPTION_OPENAI_API_KEYCLAUDE_PLUGIN_OPTION_TYPESAFE_API_KEYCLAUDE_PLUGIN_OPTION_VALAR_API_KEYCLAUDE_ROUTER_PROVIDERCLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKENENABLE_PROMPT_CACHING_1HWhere Claude Code finds the mod
hooks/hooks.jsonhooks/native-router.mjs (written ./native-router.mjs)Read from the source, never run. Claude Code checks a mod again when it loads it and can refuse code this reading accepts; claude plugin validate shows its own list.
FORCE_PROMPT_CACHING_5MHOMEOPENAI_API_KEYTYPESAFE_API_KEYVALAR_API_KEYnpx claudepluginhub alexei-led/claude-router --plugin router