@weave-os/router 0.2.33 → 0.2.34

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.
Files changed (2) hide show
  1. package/desktop-shim.js +4 -0
  2. package/package.json +1 -1
package/desktop-shim.js CHANGED
@@ -17,6 +17,9 @@ const tls = require("node:tls");
17
17
 
18
18
  const INTERCEPT_HOST = "api.anthropic.com";
19
19
  const ROUTER_KEY_HEADER = "x-weave-router-key";
20
+ // Desktop's model picker can't list Weave Auto, so Desktop's picks are routed
21
+ // instead of honoring the CLI's passthrough header from ~/.claude/settings.json.
22
+ const MODEL_PASSTHROUGH_HEADER = "x-weave-model-passthrough";
20
23
  // Claude Code's user agent names its entrypoint: "claude-desktop" for the Code
21
24
  // tab, "local-agent" for Cowork.
22
25
  const DESKTOP_USER_AGENT = /[(,]\s*(claude-desktop|local-agent)(?![\w-])/;
@@ -105,6 +108,7 @@ function forward(cfg, req, res) {
105
108
  for (const [name, value] of Object.entries(req.headers)) {
106
109
  if (!HOP_BY_HOP.has(name) && name !== ROUTER_KEY_HEADER) headers[name] = value;
107
110
  }
111
+ if (toRouter) delete headers[MODEL_PASSTHROUGH_HEADER];
108
112
  headers.host = target.host;
109
113
  if (toRouter && cfg.routerKey) headers[ROUTER_KEY_HEADER] = cfg.routerKey;
110
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weave-os/router",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "One-command installer that points Claude Code, Codex, opencode, or pi at the Weave Router. For pi it also ships the routing extension, loaded via pi.extensions.",
5
5
  "bin": {
6
6
  "weave-router": "bin.js",