feat: per-model max output tokens and a conversation-time thinking level backed by agent settings (#28)

Co-authored-by: Alice <alice@prismshadow.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-22 22:22:41 +08:00
committed by GitHub
parent 99f391f379
commit cabbab1c16
36 changed files with 797 additions and 42 deletions
+12
View File
@@ -67,6 +67,18 @@ describe("toRow (DTO → row edit state)", () => {
expect(row.provider).toBe("openrouter");
expect(row.modelId).toBe("xiaomi/mimo-v2.5");
});
it("carries the per-model max output tokens through; absent = '' (inherit the Agent setting)", () => {
const capped = toRow({
provider: "custom",
modelId: "local-qwen",
maxTokens: 8000,
isDefault: false,
});
expect(capped.maxTokens).toBe("8000");
const plain = toRow({ provider: "custom", modelId: "local-qwen", isDefault: false });
expect(plain.maxTokens).toBe("");
});
});
describe("nextPointers (where the default/vision-agent model pointers land after save; always paired)", () => {