Skip to content

Commit 29c81d9

Browse files
committed
OpenCode: pin grok-4.6#high on spec-to-ship agents only; drop invalid xAI provider block.
Root model stays xai/grok-4.6 so session effort is selectable. Pipeline agents/command use #high — the max reasoningEffort @ai-sdk/xai accepts (none|low|medium|high). xhigh is advertised in the picker and valid on Cursor/xAI, but OpenCode 1.18.x rejects it locally (anomalyco/opencode#43226). Remap the xhigh variant to high so picking it does not crash.
1 parent 3d84e8a commit 29c81d9

7 files changed

Lines changed: 49 additions & 48 deletions

File tree

‎.opencode/agent/coder.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: coder
33
description: Implements conquarrow code to make the failing tests pass, then refactors within the complexity budget while keeping the rules core pure. Use as phase 3 of /spec-to-ship.
44
mode: subagent
5-
model: xai/grok-4.6
5+
model: xai/grok-4.6#high
66
---
77

88
# coder

‎.opencode/agent/reviewer.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: reviewer
33
description: Final review of a completed conquarrow change — spec ↔ tests ↔ code coherence, core purity, hexagonal boundaries, complexity — and prepares it to ship. Use as phase 4 of /spec-to-ship.
44
mode: subagent
5-
model: xai/grok-4.6
5+
model: xai/grok-4.6#high
66
---
77

88
# reviewer

‎.opencode/agent/spec-author.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: spec-author
33
description: Turns a conquarrow work packet into a detailed specification — Gherkin (.feature) + mermaid + EARS, derived from SPEC.md / ADR 0002. Escalates only for game-rule gaps, unexpected cost, or a big behavioral shift. Use as phase 1 of /spec-to-ship.
44
mode: all
5-
model: xai/grok-4.6
5+
model: xai/grok-4.6#high
66
---
77

88
# spec-author

‎.opencode/agent/test-author.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: test-author
33
description: Derives failing tests from a conquarrow spec — one component test per Gherkin scenario, property tests for the EARS invariants, plus the skeleton stubs they compile against. Use as phase 2 of /spec-to-ship.
44
mode: subagent
5-
model: xai/grok-4.6
5+
model: xai/grok-4.6#high
66
---
77

88
# test-author

‎.opencode/command/spec-to-ship.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Orchestrate spec→tests→code→review→PR+Copilot+merge for one work packet. No human gates.
33
agent: spec-author
4-
model: xai/grok-4.6
4+
model: xai/grok-4.6#high
55
---
66

77
# /spec-to-ship
@@ -24,8 +24,10 @@ relevant `SPEC.md` sections; online packets: ADR 0002). Also read `OPENCODE.md`.
2424
engine, ever.
2525
- **Never invent a game rule.** SPEC.md silence is an escalate, not a default.
2626
Online/infra BSSN: decide, document, continue.
27-
- **Model.** Every phase uses `xai/grok-4.6` (SuperGrok OAuth). Do not pass a
28-
different model when launching a subagent unless the human named one.
27+
- **Model.** Pipeline phases use `xai/grok-4.6#high` (SuperGrok OAuth). Do not
28+
pass a different model when launching a subagent unless the human named one.
29+
Session chat may use other effort tiers; `#xhigh` is not sendable in OpenCode
30+
until @ai-sdk/xai accepts it.
2931

3032
**Escalate and wait** only for: a substantial unexpected cost, a big behavioral
3133
shift versus SPEC.md / ADR 0002 / a shipped packet, or a SPEC.md game-rule gap.

‎OPENCODE.md‎

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,45 +30,46 @@ Then:
3030
/models
3131
```
3232

33-
Confirm the session is on `xai/grok-4.6`. The project `opencode.json` already
34-
selects that id for the primary agent and every subagent below.
35-
36-
Do **not** use `/connect` → “Manually enter API Key” unless you intentionally
37-
want prepaid console credits instead of the subscription. That is a different ledger.
33+
Confirm the session is on `xai/grok-4.6`. Session effort (none / low / medium / high)
34+
is yours to pick. Do **not** use `/connect` → “Manually enter API Key” unless you
35+
intentionally want prepaid console credits instead of the subscription.
3836

3937
## Model pin
4038

4139
Canonical OpenCode id: `xai/grok-4.6`.
4240

43-
Pinned in:
41+
| Surface | Slug | Why |
42+
|---|---|---|
43+
| Session / `build` / `plan` / `general` / `explore` | `xai/grok-4.6` (no `#variant`) | You pick the effort tier |
44+
| `spec-author`, `test-author`, `coder`, `reviewer`, `/spec-to-ship` | `xai/grok-4.6#high` | Highest effort OpenCode’s xAI SDK will actually send |
45+
46+
`cursor-grok-4.6-xhigh` is a **Cursor** slug. Do not paste it into OpenCode.
47+
Claude Code keeps `opus` in `.claude/agents/`.
4448

