Skip to content

fix(ingest): keep TypeScript ADK's Gemini thinking whole - #1173

Merged
JeremyFunk merged 1 commit into
mainfrom
fix/ingest-gemini-output-excludes-thinking
Sep 30, 2026
Merged

JeremyFunk merged 1 commit into
mainfrom
fix/ingest-gemini-output-excludes-thinking

fix(ingest): keep TypeScript ADK's Gemini thinking whole

db32f23
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 30, 2026 in 2m 20s

Confidence 4/5 · No issues found

🟢 Confidence 4/5 · likely safe to merge
The rule rests on call_llm being the TS ADK model call and never Python ADK's; one synthetic prod span and the captures back that, not more.
quality 100/100 · no findings · tests covered · risk medium

Adds an output_excludes_reasoning rule so TypeScript ADK's Gemini call_llm keeps its thoughts out of the visible output instead of being clamped away, while every other emitter keeps the clamp. Contained to the ingest usage stamping, with tests on both sides.

  • output_excludes_reasoning is true only for vendor google_adk on span call_llm
  • Usage::read takes the flag and skips the reasoning clamp for that emitter
  • New tests cover the exclusive TS ADK call and three inclusive Gemini emitters
What was checked
  • Exclusive branch does not double count: output plus reasoning still equals the billed total (usage.rs:287)
  • A call_llm becomes the model call only through an inference op, so Python ADK's wrapper stays a wrapper (usage.rs:183)
  • Both Usage::read call sites updated; no other caller of the clamp exists (usage.rs:157, usage.rs:1749)

db32f23 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.