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

Subagent token usage is priced at the chat model's rate

クローズ
#172 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

Start by reading chat_manager.ts around recordUsage, session.ts lines 144–165, and the cost calculations in app.ts line 453 and chat_store.ts line 179. Trace how subagent models and usage reach those entry points, then extend task.test.ts to verify usage is associated with the model that produced it. Done when costs are calculated using each model's rates rather than the chat model's rates.

索引モデルが issue の本文から書いたものです。

説明

bug priority: medium severity: medium

Found in the 2026-10-07 code review (traced through the code; not run).

Problem

finder always runs on SMALL_MODELS[provider], and task/oracle may run on other models. Their usage is added to the chat's single UsageTotals (chat_manager.ts recordUsage, session.ts:144-165). Then estimateCost(chat.model, usage) (app.ts:453, chat_store.ts:179) prices everything at the chat model's rates.

Impact

On an Opus 5.5 chat, Haiku finder tokens are billed at Opus prices (4× too high). On GPT-6 Astra a Luna finder is about 100× too high, including the long-context rate. The status bar and history list overstate spending.

Fix

Keep usage per model (for example UsageTotals.byModel: Record<string, UsageTotals>) and sum estimateCost over the models, or convert subagent usage to dollars when it is recorded. Pass the subagent's conversation.model to recordUsage. Extend task.test.ts to check the model the usage belongs to.

主要言語
TypeScript
スター
2
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

PierrunoYT/patch のほかの issue

PierrunoYT/patch の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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