feat: add Zhipu AI (GLM) model provider support

Adds zhipuai as a new provider using the OpenAI-compatible API at
api.z.ai. Supports api_key config or ZHIPUAI_API_KEY env var, with
optional endpoint override.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-02-09 09:55:13 -08:00
parent ffa63a435e
commit 1d126cddfb
5 changed files with 22 additions and 2 deletions
+9
View File
@@ -87,6 +87,15 @@ describe('createClientFromConfig', () => {
expect(client).toBeInstanceOf(OpenAIClient);
});
it('creates OpenAIClient with Zhipu AI baseURL for zhipuai provider', () => {
const client = createClientFromConfig({
provider: 'zhipuai',
model: 'glm-4.5',
api_key: 'test-key',
});
expect(client).toBeInstanceOf(OpenAIClient);
});
it('creates BedrockClient for bedrock provider', () => {
const client = createClientFromConfig({
provider: 'bedrock',