You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model discovery hides configured presets that share a model family #63708
The opencode.models tool hides explicitly configured model presets when they share a family.
For example, two enabled aliases targeting gpt-6.1-sol with different reasoning settings appear separately in the TUI picker, but only one appears in the tool's default results. Using all: true returns both.
Expected: distinct presets remain discoverable, while older base-model versions can still be filtered.
Seen with a simulated model or a mock server, not a real provider; a maintainer should confirm.
Thanks for the clear report. I reproduced this on 2.2.7, and it still happens on the latest dev (73abe63).
What I did: loaded your two presets (preset-low and preset-high, both modelID: gpt-6.1-sol) and called opencode.models with {"provider":"opencode","query":"preset"}, then again with all: true.
What happened:
Default call: only opencode/preset-low (total=1).
With all: true: both presets (total=2).
The recording, screenshot and script below show the run. A simulated model only triggered the tool call. The tool ran for real against the models catalog bundled with the release.
Likely cause: by default the tool keeps one model per provider and model family. Your presets inherit gpt-6.1-sol's family and release date, so one of them is dropped, even though the all option is described as only including older versions of a family.
recording.mp4
Reproduction script (drive.ts)
// Reproduces anomalyco/opencode#63708: opencode.models hides a configured preset// that shares a model family with another preset of the same base model.//// The simulation answers the models.dev fetch with an empty catalog, so load the real// catalog (the snapshot bundled with the release) so the presets inherit gpt-6.1-sol's family:// git -C /workspace/repo show v2.2.7:packages/core/src/models-dev/snapshot.txt > /tmp/opencode/models.json// OPENCODE_MODELS_PATH=/tmp/opencode/models.json OPENCODE_DISABLE_MODELS_FETCH=1 \// OPENCODE_DRIVE_MEDIA_DIR=/workspace/media opencode-drive run drive.tsimport{Effect,Stream}from"effect"import{Llm,OpenCodeDriver}from"opencode-drive"constcode=`const def = await tools.opencode.models({ provider: "opencode", query: "preset" })const all = await tools.opencode.models({ provider: "opencode", query: "preset", all: true })const ids = (r) => r.providers.flatMap((p) => p.models.map((m) => m.id)).join(",")return "DEFAULT=[" + ids(def) + "] total=" + def.total + " ALL=[" + ids(all) + "] total=" + all.total`exportdefaultOpenCodeDriver.use({
...(process.env.OC_DEV ? {opencode: {dev: process.env.OC_DEV}} : {}),tui: {recording: true},config: {model: "simulation/gpt-sim-model",providers: {opencode: {models: {"preset-low": {modelID: "gpt-6.1-sol",name: "Preset Low",disabled: false,settings: {reasoningEffort: "low"}},"preset-high": {modelID: "gpt-6.1-sol",name: "Preset High",disabled: false,settings: {reasoningEffort: "high"}},},},},}asany,},({ ui, llm })=>Effect.gen(function*(){yield*llm.serve((request,index)=>{consttext=JSON.stringify(request)if(!text.includes("call_models"))returnStream.make(Llm.toolCall({index: 0,id: "call_models",name: "execute",input: { code }}),Llm.finish("tool-calls"),)constmatch=/DEFAULT=\[[^\]]*\]total=\d+ALL=\[[^\]]*\]total=\d+/.exec(text.replace(/\\"/g,'"'))console.log("TOOL RESULT:",match?.[0]??JSON.stringify((requestasany).body?.messages?.slice(-1)))returnStream.make(Llm.text("Result: "+(match?.[0]??"no match")))})yield*ui.submit("List the preset models")yield*ui.waitFor("Result:")yield*ui.screenshot("result")}),)
Run it with opencode-drive: opencode-drive run ./drive.ts. It drives opencode from your PATH; set OC_DEV to the path of an OpenCode checkout to run that from source instead.
Fixed by #65071, which keeps same-day model siblings and returns every search match in the models tool. This resolves the reproduction reported here. Thanks!
Activity
opencodejr commentedon Nov 13, 2026
Seen with a simulated model or a mock server, not a real provider; a maintainer should confirm.
Thanks for the clear report. I reproduced this on 2.2.7, and it still happens on the latest
dev(73abe63).What I did: loaded your two presets (
preset-lowandpreset-high, bothmodelID: gpt-6.1-sol) and calledopencode.modelswith{"provider":"opencode","query":"preset"}, then again withall: true.What happened:
opencode/preset-low(total=1).all: true: both presets (total=2).The recording, screenshot and script below show the run. A simulated model only triggered the tool call. The tool ran for real against the models catalog bundled with the release.
Likely cause: by default the tool keeps one model per provider and model family. Your presets inherit
gpt-6.1-sol's family and release date, so one of them is dropped, even though thealloption is described as only including older versions of a family.recording.mp4
Reproduction script (drive.ts)
Run it with opencode-drive:
opencode-drive run ./drive.ts. It drivesopencodefrom yourPATH; setOC_DEVto the path of an OpenCode checkout to run that from source instead.smnmsr commentedon Nov 24, 2026
Fixed by #65071, which keeps same-day model siblings and returns every search match in the models tool. This resolves the reproduction reported here. Thanks!