Skip to content

fix(ingest): read Spring AI's Anthropic and Bedrock Converse usage as cache-exclusive - #1176

Merged
JeremyFunk merged 1 commit into
mainfrom
fix/ingest-spring-ai-anthropic-cache-exclusive
Sep 30, 2026
Merged

JeremyFunk merged 1 commit into
mainfrom
fix/ingest-spring-ai-anthropic-cache-exclusive

fix(ingest): read Spring AI's Anthropic and Bedrock Converse usage as…

163c28a
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 30, 2026 in 5m 59s

Confidence 4/5 · No issues found

🟢 Confidence 4/5 · likely safe to merge
One match arm on gen_ai.system, guarded, with the three prod sessions and the inclusive OpenAI case tested; the Spring AI enum strings themselves are the author's reading of its source.
quality 100/100 · no findings · tests covered · risk medium

Adds a spring_ai arm to the ingest cache-exclusivity rule, read per span from gen_ai.system, so Spring AI's Anthropic and Bedrock Converse usage stops losing the cache from the prompt. Contained and correct; safe to merge.

  • input_excludes_cache takes the Span and branches on gen_ai.system for spring_ai
  • Spring AI anthropic/bedrock_converse spans read cache-exclusive; openai stays inclusive
  • New test spring_ai_anthropic_and_converse_are_cache_exclusive covers the three prod sessions
What was checked
  • value_str returns "" for a non-string value, so the new matches! cannot panic (ai_session.rs:492)
  • The cache > prompt guard is kept (usage.rs:291), so a spring_ai span without gen_ai.system is read as before
  • gen_ai.system stays on the span until stamping: the read is per span, so one spring_ai trace can mix clients

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