fix(opencode): scope agent variant to model (#11410)

This commit is contained in:
neavo
2026-02-02 04:12:30 +08:00
committed by GitHub
parent 16145af480
commit f15755684f
5 changed files with 111 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ export namespace Agent {
providerID: z.string(),
})
.optional(),
variant: z.string().optional(),
prompt: z.string().optional(),
options: z.record(z.string(), z.any()),
steps: z.number().int().positive().optional(),
@@ -214,6 +215,7 @@ export namespace Agent {
native: false,
}
if (value.model) item.model = Provider.parseModel(value.model)
item.variant = value.variant ?? item.variant
item.prompt = value.prompt ?? item.prompt
item.description = value.description ?? item.description
item.temperature = value.temperature ?? item.temperature