AgentSight's genai_events.jsonl records have token and per_call_token always set to None, even when the LLM response contains valid usage data (e.g. input_tokens=16911, output_tokens=1).
Reproduce:
agentsight trace &
cosh -p "What is 2+2" --auth-type openai -y
cat ~/.agentsight/genai_events.jsonl | python3 -c "import sys,json; [print(json.loads(l).get("per_call_token")) for l in sys.stdin]"
# All None
Root cause: Two independent gates: (1) token extraction only runs when is_sse=true, missing non-streaming responses; (2) audit record creation also gated on is_sse, skipping non-SSE calls entirely. Additionally, is_sse was hardcoded in one path instead of reading from http_record.
Fix: PR #681
AgentSight's
genai_events.jsonlrecords havetokenandper_call_tokenalways set toNone, even when the LLM response contains validusagedata (e.g.input_tokens=16911, output_tokens=1).Reproduce:
Root cause: Two independent gates: (1) token extraction only runs when
is_sse=true, missing non-streaming responses; (2) audit record creation also gated onis_sse, skipping non-SSE calls entirely. Additionally,is_ssewas hardcoded in one path instead of reading fromhttp_record.Fix: PR #681