fix(agent): reject padded assistant model ids

This commit is contained in:
ginnoir committed 2026-07-08 16:39:01 -05:00
1 parent 9b7a04431c
commit 3983c30fe1
2 files changed
+9 -1

No files matched your search

+9
View File
@@ -43,4 +43,13 @@ describe("clientChatInputSchema", () => {
assert.equal(parsed.success, false);
});
it("rejects whitespace-padded model IDs", () => {
const parsed = clientChatInputSchema.safeParse({
model: " qwen2.5-coder ",
messages: [{ role: "user", content: "hello" }],
});
assert.equal(parsed.success, false);
});
});