small_model is silently ignored once its model is marked deprecated in the catalog
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in packages/opencode/src/provider/provider.ts around the deprecated-model removal at line 1694 and the getSmallModel catch at lines 1942-1946. Trace how getModel produces its “Did you mean” suggestions, then verify the title-agent fallback in packages/opencode/src/session/prompt.ts at lines 218-221. Done means a deprecated small_model still falls back to the session model but emits a WARN identifying the ignored configuration and useful lookup details.
Written by the indexing model from the issue text.
Description
Description
If the model set as small_model is later marked deprecated in the catalog, OpenCode drops it from the provider and Provider.getSmallModel turns the lookup error into undefined without logging anything. The title agent then quietly falls back to the session's main model.
The config never changes, so from the user's side this is a silent behavior change on the day the catalog updates. For me it was deepseek/deepseek-v4-flash, marked deprecated in anomalyco/models.dev#7727. The DeepSeek API still accepts that alias (it is served by V4.1 Flash), so the configured model itself kept working; only OpenCode stopped using it. From then on every session title ran on my main model, Claude Opus 5.5 through a subscription proxy, instead of DeepSeek. That spent subscription quota and triggered a title/first-turn race in the proxy (rynfar/meridian#1024), which took a while to trace back to this one config line.
The same id used as the main model fails loudly, with a useful hint (from the log):
ProviderModelNotFoundError: Model not found: deepseek/deepseek-v4-flash. Did you mean: deepseek-flash, deepseek-v4-pro?
As small_model it produces nothing, not even with --log-level DEBUG.
Relevant code on dev (0f54984):
- deprecated models are deleted from the provider: provider.ts#L1694
getSmallModelcatchesProviderModelNotFoundErrorand returnsundefined: provider.ts#L1942-L1946- the title agent then uses the session model: prompt.ts#L218-L221
I understand the fallback itself is intentional, so I'm not asking to remove it, only to make it visible: a WARN in that catchTag, ideally reusing the "Did you mean" suggestions that getModel already computes. #31092 proposed the warning part for #31042, but both were closed automatically by the cleanup bots before anyone reviewed them.
Plugins
[email protected], context-mode (loaded globally; the repro below does not go through them)
OpenCode version
1.18.32
Steps to reproduce
- In an empty project, add
.opencode/opencode.jsonwith DeepSeek credentials configured (opencode models deepseekno longer lists this id):{ "small_model": "deepseek/deepseek-v4-flash" } - Run
opencode run --print-logs -m deepseek/deepseek-v4-pro "Reply with exactly: MODEL_OK". - The title request streams with the main model, and no log line mentions
small_model:level=INFO message=stream providerID=deepseek modelID=deepseek-v4-pro small=true agent=title mode=primary level=INFO message=stream providerID=deepseek modelID=deepseek-v4-pro small=false agent=build mode=primary
Operating System
Windows 11 Pro (10.0.26200)
Terminal
WezTerm with Git Bash (not terminal-specific)
- Dominant language
- TypeScript
- Stars
- 210k
- Forks
- 27.8k
- Avg merge
- 8h 1m
- Merged PRs (30d)
- 357
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
melgarafael/DeskcommCRM#1812 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
prisma/prisma-cli#309 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gregwebs/pi-quota-dispatcher#26 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openwatersio/slackwater.xyz#124 ·
Maintainers usually reply within 1 day
-
agent-reported area/browser area/docs documentation good first issue hacktoberfest help wanted P2
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 2 days