mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 02:03:42 +00:00
Migrate zai provider from Anthropic to OpenAI-compatible API
- Migrate glm-4.5, glm-4.5-air, glm-4.5-flash, glm-4.6, glm-4.7 from anthropic-messages to openai-completions API - Updated baseUrl from https://api.z.ai/api/anthropic to https://api.z.ai/api/coding/paas/v4 - Added compat setting to disable developer role for zai models - Filter empty text blocks in openai-completions to avoid zai API validation errors - Fixed zai provider tests to use OpenAI-style options (reasoningEffort)
This commit is contained in:
parent
65fb9116fb
commit
0250b7ac03
4 changed files with 34 additions and 29 deletions
|
|
@ -556,7 +556,7 @@ describe("Generate E2E Tests", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.ZAI_API_KEY)("zAI Provider (glm-4.5-air via Anthropic Messages)", () => {
|
||||
describe.skipIf(!process.env.ZAI_API_KEY)("zAI Provider (glm-4.5-air via OpenAI Completions)", () => {
|
||||
const llm = getModel("zai", "glm-4.5-air");
|
||||
|
||||
it("should complete basic text generation", { retry: 3 }, async () => {
|
||||
|
|
@ -572,11 +572,11 @@ describe("Generate E2E Tests", () => {
|
|||
});
|
||||
|
||||
it.skip("should handle thinking mode", { retry: 3 }, async () => {
|
||||
await handleThinking(llm, { thinkingEnabled: true, thinkingBudgetTokens: 2048 });
|
||||
await handleThinking(llm, { reasoningEffort: "medium" });
|
||||
});
|
||||
|
||||
it("should handle multi-turn with thinking and tools", { retry: 3 }, async () => {
|
||||
await multiTurn(llm, { thinkingEnabled: true, thinkingBudgetTokens: 2048 });
|
||||
await multiTurn(llm, { reasoningEffort: "medium" });
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue