Skip to content

fix: avoid duplicate token usage on llm fallback spans - #7532

Merged
chenghao-mou merged 1 commit into
mainfrom
chenghao/fix/AGT-3602-fallback-token-usage
Oct 4, 2026
Merged

chenghao-mou merged 1 commit into
mainfrom
chenghao/fix/AGT-3602-fallback-token-usage

Conversation

@chenghao-mou

Copy link
Copy Markdown
Member

Fallback wrappers repeat token usage from the serving provider request. Record GenAI usage only on the provider span, while preserving LLM metrics.

Adopts @SanjuMLGeek’s usage guard from #7396.

Addresses AGT-3602

Request summary and agent context

Model: GPT-6-Astra

Split the proposed telemetry improvements into focused PRs that are easy to review and revert. Use general problem summaries and omit customer details.

Co-authored-by: Sanjay Kukadiya <43816307+SanjuMLGeek@users.noreply.github.com>
@linear-code
linear-code Bot marked this pull request as ready for review October 4, 2026 04:26
@linear-code
linear-code Bot requested a review from a team as a code owner October 4, 2026 04:26

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@chenghao-mou
chenghao-mou merged commit 8d28326 into main Oct 4, 2026
27 checks passed
@chenghao-mou
chenghao-mou deleted the chenghao/fix/AGT-3602-fallback-token-usage branch October 4, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants