fix(agent): reject padded assistant model ids

This commit is contained in:
ginnoir
2026-07-08 16:39:01 -05:00
parent 9b7a04431c
commit 3983c30fe1
2 changed files with 9 additions and 1 deletions
+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);
});
});