Skip to content

feat(devtools): migrate devtools off middleware#12868

Closed
aayush-kapoor wants to merge 7 commits intomainfrom
aayush/devtools
Closed

feat(devtools): migrate devtools off middleware#12868
aayush-kapoor wants to merge 7 commits intomainfrom
aayush/devtools

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

Background

our devtools setup currently uses middleware to extract event info

this needed to change since we now expose all the callbacks that will be needed by devtools, and it doesn't need to wrap with a middleware

Summary

  • use the telemetry interface for using callback info
  • add a trace viewer (for o11y)

Manual Verification

verified by running the localhost:5173 devtools viewer

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@tigent tigent Bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. ai/telemetry feature New feature or request labels Feb 26, 2026
@aayush-kapoor aayush-kapoor marked this pull request as draft February 26, 2026 01:19
};
}): Promise<GenerateTextResult<TOOLS, OUTPUT>> {
const model = resolveLanguageModel(modelArg);
const telemetryListeners = expandHandlers<TOOLS, OUTPUT>(telemetry?.handlers);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

call globalTelemetry instead

@rovo89
Copy link
Copy Markdown

rovo89 commented Apr 8, 2026

In case anyone else was watching this PR - it seems to be superseded by #14207.

aayush-kapoor added a commit that referenced this pull request Apr 10, 2026
## Background

our devtools setup currently uses middleware to extract event info

this needed to change since we now expose all the events that will be
needed by devtools to initialise the spans

replacement for #12868

## Summary

- create new `devToolsIntegration()` that extends on the telemetry
integration api
- add a trace/span viewer that properly maps each step 

## Manual Verification

verified by running the example
`examples/ai-functions/src/generate-text/anthropic/subagent-with-telemetry.ts`

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [ ] I have reviewed this pull request (self-review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants