fix(agent): reject padded assistant model ids
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user