-
Notifications
You must be signed in to change notification settings - Fork 3
feat(model): configurable default + per-spawn model override #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a74af05
5e149e1
d40e683
cc678d3
0015bad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -370,14 +370,16 @@ export async function doSpawnSession(topic: string, chatId?: string, messageId?: | |
| prompt = buildSpawnPrompt(promptParams) | ||
| } | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should-fix: empty-string model bypasses fallback. If
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed — switched to |
||
| const model = opts?.model ?? SPAWN_MODEL | ||
|
|
||
| // Build claude command — fork adds --resume --fork-session, resume uses --resume without fork | ||
| let claudeArgs: string | ||
| if (isFork) { | ||
| claudeArgs = [ | ||
| `claude`, | ||
| `--resume ${shq(opts!.forkFrom!.claudeSessionId)}`, | ||
| `--fork-session`, | ||
| `--model ${shq(SPAWN_MODEL)}`, | ||
| `--model ${shq(model)}`, | ||
| `--channels ${shq(channelFlag)}`, | ||
| `--dangerously-skip-permissions`, | ||
| shq(prompt), | ||
|
|
@@ -386,12 +388,12 @@ export async function doSpawnSession(topic: string, chatId?: string, messageId?: | |
| claudeArgs = [ | ||
| `claude`, | ||
| `--resume ${shq(opts!.resumeFrom!)}`, | ||
| `--model ${shq(SPAWN_MODEL)}`, | ||
| `--model ${shq(model)}`, | ||
| `--channels ${shq(channelFlag)}`, | ||
| `--dangerously-skip-permissions`, | ||
| ].join(' ') | ||
| } else { | ||
| claudeArgs = `claude --model ${shq(SPAWN_MODEL)} --channels ${shq(channelFlag)} --dangerously-skip-permissions ${shq(prompt)}` | ||
| claudeArgs = `claude --model ${shq(model)} --channels ${shq(channelFlag)} --dangerously-skip-permissions ${shq(prompt)}` | ||
| } | ||
|
|
||
| const inner = [ | ||
|
|
@@ -427,7 +429,7 @@ export async function doSpawnSession(topic: string, chatId?: string, messageId?: | |
| const capabilities: SessionCapabilities = { | ||
| role: 'worker', | ||
| tools: computeToolsForSession(sessionId).map(t => t.name), | ||
| model: SPAWN_MODEL, | ||
| model, | ||
| cwd: effectiveCwd, | ||
| platform: PLATFORM, | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const DEFAULT_MODEL = 'claude-opus-4-6[1m]' | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should-fix (flagged by sp-reviewer):
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed — added |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit (flagged by both reviewers): This
importis placed mid-file after theBRIDGE_TOOLSarray and other exports. ESM hoisting makes it work at runtime, but it breaks the codebase convention of imports-at-top and may trip linters. Move it up with the other imports at the top of the file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed — moved to top with the other imports.