Skip to content

fix(webapp): show errors on AI tool call and embed spans in the run inspector - #4653

Merged
matt-aitken merged 1 commit into
mainfrom
fix/ai-tool-call-span-errors
Aug 18, 2026
Merged

fix(webapp): show errors on AI tool call and embed spans in the run inspector#4653
matt-aitken merged 1 commit into
mainfrom
fix/ai-tool-call-span-errors

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

Summary

When an AI SDK tool call failed inside a run, the span showed up under the "Errors only" filter but the span inspector gave no hint of what went wrong. The exception was recorded on the span all along; the ai.toolCall and ai.embed inspector views just never rendered span events. Failed tool call and embedding spans now show the standard error block (message plus stack trace) below the Input section.

Root cause

Generic spans render exception span events via the SpanEvents component, but the AI-specific span entities replace the whole panel with their own layout and dropped the events entirely. The span's events are now passed into AIToolCallSpanDetails and AIEmbedSpanDetails and rendered with the same SpanEvents component the generic view uses.

Errored generation spans (ai.generateText and friends) use a tabbed view and still don't surface errors; that needs its own design pass and is left for a follow-up.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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.

Open in Devin Review

@matt-aitken
matt-aitken enabled auto-merge (squash) August 18, 2026 09:49
@matt-aitken
matt-aitken merged commit 40c4064 into main Aug 18, 2026
53 of 60 checks passed
@matt-aitken
matt-aitken deleted the fix/ai-tool-call-span-errors branch August 18, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants