auto-model-router 0.19.0 → 0.20.0

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.
@@ -13,8 +13,8 @@ import { RESPONSES_ONLY_PARAMS, parseResponsesRequest } from "../src/wire/openai
13
13
  * dispatch. The first block holds representative bodies for harnesses that
14
14
  * could not be run here (Cline/Roo/Kilo) or that illustrate a header set; the
15
15
  * second block parses requests actually captured with tools/capture-proxy.ts
16
- * (Aider, OpenCode, Codex). A harness release that changes its shape belongs
17
- * here as a refreshed capture.
16
+ * (Aider, OpenCode, Codex, and Cline before and after `connect` configured it).
17
+ * A harness release that changes its shape belongs here as a refreshed capture.
18
18
  */
19
19
 
20
20
  const MUT: UpstreamMutations = { slug: "x/y", fallbacks: [], sessionId: "s", cacheBreakpointMessageIndices: [], reasoning: undefined, maxTokens: undefined, stripAssistantReasoning: false };
@@ -144,6 +144,17 @@ describe("captured harness requests", () => {
144
144
  expect("stream_options" in req.renderUpstreamBody(MUT)).toBe(false);
145
145
  });
146
146
 
147
+ // The same CLI after `connect --harness cline`. `settings.headers` in Cline's
148
+ // provider store has no CLI flag, so this capture is the proof that writing the
149
+ // file (rather than shelling out to `cline auth`) is what earns the harness id.
150
+ test("cline cli 3.0 configured by connect: the same request, now carrying the harness id and scope", async () => {
151
+ const f = await fixture("cline-cli-connected");
152
+ const req = parseChatRequest(structuredClone(f.body), new Headers(f.headers));
153
+ expect(req.harnessId).toBe("cline");
154
+ expect(f.headers["x-agentdox-scope"]).toBe("omp-router");
155
+ expect(req.tools.map((t) => t.name)).toContain("read_files");
156
+ });
157
+
147
158
  test("kilo cli 7.5: an OpenCode-derived request with the harness header and OpenCode tool names", async () => {
148
159
  const f = await fixture("kilo");
149
160
  const req = parseChatRequest(structuredClone(f.body), new Headers(f.headers));
@@ -30,7 +30,7 @@ const out = flag("--out", "test/fixtures/harness");
30
30
  const name = flag("--name", "harness");
31
31
  mkdirSync(out, { recursive: true });
32
32
 
33
- const KEEP_HEADERS = ["content-type", "user-agent", "x-omp-harness", "x-omp-session", "x-omp-subagent", "x-title", "http-referer"];
33
+ const KEEP_HEADERS = ["content-type", "user-agent", "x-omp-harness", "x-omp-session", "x-omp-subagent", "x-agentdox-scope", "x-agentdox-origin", "x-title", "http-referer"];
34
34
  let n = 0;
35
35
 
36
36
  /** Large text is not what the fixture guards; cap message text so files stay small. */