mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 17:01:02 +00:00
feat(ai): Add zAI provider support
- Add 'zai' as a KnownProvider type - Add ZAI_API_KEY environment variable mapping - Generate 4 zAI models (glm-4.5-air, glm-4.5v, etc.) using anthropic-messages API - Add comprehensive test coverage for zAI provider in generate.test.ts and empty.test.ts - Models support reasoning/thinking capabilities and tool calling
This commit is contained in:
parent
9230b83d94
commit
d073953ef7
6 changed files with 299 additions and 26 deletions
|
|
@ -262,4 +262,24 @@ describe("AI Providers Empty Message Tests", () => {
|
|||
await testEmptyAssistantMessage(llm);
|
||||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.ZAI_API_KEY)("zAI Provider Empty Messages", () => {
|
||||
const llm = getModel("zai", "glm-4.5-air");
|
||||
|
||||
it("should handle empty content array", async () => {
|
||||
await testEmptyMessage(llm);
|
||||
});
|
||||
|
||||
it("should handle empty string content", async () => {
|
||||
await testEmptyStringMessage(llm);
|
||||
});
|
||||
|
||||
it("should handle whitespace-only content", async () => {
|
||||
await testWhitespaceOnlyMessage(llm);
|
||||
});
|
||||
|
||||
it("should handle empty assistant message in conversation", async () => {
|
||||
await testEmptyAssistantMessage(llm);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue