Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ export const DEFAULT_CONFIG: ConclaveConfig = {
apiKeyEnv: 'ZAI_API_KEY',
subscription: 'zai-coding',
// the Coding Plan's models, newest first (the first one tests the key); keep in step with providers/catalog.ts
models: ['glm-5.3', 'glm-5.2', 'glm-5.1', 'glm-5', 'glm-5.3-flash', 'glm-4.7', 'glm-4.5-air'],
models: ['glm-5.4', 'glm-5.3', 'glm-5.2', 'glm-5.1', 'glm-5', 'glm-5.3-flash', 'glm-4.7', 'glm-4.5-air'],
},
openrouter: { type: 'openai', baseUrl: 'https://openrouter.ai/api/v1', apiKeyEnv: 'OPENROUTER_API_KEY' },
ollama: { type: 'openai', name: 'Ollama', baseUrl: 'http://127.0.0.1:11434/v1', apiKey: 'ollama', enabled: false },
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/providers/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ export const CATALOG: CatalogEntry[] = [
e('gemini', 'gemini-2.5-flash', 'Gemini 2.5 Flash', 1_048_576, 65_536, 'vtr', [0.3, 2.5, 0.03, 0], 'fast'),

// Z.ai GLM (API list prices; the coding plan is a flat subscription).
e('zai', 'glm-5.3', 'GLM-5.3', M, 128 * K, 'tr', [1.4, 4.4, 0.26, 0], 'deep'),
// docs.z.ai/guides/llm/glm-5.4 (2026-11-24): 1M context, 128K output, image and video input; Coding Plan only, no API price yet, so GLM-5.3's.
e('zai', 'glm-5.4', 'GLM-5.4', M, 128 * K, 'vtr', [1.4, 4.4, 0.26, 0], 'deep'),
e('zai', 'glm-5.3', 'GLM-5.3', M, 128 * K, 'tr', [1.4, 4.4, 0.26, 0], 'smart'),
e('zai', 'glm-5.2', 'GLM-5.2', M, 128 * K, 'tr', [1.4, 4.4, 0.26, 0], 'smart'),
e('zai', 'glm-5.1', 'GLM-5.1', 200 * K, 128 * K, 'tr', [1.4, 4.4, 0.26, 0], 'smart'),
e('zai', 'glm-5', 'GLM-5', 200 * K, 128 * K, 'tr', [1, 3.2, 0.2, 0], 'smart'),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const CLAUDE_ALIASES: Record<string, string> = {
};

/** Preference order for the "deep" alias. */
const DEEP_ORDER = ['claude-opus-5-5', 'gpt-5.5', 'gemini-3.1-pro-preview', 'glm-5.3', 'kimi-k3', 'deepseek-v4-pro', 'qwen3.8-max'];
const DEEP_ORDER = ['claude-opus-5-5', 'gpt-5.5', 'gemini-3.1-pro-preview', 'glm-5.4', 'glm-5.3', 'kimi-k3', 'deepseek-v4-pro', 'qwen3.8-max'];

/** Default provider ids that should win when several serve the same family. */
const FAMILY_HOME: Partial<Record<ModelFamily, string>> = { anthropic: 'anthropic', openai: 'openai', gemini: 'google', zai: 'zai' };
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/config/zai-wire.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('providers.zai moves to Chat Completions at /api/coding/paas/v4', () =>
test('an empty file loads the new default', () => {
const { config } = store(undefined);
expect(config.get().providers.zai).toMatchObject({ type: 'openai', baseUrl: 'https://api.z.ai/api/coding/paas/v4', apiKeyEnv: 'ZAI_API_KEY' });
expect(config.get().providers.zai.models?.[0]).toBe('glm-5.3');
expect(config.get().providers.zai.models?.[0]).toBe('glm-5.4');
});

test('the move runs on load only: a later update or replace back to the shim stays', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/extensions/agent-profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ describe('model tiers resolve per session', () => {
});

test('a provider that lists models offers its first listed deep one', () => {
const h = host({ providers: { z: { type: 'openai', baseUrl: 'https://api.z.ai/api/paas/v4', apiKey: 'k', models: ['glm-4.6', 'glm-5.3'] } } as never, defaultModel: 'z/glm-4.6' });
expect(deepTierModel(h, 'z/glm-4.6')).toBe('z/glm-5.3');
const h = host({ providers: { z: { type: 'openai', baseUrl: 'https://api.z.ai/api/paas/v4', apiKey: 'k', models: ['glm-4.6', 'glm-5.4'] } } as never, defaultModel: 'z/glm-4.6' });
expect(deepTierModel(h, 'z/glm-4.6')).toBe('z/glm-5.4');
});

test('models.tiers wins; fast is smallModel; smart is the session model', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/providers/catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('normalizeModelId and fuzzy lookup', () => {
test('another model on a catalog name (a custom provider fine-tune) keeps its name and capabilities, not the vendor price', () => {
const custom = new OpenAIProvider({ id: 'experientiallabs', config: { type: 'openai', baseUrl: 'https://api.experientiallabs.ai/v1' }, apiKey: 'k' });
const glm = custom.model('glm-5.3-uncensored');
expect(glm).toMatchObject({ name: 'GLM-5.3 Uncensored', inputPrice: 0, outputPrice: 0, cacheReadPrice: 0, contextWindow: 1_000_000, tools: true, thinking: true, tier: 'deep' });
expect(glm).toMatchObject({ name: 'GLM-5.3 Uncensored', inputPrice: 0, outputPrice: 0, cacheReadPrice: 0, contextWindow: 1_000_000, tools: true, thinking: true, tier: 'smart' });
expect(findCatalogEntry('glm-5.3-uncensored')?.family).toBe('zai');
// nor its vision: the vendor's Flash reads images, this build's route may not (a 400 "accepts text only")
expect(custom.model('glm-5.3-flash-uncensored')).toMatchObject({ name: 'GLM-5.3 Flash Uncensored', inputPrice: 0, vision: false });
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/providers/registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('ProviderRegistry.groups, costOf, test', () => {
expect(by.openai.configured).toBe(true);
expect(by.openai.models.some((m) => m.id === 'gpt-5.5')).toBe(true);

expect(by.zai.models.map((m) => m.id)).toEqual(['glm-5.3', 'glm-5.2', 'glm-5.1', 'glm-5', 'glm-5.3-flash', 'glm-4.7', 'glm-4.5-air']);
expect(by.zai.models.map((m) => m.id)).toEqual(['glm-5.4', 'glm-5.3', 'glm-5.2', 'glm-5.1', 'glm-5', 'glm-5.3-flash', 'glm-4.7', 'glm-4.5-air']);
expect(by.ollama.enabled).toBe(false);
expect(by['claude-code'].type).toBe('acp');
expect(by['claude-code'].models.map((m) => m.id)).toEqual(['default', 'opus', 'sonnet', 'haiku']);
Expand Down
Loading