Skip to content

Commit e08ec07

Browse files
authored
fix: ensure name isn't added as field in options: {...} (sst#2053)
1 parent 796245d commit e08ec07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/opencode/src/agent/agent.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export namespace Agent {
100100
tools: {},
101101
builtIn: false,
102102
}
103-
const { model, prompt, tools, description, temperature, top_p, mode, permission, ...extra } = value
103+
const { name, model, prompt, tools, description, temperature, top_p, mode, permission, ...extra } = value
104104
item.options = {
105105
...item.options,
106106
...extra,
@@ -120,6 +120,8 @@ export namespace Agent {
120120
if (temperature != undefined) item.temperature = temperature
121121
if (top_p != undefined) item.topP = top_p
122122
if (mode) item.mode = mode
123+
// just here for consistency & to prevent it from being added as an option
124+
if (name) item.name = name
123125

124126
if (permission ?? cfg.permission) {
125127
item.permission = mergeAgentPermissions(cfg.permission ?? {}, permission ?? {})

0 commit comments

Comments
 (0)