Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#51,159 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend, cli

調査の方向性

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

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)

主要言語
TypeScript
スター
210k
フォーク
27.8k
平均マージ
6時間 50分
マージ済み PR(30日)
336

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。