Repository navigation
Commit c0df7a6
committed
feat(opencode): expose running version, provider and model in the env block
Agents operating under 'state your engine and version' conventions
(AGENTS.md PR traceability rules) cannot reliably know their own harness
version: it is absent from the model context, which invites hallucinated
values (observed: an opencode 1.18.30 agent declared 'opencode 0.11.x',
anchored on a stale doc example).
Add to the structured <env> block:
- OpenCode version: the build-time InstallationVersion (falls back to
'local' in dev builds)
- Provider: the provider ID (the canonical, actionable form used in
opencode.json provider/model references)
- Model: the models.dev display name, with the exact API id in
parentheses
Also fix the adjacent prose line: it called the API id 'the model
named', which is an identifier, not a name (e.g. openrouter
z-ai/glm-5.3) — it now uses the display name, keeping the canonical
providerID/api.id reference as the 'exact model ID'.
Fixes anomalyco#519091 parent 7f964bb commit c0df7a6
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
0 commit comments