fix(runtime): keep unpriced turns distinguishable from free ones after reload
メンテナーはふだん 1 日以内に返信
@dgageot がすでに取り組んでいます。
2026年10月21日 から。
評価
この issue はまだ評価されていません。
説明
Problem
When a model has no known price (not in the models.dev catalogue and no cost: override), the runtime records the turn's cost as $0, with a warning (loop.go). chat.Message.Cost and the compaction item's Cost are plain float64, so the distinction is lost on save.
In memory, hooks, telemetry and the budget tracker already tell the two apart: nil means unpriced, 0 means free (BudgetUsageEvent.Unpriced). After a session is saved and reloaded, every unpriced turn reads as free, and session totals understate the real cost without saying so.
Proposal
- Persist whether a message's (and a compaction item's) cost is known, additively, e.g. an
unpricedflag next tocostin the stored JSON. - Surface it in session totals and the API: "$1.23 + unpriced turns" rather than "$1.23".
- Keep old sessions readable; their missing flag means "priced".
Acceptance criteria
- An unpriced turn stays unpriced after a SQLite save and reload, and a free one (
cost: {}) stays free. - Session totals and the API distinguish them.
- Old sessions load unchanged.
Found while planning #4654.
- 主要言語
- Go
- スター
- 4.7k
- フォーク
- 565
- 平均マージ
- 18時間 52分
- マージ済み PR(30日)
- 221
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/docker-agent のほかの issue
-
edit_file diff rendering panics on invalid UTF-8 text対応中かも @TDnorthgarden が今日担当しました。 オープンarea/tui
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
docker/docker-agent#4955 ·
メンテナーはふだん 1 日以内に返信
-
A setting to turn off the models.dev catalog download (offline and strict-network use)対応中かも @3431481073 が 19 日前に担当しました。 オープンarea/config area/models
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
docker/docker-agent#4714 ·
メンテナーはふだん 1 日以内に返信
-
Error when trying to run sandbox example?再び着手できるかも @dgageot が 28 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea/cli
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
docker/docker-agent#4672 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
`edit_file` silently edits the first match when `oldText` occurs more than once対応中かも @dwin-gharibi が 103 日前に担当しました。 オープンarea/tools
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
docker/docker-agent#3929 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/api area/runtime
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
docker/docker-agent#4951 ·
メンテナーはふだん 1 日以内に返信
docker/docker-agent の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
fluxcd/notification-controller#1441 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
volcengine/volcengine-go-sdk#163 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
OneBusAway/maglev#2145 ·
メンテナーはふだん 2 日以内に返信
-
priority/medium status/ready type/chore
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
discobox-ai/discobox#1357 ·
メンテナーはふだん 1 日以内に返信