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

Speech spend is missing from usage.jsonl and the call log

オープン
#1,588 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

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

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

評価

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

調査の方向性

Start with internal/session/tools_image.go:152-160 and internal/session/loop.go:5449, then trace how paid calls are written to v3/usage.jsonl and logs/calls.jsonl. Reproduce the speech request in an isolated profile and add an end-to-end check that confirms the speech model, cost, usage row, and codeaf logs entry.

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

説明

area:logging area:provider bug sev:serious

Seen on: dev 837b2b0.

Behaviour

A speak call raised the session total (meta.json spentUsd) by about $0.003 but wrote no row to v3/usage.jsonl or logs/calls.jsonl. So codeaf logs and day totals built from the ledger miss speech spend. Every paid call should have a usage row.

Replication

  1. Build dev 837b2b0 (git checkout 837b2b0 && make build, binary bin/codeaf), or install the dev build with curl -fsSL https://agentfield.ai/get/devaf | bash.
  2. Use an isolated profile: export HOME=$(mktemp -d), export OPENROUTER_API_KEY, and keep the default model (~deepseek/deepseek-v4-flash-latest, crew on auto).
  3. On a busy machine set task.max_load to 0 (/settings, Tasks) so the busy-machine gate does not hold tasks.
  4. cd $(mktemp -d) && codeaf, then: Say "hello from codeaf" out loud and save it as hello.mp3.
  5. Compare the session's meta.json spentUsd before and after with tail -n 3 $HOME/.codeaf/v3/usage.jsonl and codeaf logs --tail.

Evidence

  • meta.json spentUsd rose by about $0.003; no new row in usage.jsonl or calls.jsonl.
  • internal/session/tools_image.go:152-160 and internal/session/loop.go:5449: the chat belt adds media cost to the session only.

Guessed cause

A guess from reading the code, not a confirmed diagnosis. The chat belt adds media cost to the session total, not through the usage ledger.

Acceptance

  • e2e: after the speech request above, usage.jsonl has one row with the speech model and its cost, and codeaf logs shows the call.

Found while writing the public docs; manual text differences are in #1545.

🤖 Generated with Claude Code

主要言語
Go
スター
115
フォーク
14
平均マージ
9時間 37分
マージ済み PR(30日)
755

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

Agent-Field/CodeAF のほかの issue

Agent-Field/CodeAF の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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