opencode-magi 0.0.0-dev-20260525030452 → 0.0.0-dev-20260525031145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -8
- package/dist/config/validate.js +13 -1
- package/package.json +1 -1
- package/schema.json +1 -0
package/README.md
CHANGED
|
@@ -154,17 +154,14 @@ Add the following content to the configuration file.
|
|
|
154
154
|
|
|
155
155
|
Entries with `ref` are expanded from `agents.refs`. Fields set alongside `ref` override fields from the preset.
|
|
156
156
|
|
|
157
|
-
`model` can be a single `provider/model` string or an ordered candidate array. Candidate arrays are resolved during validation against OpenCode's model catalog; the first available model is selected. Put provider-specific options on
|
|
157
|
+
`model` can be a single `provider/model` string, a single object with `id` and `options`, or an ordered candidate array. Candidate arrays are resolved during validation against OpenCode's model catalog; the first available model is selected. Put provider-specific options on model objects, not on the agent role.
|
|
158
158
|
|
|
159
159
|
```json
|
|
160
160
|
{
|
|
161
|
-
"model":
|
|
162
|
-
"
|
|
163
|
-
{
|
|
164
|
-
|
|
165
|
-
"options": { "reasoningEffort": "high" }
|
|
166
|
-
}
|
|
167
|
-
]
|
|
161
|
+
"model": {
|
|
162
|
+
"id": "openai/gpt-5.1",
|
|
163
|
+
"options": { "reasoningEffort": "high" }
|
|
164
|
+
}
|
|
168
165
|
}
|
|
169
166
|
```
|
|
170
167
|
|
package/dist/config/validate.js
CHANGED
|
@@ -319,9 +319,21 @@ function validateAndNormalizeModel(target, path, errors, catalog) {
|
|
|
319
319
|
validateModelId(model, path, errors, catalog);
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
|
+
if (isPlainObject(model)) {
|
|
323
|
+
const candidate = readModelCandidate(model, path, errors);
|
|
324
|
+
if (candidate &&
|
|
325
|
+
validateModelId(candidate.id, `${path}.id`, errors, catalog)) {
|
|
326
|
+
target.model = candidate.id;
|
|
327
|
+
if (candidate.options)
|
|
328
|
+
target.options = candidate.options;
|
|
329
|
+
else
|
|
330
|
+
delete target.options;
|
|
331
|
+
}
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
322
334
|
if (!Array.isArray(model)) {
|
|
323
335
|
if (model != null)
|
|
324
|
-
errors.push(`${path} must be a string or an array`);
|
|
336
|
+
errors.push(`${path} must be a string, an object, or an array`);
|
|
325
337
|
return;
|
|
326
338
|
}
|
|
327
339
|
if (!model.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-magi",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260525031145",
|
|
4
4
|
"description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|