fix(claude-code): curated model picker always includes the selected model

The claude-code target listed a hardcoded HANZO_MODELS set (glm-5.2,
deepseek-v4-flash, deepseek-v4-pro, zen5-max — all verified routable) but
dropped the user's actual selection if it wasn't among them. Merge creds.model
in and dedupe so the picker never omits the chosen default, while keeping the
short curated list (the live catalog carries 60+ ids). Also add the missing
ClaudeSettings.model type and drop the redundant 'ultra' effort alias (== max).

v1.0.7
This commit is contained in:
Hanzo Dev
2026-07-03 11:18:53 -07:00
parent b8235f55de
commit 3699eb145f
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hanzo/helper",
"version": "1.0.6",
"version": "1.0.7",
"description": "Hanzo CLI helper for API access, cloud services, MCP, and plugins",
"type": "module",
"main": "./dist/index.js",
-1
View File
@@ -153,7 +153,6 @@ export const EFFORT_ALIASES: Record<string, string> = {
pro: 'zen-pro',
xhigh: 'zen-max',
max: 'zen-max',
ultra: 'zen-max',
code: 'zen-code',
coding: 'zen-code',
agent: 'zen-agent',
+7 -1
View File
@@ -21,6 +21,7 @@ const SETTINGS = path.join(os.homedir(), '.claude', 'settings.json');
const CLAUDE_JSON = path.join(os.homedir(), '.claude.json');
interface ClaudeSettings {
model?: string;
providers?: Record<string, {
apiKey?: string;
baseURL?: string;
@@ -30,6 +31,11 @@ interface ClaudeSettings {
[k: string]: unknown;
}
// Curated flagship coding models surfaced in Claude Code's picker (the live
// catalog carries 60+ ids — too many to list). The selected default is always
// merged in below, so the picker never omits what the user actually chose.
const HANZO_MODELS = ['glm-5.2', 'deepseek-v4-flash', 'deepseek-v4-pro', 'zen5-max'];
export const claudeCode: CodingTarget = {
id: 'claude-code',
displayName: 'Claude Code',
@@ -44,7 +50,7 @@ export const claudeCode: CodingTarget = {
name: 'Hanzo AI',
apiKey: creds.apiKey,
baseURL: creds.apiBase + '/v1',
models: creds.models && creds.models.length > 0 ? creds.models : [creds.model],
models: Array.from(new Set([creds.model, ...HANZO_MODELS])),
},
};
settings.model = creds.model;