Repository navigation
Commit 086aca7
committed
feat(opencode): expose running version 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). The model id is only injected as prose
in the main system prompt, not as structured data, and subagents/custom
agents may not receive the same prompt template.
Add both to the structured <env> block:
- opencode version: the build-time InstallationVersion (falls back to
'local' in dev builds)
- model: providerID/modelID, already in scope of environment(model)
Fixes anomalyco#519091 parent 7f964bb commit 086aca7
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
0 commit comments