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:
Mario Zechner 2025-09-07 00:09:15 +02:00
parent 9230b83d94
commit d073953ef7
6 changed files with 299 additions and 26 deletions

View file

@ -106,6 +106,7 @@ export function getApiKey(provider: any): string | undefined {
cerebras: "CEREBRAS_API_KEY",
xai: "XAI_API_KEY",
openrouter: "OPENROUTER_API_KEY",
zai: "ZAI_API_KEY",
};
const envVar = envMap[provider];