45-
- `opencode.json` (`model`, `small_model`, built-in `build` / `plan` / `general` / `explore`)
46-
- `.opencode/agent/{spec-author,test-author,coder,reviewer}.md`
47-
- `.opencode/command/spec-to-ship.md`
49+
### Why `xhigh` blows up here
4850

49-
When launching a subagent, **omit a model override** unless the human named one.
50-
Passing a slug is how a phase silently lands on the wrong provider (the other
51-
models you used in this checkout before).
51+
`invalid xai provider options` with `reasoningEffort: "xhigh"` is
52+
[anomalyco/opencode#43226](https://github.com/anomalyco/opencode/issues/43226).
5253

53-
Cursor keeps `cursor-grok-4.6-xhigh` in `.cursor/agents/`. Claude Code keeps
54-
`opus` in `.claude/agents/`. Do not copy those slugs into OpenCode — they are not
55-
xAI catalog ids and will not hit SuperGrok.
54+
- xAI’s API **does** accept `reasoning_effort: "xhigh"` on grok-4.6.
55+
- Cursor’s own backend **does** accept `xhigh` (that is what `.cursor/agents` pins).
56+
- OpenCode’s picker advertises an `xhigh` variant.
57+
- The bundled `@ai-sdk/xai` Zod schema only allows `none \| low \| medium \| high`,
58+
so the request dies **before** it leaves the machine.
59+
60+
Until that SDK/catalog split is fixed, `#high` is the ceiling in OpenCode.
61+
`opencode.json` remaps the advertised `xhigh` variant to `high` so picking it in
62+
the UI does not crash; it does **not** buy you Cursor’s xhigh budget.
5663

5764
## Command, subagents & skills
5865

5966
- **Command**: `/spec-to-ship <path-to-packet>` — `.opencode/command/spec-to-ship.md`.
60-
Same four-phase pipeline as Claude/Cursor. No human gate between phases.
6167
- **Subagents**: `.opencode/agent/` — `spec-author`, `test-author`, `coder`, `reviewer`.
62-
- **Skills**: still `.claude/skills/` (`spec-to-ship`, `write-spec`,
63-
`write-failing-tests`, `code-to-green`, `review-changes`, `rules-invariants`,
64-
`engineering-principles`, `mutation-testing`). Agents reference those paths.
68+
- **Skills**: `.claude/skills/`.
6569

66-
`.agents/skills/` is the Matt Pocock skill pack (OpenCode honors it as skills).
67-
It is **not** the spec-to-ship roster and does not choose the model.
70+
`.agents/skills/` is the Matt Pocock pack. It does not choose the model.
6871

6972
## Local-only branches
7073

7174
When the human says the branch is local-only, **never push or open a PR**.
72-
73-
`local-main` is always local-only. It may carry `@vnatures/test-kit` and
74-
`*.kit.test.ts`. **Never push it.** Product packets always branch from `main`.
75+
`local-main` is always local-only. Never push it. Product packets branch from `main`.

‎opencode.json‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,34 @@
44
"small_model": "xai/grok-4.6",
55
"provider": {
66
"xai": {
7-
"name": "xAI (SuperGrok OAuth)"
7+
"models": {
8+
"grok-4.6": {
9+
"variants": {
10+
"none": { "reasoningEffort": "none" },
11+
"low": { "reasoningEffort": "low" },
12+
"medium": { "reasoningEffort": "medium" },
13+
"high": { "reasoningEffort": "high" },
14+
"xhigh": { "reasoningEffort": "high" }
15+
}
16+
}
17+
}
818
}
919
},
1020
"agent": {
11-
"build": {
12-
"model": "xai/grok-4.6"
13-
},
14-
"plan": {
15-
"model": "xai/grok-4.6"
16-
},
17-
"general": {
18-
"model": "xai/grok-4.6"
19-
},
20-
"explore": {
21-
"model": "xai/grok-4.6"
22-
},
2321
"spec-author": {
24-
"model": "xai/grok-4.6",
22+
"model": "xai/grok-4.6#high",
2523
"mode": "all"
2624
},
2725
"test-author": {
28-
"model": "xai/grok-4.6",
26+
"model": "xai/grok-4.6#high",
2927
"mode": "subagent"
3028
},
3129
"coder": {
32-
"model": "xai/grok-4.6",
30+
"model": "xai/grok-4.6#high",
3331
"mode": "subagent"
3432
},
3533
"reviewer": {
36-
"model": "xai/grok-4.6",
34+
"model": "xai/grok-4.6#high",
3735
"mode": "subagent"
3836
}
3937
}

0 commit comments

Comments
 (0)