feat(agent): route chat through selected model
This commit is contained in:
@@ -25,4 +25,22 @@ describe("clientChatInputSchema", () => {
|
||||
|
||||
assert.equal(parsed.success, false);
|
||||
});
|
||||
|
||||
it("accepts an optional model ID", () => {
|
||||
const parsed = clientChatInputSchema.safeParse({
|
||||
model: "qwen2.5-coder",
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
});
|
||||
|
||||
assert.equal(parsed.success, true);
|
||||
});
|
||||
|
||||
it("rejects invalid model IDs", () => {
|
||||
const parsed = clientChatInputSchema.safeParse({
|
||||
model: "bad model",
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
});
|
||||
|
||||
assert.equal(parsed.success, false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user