Repository navigation
fix: emit tool_call in generated opencode.json model entries - #35
Conversation
The model-level "tools": true is not a field in the opencode v1 provider-model schema (tool_call is) and was silently dropped. Emit tool_call: true in the local and remote configs. The rest of the shape (provider/npm/options, autoupdate, top-level tools block) is valid in opencode v1.18.21 and normalized by 2.x. Record the schema reference in the generator comment and pin the shape in tests. Dz-Task-Id: tsk_686da5ed67418b4a3a2f6a8123831414
|
Re-check the generated opencode.json against the opencode schema the installer permits
Work landed on #35 — watching it toward merge. 2h05m · 67 tool calls Sessions: coding run 🤖 developerz.ai, an automated agent, not a human — hv-dedicated-ci-2 (developerz-ai[bot]) · model |
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code ⏱ 1m 57s wall clock · 🤖 developerz.ai — automated review, running on your model and your box. |
There was a problem hiding this comment.
Review summary — 2 file(s), 0 finding(s).
Replaces the silently-dropped model-level "tools": true with "tool_call": true in both config writers and pins it with section-9 assertions on freshly generated local and remote output. The new checks would fail on the pre-change generator, so the oracle is real; no defect found.
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/deepseek-v4.1-flash on box hv-dedicated-ci-0 — 103k in / 22k out over 3 calls, on your flat-rate plan: no per-token charge (~$0.03 at list price).
What
The model-level "tools": true is not a field in the opencode v1 provider-model schema (tool_call is) and was silently dropped. Emit tool_call: true in the local and remote configs. The rest of the shape (provider/npm/options, autoupdate, top-level tools block) is valid in opencode v1.18.21 and normalized by 2.x. Record the schema reference in the generator comment and pin the shape in tests.
Acceptance
Changes
lib/opencode.sh(edit) — In BOTH generators (local heredoc ~:290-292, remote ~:562-564) replace model-level"tools": truewith"tool_call": true: v1 Model schema (packages/core/src/v1/config/provider.ts) has tool_call, and unknown keys are silently dropped. Keep provider/npm/options, autoupdate:false, share and top-leveltoolsblock unchanged (valid in v1; v2 normalizes them). Update comment ~:219 to record schema reference (opencode v1.18.21 config.ts/provider.ts; opencode.ai/docs/migrate-v1/). Do NOT emit v2-native providers/permissions keys.tests/opencode_config_test.sh(edit) — Add offline assertions on generated local and remote config: model has tool_call:true and no model-level tools:true; top-level tools block still disables the built-ins; provider has npm, options.baseURL/timeout/chunkTimeout; no v2-only top-level keys (providers, permissions, agents, commands). Assert generated output, never edit existing fixtures to match. Read file first and follow its style; unset per-case env.Verification
No check command was found for this repository, so no gate ran before the commit.
What the editors ran to see the change working, and what they saw:
bash -n lib/opencode.sh && bash tests/opencode_config_test.sh(core): 108 passed, 0 failed. This includes new section 9 'schema local' and 'schema remote' checks: tool_call true, no model-level tools, npm/options/limit kept, top-level built-ins disabled, no v2-only keys.Notes
Premises of the request the team disproved:
🤖 Opened by developerz.ai for task
tsk_686da5ed67418b4a3a2f6a8123831414on developerz-ai/mini.Raised automatically by the
raw_task_triagelane.