Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,588 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend, cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Go
Stelle
115
Fork
14
Merge medio
9h 44m
PR unite (30g)
766

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Agent-Field/CodeAF

Tutte le issue di Agent-Field/CodeAF

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.