@alexeiled/claude-router 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "router",
|
|
3
3
|
"displayName": "jev-router",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"description": "Auto-picks the right Claude model for each turn — small models for quick edits, mid-tier for code, frontier for hard problems. Uses Jev to classify each request.",
|
|
6
6
|
"author": { "name": "Alexei Ledenev", "url": "https://github.com/alexei-led" },
|
|
7
7
|
"repository": "https://github.com/alexei-led/claude-router",
|
package/docs/configuration.md
CHANGED
|
@@ -22,7 +22,8 @@ starts it again.
|
|
|
22
22
|
{
|
|
23
23
|
"model": "jev-router[1m]",
|
|
24
24
|
"env": {
|
|
25
|
-
"ANTHROPIC_BASE_URL": "http://127.0.0.1:43170"
|
|
25
|
+
"ANTHROPIC_BASE_URL": "http://127.0.0.1:43170",
|
|
26
|
+
"ENABLE_TOOL_SEARCH": "true"
|
|
26
27
|
},
|
|
27
28
|
"modelPicker": {
|
|
28
29
|
"options": [
|
|
@@ -37,6 +38,11 @@ starts it again.
|
|
|
37
38
|
}
|
|
38
39
|
```
|
|
39
40
|
|
|
41
|
+
With a custom `ANTHROPIC_BASE_URL`, Claude Code turns tool search off: every
|
|
42
|
+
MCP tool schema goes into each request, about 50K tokens with the claude.ai
|
|
43
|
+
connectors. `ENABLE_TOOL_SEARCH` keeps the schemas deferred, as with the
|
|
44
|
+
Anthropic API; `/context` lists them as "MCP tools (deferred)".
|
|
45
|
+
|
|
40
46
|
The `modelPicker` row adds `Jev Router (auto)` to the `/model` picker, next to the
|
|
41
47
|
built-in rows. `behavesAs` maps `jev-router` to a model that Claude Code knows.
|
|
42
48
|
Without it, Claude Code rejects `jev-router` because the model is not in its
|
package/package.json
CHANGED
package/skills/setup/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup
|
|
3
|
-
description: Point Claude Code at the router gateway. Adds `model` with the 1M window, `ANTHROPIC_BASE_URL
|
|
3
|
+
description: Point Claude Code at the router gateway. Adds `model` with the 1M window, `ANTHROPIC_BASE_URL`, tool search and the `/model` picker row to the user settings, and offers the status line.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
allowed-tools: Read, Edit, Write
|
|
6
6
|
---
|
|
@@ -12,6 +12,7 @@ Configure Claude Code for the router gateway. This session does not use the gate
|
|
|
12
12
|
3. Prepare the new settings object in memory:
|
|
13
13
|
- `model`: `"jev-router[1m]"`. Claude Code does not know the model `jev-router` and assumes a 200K window; the `[1m]` suffix declares 1M. Claude Code strips the suffix before it sends the request. If `router.json` routes no model with a 1M `contextWindow`, use `"jev-router"`.
|
|
14
14
|
- `env.ANTHROPIC_BASE_URL`: `"http://127.0.0.1:43170"`. If `router.json` sets `gateway.port`, use that port.
|
|
15
|
+
- `env.ENABLE_TOOL_SEARCH`: `"true"`. With a custom `ANTHROPIC_BASE_URL`, Claude Code turns tool search off and loads every MCP tool schema into each request (about 50K tokens with the claude.ai connectors). This key keeps the schemas deferred, as with the Anthropic API.
|
|
15
16
|
- Remove `env.CLAUDE_CODE_MAX_CONTEXT_TOKENS`. Older versions of this setup wrote it; Claude Code ignores it for `jev-router`. The gateway sends a turn only to a model whose window holds the context, and drops the 1M beta header for a model with a smaller window.
|
|
16
17
|
- The `/model` picker row. In `modelPicker.options`, replace the row whose `model` is `"jev-router[1m]"`, `"jev-router"` or `"router"` (the name before 0.4.2), or append it if there is none:
|
|
17
18
|
`{ "model": "jev-router[1m]", "label": "Jev Router (auto)", "description": "Auto-selects the model and effort for each turn", "behavesAs": "claude-opus-5-5" }`.
|
|
@@ -23,7 +24,7 @@ Configure Claude Code for the router gateway. This session does not use the gate
|
|
|
23
24
|
- Restart Claude Code now. Until the restart, this session can show "There's an issue with the selected model (jev-router[1m])", because it still sends requests to Anthropic and not to the gateway.
|
|
24
25
|
- After the restart, the router serves each turn, and `/router:status` shows the routes and the last turn.
|
|
25
26
|
- The status line path contains the plugin version. After a plugin update, run `/router:setup` again.
|
|
26
|
-
- To stop the routing, remove `model`, `env.ANTHROPIC_BASE_URL` and the `jev-router[1m]` row of `modelPicker.options`, and restore the status line command.
|
|
27
|
+
- To stop the routing, remove `model`, `env.ANTHROPIC_BASE_URL`, `env.ENABLE_TOOL_SEARCH` and the `jev-router[1m]` row of `modelPicker.options`, and restore the status line command.
|
|
27
28
|
5. Write the whole object to `~/.claude/settings.json` with one Write call. Do not use a sequence of edits. Do nothing after this step.
|
|
28
29
|
|
|
29
30
|
Do not change any other file.
|