sidecall: fm_available reports the on-device model unavailable whenever Private Cloud Compute is, so local_model=fm never runs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
調査の方向性
tokeneconomizer/plugin/sidecall.py の fm_available から始め、その可用性チェックを fm_call が使用する system モデルのチェックと比較してください。issue に記載されたものと同じ hook コンテキストで fm models を実行して再現してください。system の準備ができていても、終了コード 1 で終了することがあります。local_model=fm がこのケースを認識し、利用不可時のフォールバックが errors.log または doctor で確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
tokeneconomizer/plugin/sidecall.py decides whether the on-device model can take a side call with fm_available, which runs fm available and requires exit status 0 (sidecall.py#L819-L833). But fm available lists every Apple Foundation Models provider and exits 1 as soon as one of them is unavailable, even when the on-device system model, the one fm_call uses, is ready. Private Cloud Compute is unavailable outside the Terminal app, and the agents run their hooks outside it, so on such a Mac fm_available() is always False. With local_model=fm, every judge call then falls back to the agent's CLI, silently: nothing is written to errors.log, and status does not say the on-device judge is unused.
fm available on macOS 27.2.1, run from a Claude Code Bash tool (not Terminal.app):
warning: 'fm available' has been renamed to 'fm models'; 'available' still works but is deprecated.
Apple Foundation Models
✓ system (AFM 3 Core Advanced)
✗ pcc (Private Cloud Compute is not available in this context. Please use the Terminal app.)
Exit status: 1 (fm models prints the same and also exits 1).
Reproduction:
from tokeneconomizer.plugin import sidecall as s
print(s.fm_available())
print(s.fm_call("An agent ran the same failing test 9 times with identical errors and no edits. Is it stuck?",
schema=s.JUDGE_SCHEMA))
Expected: True, since the call below it works.
Actual:
False
('{"confidence": 0.95, "reason": "Consistent failure across multiple runs indicates a systemic issue.", "stuck": true}', 0)
A possible fix: judge availability from the system line (✓ system), not from the exit status, and move to fm models, since available is deprecated. When local_model=fm is set but the model is judged unavailable, a line in errors.log or in doctor would make the fallback visible.
Upstream main: 747b8016538c13da7ba9d455b89e5e6595bf5294
Python 3.15.2, macOS 27.2.1 (Apple silicon), Claude Code 2.1.332
- 主要言語
- Python
- スター
- 7.4k
- フォーク
- 500
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 123
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TokenEconomizer のほかの issue
-
microskills: bundle exec and pnpm exec are recorded as bundle run and pnpm run対応中かも @Shizoqua が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/TokenEconomizer#344 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
microskills: a command wrapped in bash -lc or zsh -lc is not observed対応中かも @Shizoqua が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/TokenEconomizer#343 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
README: state the minimum Python version next to the test instructions対応中かも @rahul05ranjan が 4 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TokenEconomizer#328 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
loopguard: a PHPUnit or CTest run is judged without its summary, so a failing run can end a turn green対応中かも @Shizoqua が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/TokenEconomizer#353 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
trace: the usage a Pi tool reports on its own result is left out of the session's usage対応中かも @Shizoqua が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/TokenEconomizer#352 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/TokenEconomizer の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
reasons-gate
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
benthomasson/reasons-service#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 3 日以内に返信