Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

small_model is silently ignored once its model is marked deprecated in the catalog

Open Beginner friendly
#51,159 1 comment 0 reactions 0 assignees View on GitHub

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
Domain
backend, cli

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):

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
  1. In an empty project, add .opencode/opencode.json with DeepSeek credentials configured (opencode models deepseek no longer lists this id):
    { "small_model": "deepseek/deepseek-v4-flash" }
    
  2. Run opencode run --print-logs -m deepseek/deepseek-v4-pro "Reply with exactly: MODEL_OK".
  3. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.