revert: stop forwarding the Small Model override into the managed OpenCode config

Reverts #2687. In real use the injected small_model behaves poorly with
OpenCode: its internal small-model consumers and OpenChamber's own small
model are different things and must stay configured separately.
This commit is contained in:
Bohdan Triapitsyn
2026-08-29 01:14:02 +03:00
parent 48bcac1758
commit 8aba30ac43
5 changed files with 5 additions and 175 deletions
@@ -137,20 +137,6 @@ other runtime API.
- `routes.js` — `GET /api/small-model` (resolution preview) and
`POST /api/small-model/generate` (`{ prompt, system?, maxOutputTokens?,
model?, directory? }` → `{ text, providerID, modelID, source }`).
- `config-injection.js` — applies the Settings → Chat → Small Model override
to the config injected into the **managed OpenCode process**
(`OPENCODE_CONFIG_CONTENT`), so OpenCode's own internal `small_model`
consumers — session title and summary generation — use the user's explicit
choice instead of OpenCode's fallback chain. Only an explicit override
(`smallModelUseDefault === false` with a non-empty `smallModelOverride`) is
injected; "use default" leaves the config untouched so OpenCode's own
resolution stays authoritative. Wired into `getManagedOpenCodeEnv` in
`server/index.js`; the pure helper is unit-tested in
`config-injection.test.js`. External OpenCode servers are unaffected (they
are not launched with this env). The injected `small_model` is baked into
`OPENCODE_CONFIG_CONTENT` when the managed process spawns, so changing the
override in Settings applies on the next managed OpenCode restart, not to
the process already running.
## Which providers the pickers may offer