From 9f4db3e15468bbafea0eb549bc19cc7e4f6877f5 Mon Sep 17 00:00:00 2001 From: Alper Altun Date: Sun, 14 Dec 2025 21:41:45 +0000 Subject: [PATCH] feat(glm-4.6): Promote GLM-4.6 as default for cheap/fast tasks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add z-ai/glm-4.6 to OPENROUTER_MODELS and MODEL_INFO - Update for-agents.md: GLM-4.6 for quick tasks, tests, parallel workers - Set GLM-4.6 as default for haiku and subagent roles - No OpenRouter key needed - direct Z.AI API This change encourages GLM-4.6 usage for: - Quick tasks (replaces grok-code-fast-1) - Test validation - Parallel sub-agents - Any cost-sensitive operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- docs/ai-integration/for-agents.md | 20 +++++++++++++++----- src/config.ts | 6 ++++++ src/profile-config.ts | 3 ++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/docs/ai-integration/for-agents.md b/docs/ai-integration/for-agents.md index 672cd9c..6559e0b 100644 --- a/docs/ai-integration/for-agents.md +++ b/docs/ai-integration/for-agents.md @@ -102,8 +102,10 @@ cat /tmp/claudish-result-abc123.md |------|-------|-----| | Code review | `openai/gpt-5.1-codex` | Trained for code analysis | | Architecture | `google/gemini-3-pro-preview` | Long context, good reasoning | -| Quick tasks | `x-ai/grok-code-fast-1` | Fast, cheap | -| Parallel workers | `minimax/minimax-m2` | Cheapest, good enough | +| Quick tasks | `z-ai/glm-4.6` | Fast, cheap, no OpenRouter key needed | +| Tests & validation | `z-ai/glm-4.6` | Good for repetitive tasks, direct Z.AI API | +| Parallel workers | `z-ai/glm-4.6` | Cheapest option via Z.AI, great for bulk work | +| Fallback workers | `minimax/minimax-m2` | Alternative cheap option via OpenRouter | --- @@ -112,13 +114,21 @@ cat /tmp/claudish-result-abc123.md Set environment variables for consistent behavior: ```bash -# In sub-agent environment -export CLAUDISH_MODEL_SUBAGENT='minimax/minimax-m2' -export OPENROUTER_API_KEY='...' +# In sub-agent environment - GLM-4.6 recommended (no OpenRouter key needed) +export CLAUDISH_MODEL_SUBAGENT='z-ai/glm-4.6' +export ZAI_API_KEY='your-zai-key' + +# Or use OpenRouter models (requires OPENROUTER_API_KEY) +# export CLAUDISH_MODEL_SUBAGENT='minimax/minimax-m2' +# export OPENROUTER_API_KEY='...' ``` Or pass via CLI: ```bash +# GLM-4.6 via Z.AI (recommended for cost) +claudish --model z-ai/glm-4.6 --stdin < task.md + +# Or via OpenRouter claudish --model minimax/minimax-m2 --stdin < task.md ``` diff --git a/src/config.ts b/src/config.ts index ed74728..4d6c3d3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -23,6 +23,12 @@ export const MODEL_INFO: Record< priority: 2, provider: "MiniMax", }, + "z-ai/glm-4.6": { + name: "Fast & cheap Chinese model", + description: "GLM-4.6 via Z.AI - ideal for quick tasks, tests, and parallel workers", + priority: 3, + provider: "Z.AI", + }, "google/gemini-2.5-flash": { name: "Advanced reasoning + vision", description: "Advanced reasoning + vision", diff --git a/src/profile-config.ts b/src/profile-config.ts index 90f446f..f285e82 100644 --- a/src/profile-config.ts +++ b/src/profile-config.ts @@ -57,7 +57,8 @@ const DEFAULT_CONFIG: ClaudishProfileConfig = { models: { opus: "x-ai/grok-3-beta", sonnet: "x-ai/grok-code-fast-1", - haiku: "google/gemini-2.5-flash", + haiku: "z-ai/glm-4.6", + subagent: "z-ai/glm-4.6", }, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),