feat: support custom Claude model#527
Conversation
Co-authored-by: METO <metowolf@users.noreply.github.com>
Co-authored-by: METO <metowolf@users.noreply.github.com>
Co-authored-by: METO <metowolf@users.noreply.github.com>
… with shouldSetClaudeHaikuModelEnv
There was a problem hiding this comment.
Findings
- No issues found.
Summary
- Review mode: initial
- Reviewed the full diff for runner-spawned Claude model propagation and the NewSession custom model UI. Residual risk: no automated web interaction test covers the custom-model field/validation path.
Testing
- Not run (automation)
HAPI Bot
There was a problem hiding this comment.
Findings
- [Minor] Reuse the shared Claude preset list — this helper now hard-codes the same preset aliases that already live in
@hapi/protocol, so the next preset addition can make runner-spawned preset sessions look like custom models and setANTHROPIC_DEFAULT_HAIKU_MODELunexpectedly. Evidencecli/src/runner/run.ts:28.
Suggested fix:import { CLAUDE_MODEL_PRESETS } from '@hapi/protocol'; const CLAUDE_BUILT_IN_MODEL_ALIASES = new Set<string>(CLAUDE_MODEL_PRESETS);
Summary
- Review mode: follow-up after new commits
- Reviewed the full latest diff, using the previous no-finding bot review and compare diff as context. One minor maintainability issue found; no blocker/major correctness or security issue found in the custom model submit/spawn path.
Testing
- Not run:
bunis not installed in this runner image (bun: command not found).
HAPI Bot
| import { resolveWorkspaceRoot } from '@/utils/workspaceRoot'; | ||
| import { hashRunnerCliApiToken } from './runnerIdentity'; | ||
|
|
||
| const CLAUDE_BUILT_IN_MODEL_ALIASES = new Set(['opus', 'opus[1m]', 'sonnet', 'sonnet[1m]']); |
There was a problem hiding this comment.
[MINOR] This duplicates the canonical Claude preset list from @hapi/protocol (CLAUDE_MODEL_PRESETS). If a new built-in preset is added there, runner-spawned sessions using that preset will be treated as custom here and will set ANTHROPIC_DEFAULT_HAIKU_MODEL unexpectedly.
Suggested fix:
import { CLAUDE_MODEL_PRESETS } from '@hapi/protocol';
const CLAUDE_BUILT_IN_MODEL_ALIASES = new Set<string>(CLAUDE_MODEL_PRESETS);Replace hard-coded preset aliases with the shared constant so new presets are automatically picked up without requiring a parallel update here.
There was a problem hiding this comment.
Findings
No issues found.
Summary
Review mode: follow-up after new commits
Reviewed the full latest diff, with the prior bot review and the 40db34c1f7c27b05187cc913dca6b4b66b962e0c...c2f8107ea5e2044dc312591bd3ff632e12c9e22d compare as follow-up context. The previous minor finding is addressed by using CLAUDE_MODEL_PRESETS; no blocker/major/minor correctness, security, regression, data loss, performance, or maintainability issues found. Residual risk: tests were not executed in this automation pass.
Testing
Not run (automation)
HAPI Bot
There was a problem hiding this comment.
Findings
No issues found.
Summary
Review mode: follow-up after new commits
Reviewed the full latest diff, using the prior HAPI Bot review at c2f8107ea5e2044dc312591bd3ff632e12c9e22d and the compare to ca5222b6fc2f482197692d72da322184ff9f2f34 as follow-up context. No blocker/major/minor correctness, security, regression, data loss, performance, or maintainability issues found. Residual risk: the custom Claude startup path is covered by focused unit coverage, but I could not execute it in this environment.
Testing
Not run: bun test cli/src/runner/buildCliArgs.test.ts web/src/components/NewSession/types.test.ts failed because bun is not installed in the runner environment.
HAPI Bot
Resolve conflicts by combining: - Custom Claude model support (shouldSetClaudeHaikuModelEnv, customModel state, ModelSelector props) - Upstream multiple workspace roots support (workspaceRoots plural) - Upstream OpenCode model selector (OpencodeModelSelector conditional)
There was a problem hiding this comment.
Findings
No issues found.
Summary
Review mode: follow-up after new commits
No blocker/major/minor issues found in the latest diff. Residual risk: the custom Claude model flow only has unit-level coverage changes here, and I could not execute the Bun test suite in this environment.
Testing
Not run (automation)
HAPI Bot
Summary
Changes
custommodel type for Claude agent, allowing users to input any model name (e.g., custom model versions or preview builds)customoptionTest plan