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
11 changes: 11 additions & 0 deletions apps/daemon/src/runtimes/defs/claude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ const CLAUDE_FALLBACK_MODELS = [
{ id: 'sonnet', label: 'Sonnet (alias)' },
{ id: 'opus', label: 'Opus (alias)' },
{ id: 'haiku', label: 'Haiku (alias)' },
// Current generation. Kept in sync with the model support matrix
Comment on lines 9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: clampClaudeReasoning is not present anywhere on this PR head; shared.ts only defines clampCodexReasoning. These changed lines therefore document a synchronization invariant that cannot currently be followed or verified, and the new test hard-codes the same model IDs rather than deriving them from the referenced matrix. That matters because a future maintainer may reasonably assume the picker is already coupled to an existing source of truth. Since this PR is intentionally independent of #6046, please either rewrite this comment and the test rationale to describe an explicit supported-model list, or use a shared Claude model constant that the picker and future clamp can both consume when that clamp lands.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

// clampClaudeReasoning (shared.ts) already encodes -- if a model shows up
// there, it should be selectable here too.
{ id: 'claude-fable-5', label: 'claude-fable-5' },
{ id: 'claude-opus-4-8', label: 'claude-opus-4-8' },
{ id: 'claude-sonnet-5', label: 'claude-sonnet-5' },
{ id: 'claude-haiku-4-5-20251001', label: 'claude-haiku-4-5-20251001' },
{ id: 'claude-opus-4-7', label: 'claude-opus-4-7' },
{ id: 'claude-sonnet-4-6', label: 'claude-sonnet-4-6' },
{ id: 'claude-opus-4-6', label: 'claude-opus-4-6' },
// Prior generation, kept for anyone still pinned to it.
{ id: 'claude-opus-4-5', label: 'claude-opus-4-5' },
{ id: 'claude-sonnet-4-5', label: 'claude-sonnet-4-5' },
{ id: 'claude-haiku-4-5', label: 'claude-haiku-4-5' },
Expand Down
11 changes: 11 additions & 0 deletions apps/daemon/tests/runtimes/agent-args.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,17 @@ test('claude helpArgs probes the -p subcommand where --add-dir lives (issue #430
);
});

test('claude fallback models include the current generation, not just 4.5', () => {
const ids = claude.fallbackModels.map((m) => m.id);
assert.ok(ids.includes('claude-fable-5'), 'Fable 5 must be selectable');
assert.ok(ids.includes('claude-opus-4-8'));
assert.ok(ids.includes('claude-sonnet-5'));
assert.ok(ids.includes('claude-haiku-4-5-20251001'));
assert.ok(ids.includes('claude-opus-4-7'));
assert.ok(ids.includes('claude-sonnet-4-6'));
assert.ok(ids.includes('claude-opus-4-6'));
});

// server.ts:4615 branches on `def.promptInputFormat` to decide how to write
// the composed prompt to a stdin-fed child: 'stream-json' writes one JSONL
// `user` message and keeps stdin open, anything else writes the raw prompt
Expand Down
Loading