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 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 object candidates, not on the agent role.
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
- "anthropic/claude-sonnet-4-5",
163
- {
164
- "id": "openai/gpt-5.1",
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
 
@@ -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-20260525030452",
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>",
package/schema.json CHANGED
@@ -149,6 +149,7 @@
149
149
  "modelConfig": {
150
150
  "oneOf": [
151
151
  { "type": "string", "minLength": 1 },
152
+ { "$ref": "#/$defs/modelCandidate" },
152
153
  {
153
154
  "type": "array",
154
155
  "minItems": 1,