small_model is silently ignored once its model is marked deprecated in the catalog
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
packages/opencode/src/provider/provider.ts の1694行目付近にある deprecated-model の削除処理と、1942-1946行目の getSmallModel の catch から調査を始めてください。getModel がどのように「Did you mean」の候補を生成するかを追跡し、その後 packages/opencode/src/session/prompt.ts の218-221行目にある title-agent のフォールバックを確認してください。完了条件は、deprecated small_model が引き続き session model にフォールバックしつつ、無視された設定と検索に役立つ詳細を特定する WARN を出力することです。
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- TypeScript
- スター
- 210k
- フォーク
- 27.8k
- 平均マージ
- 6時間 50分
- マージ済み PR(30日)
- 336
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
prime-radiant-inc/evener#3291 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto-cli#14961 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
supabase/agent-skills#614 ·
-
Content
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
RunestoneInteractive/rs#1559 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信