Skip to content

Conversation

@dannykopping
Copy link
Collaborator

@dannykopping dannykopping commented Dec 30, 2025

TODO: apply to OpenAI as well.

Signed-off-by: Danny Kopping <[email protected]>
Copy link
Collaborator Author

dannykopping commented Dec 30, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

case routeMessages:
var req messages.MessageNewParamsWrapper
if err := json.Unmarshal(payload, &req); err != nil {
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
Copy link

Choose a reason for hiding this comment

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

I tried this when I ran the initial scaletests in my workspace.
It streams top level, which is great. But the moment it descends into the Anthropic/OpenAI stainless sdk, it just Unmarshals there anyway. I wasn't able to measure any tangible improvements by doing this. Is there something that I'm missing?

Copy link

Choose a reason for hiding this comment

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

I'd love a world where we can stream the entire payload a single token at a time and then essentially tee that stream into the database for analytics, but I haven't found a way to do that while we use the SDKs that we're currently using.

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