Skip to content

Commit aad7a72

Browse files
committed
Fix agent model overrides not being applied to non-factory agents
Previously, the code was explicitly removing the model property from user config overrides before merging, which prevented users from overriding agent models via config. This change allows user config like: { "agents": { "librarian": { "model": "google/gemini-3-flash-preview" } } } to properly override the default agent models. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent d909c09 commit aad7a72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/agents/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ export function createBuiltinAgents(
9595
}
9696

9797
if (override) {
98-
const { model: _, ...restOverride } = override
99-
config = mergeAgentConfig(config, restOverride)
98+
config = mergeAgentConfig(config, override)
10099
}
101100

102101
result[name] = config

0 commit comments

Comments
 (0)