Repository navigation
feat: fine-grained tool streaming via TFY beta header - #1088
Merged
Merged
Conversation
TrueFoundry uses anthropic_beta instead of mutating tool defs; native Anthropic keeps call-level toolStreaming. Co-authored-by: Cursor <cursoragent@cursor.com>
chiragjn
requested review from
debajyoti-truefoundry,
heerambavi1998 and
thesujai
as code owners
October 19, 2026 03:03
🦋 Changeset detectedLatest commit: e3e7090 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1979e22. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
Match Anthropic's wire header spelling instead of anthropic_beta. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fine-grained streaming can leave incomplete arguments; surface parse_error without echoing the raw payload. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks done
cursor Bot
pushed a commit
that referenced
this pull request
Oct 19, 2026
* feat: fine-grained tool streaming via TFY beta header TrueFoundry uses anthropic_beta instead of mutating tool defs; native Anthropic keeps call-level toolStreaming. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor: inline TFY fine-grained tool streaming beta string Co-authored-by: Cursor <cursoragent@cursor.com> * fix: use anthropic-beta header name for TFY tool streaming Match Anthropic's wire header spelling instead of anthropic_beta. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: drop TFY beta header unit test; note deprecation Co-authored-by: Cursor <cursoragent@cursor.com> * feat: report invalid tool-arg JSON as a distinct parse error Fine-grained streaming can leave incomplete arguments; surface parse_error without echoing the raw payload. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 248e768)
cursor Bot
pushed a commit
that referenced
this pull request
Oct 19, 2026
* feat: fine-grained tool streaming via TFY beta header TrueFoundry uses anthropic_beta instead of mutating tool defs; native Anthropic keeps call-level toolStreaming. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor: inline TFY fine-grained tool streaming beta string Co-authored-by: Cursor <cursoragent@cursor.com> * fix: use anthropic-beta header name for TFY tool streaming Match Anthropic's wire header spelling instead of anthropic_beta. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: drop TFY beta header unit test; note deprecation Co-authored-by: Cursor <cursoragent@cursor.com> * feat: report invalid tool-arg JSON as a distinct parse error Fine-grained streaming can leave incomplete arguments; surface parse_error without echoing the raw payload. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 248e768)
truefoundry-saas
added a commit
that referenced
this pull request
Oct 19, 2026
* cherry-pick (needs manual conflict resolution) * chore: Add PostHog envs in Dockerfile, add trueforge prefix and include tenant id (#1036) * chore: accept PostHog Vite build args in Dockerfile Allow SaaS image builds to bake in analytics via --build-arg without affecting default OSS images. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor: update analytics event names to include 'trueforge' namespace * refactor: enhance analytics tracking with tenant ID and update session state structure * feat: prefix AnalyticsEvents names with 'trueforge.' for better event namespacing * refactor: simplify SessionState type definition for clarity --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 7f2be59) * Wire posthog creds during build (#1059) * Wire posthog creds during build * nit: env ordering (cherry picked from commit 69f0990) * refactor: remove reasoning effort validation from agent spec (#1067) * refactor: remove reasoning effort validation from agent spec * refactor: simplify reasoning effort validation logic in agent spec * chore: add changeset for relaxed reasoning effort validation Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit b037c92) * feat: fine-grained tool streaming via TFY beta header (#1088) * feat: fine-grained tool streaming via TFY beta header TrueFoundry uses anthropic_beta instead of mutating tool defs; native Anthropic keeps call-level toolStreaming. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor: inline TFY fine-grained tool streaming beta string Co-authored-by: Cursor <cursoragent@cursor.com> * fix: use anthropic-beta header name for TFY tool streaming Match Anthropic's wire header spelling instead of anthropic_beta. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: drop TFY beta header unit test; note deprecation Co-authored-by: Cursor <cursoragent@cursor.com> * feat: report invalid tool-arg JSON as a distinct parse error Fine-grained streaming can leave incomplete arguments; surface parse_error without echoing the raw payload. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 248e768) * Regenerate OpenAPI document and SDKs --------- Co-authored-by: harshil-2096 <100749155+harshil-2096@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Chirag Jain <jain.chirag925@gmail.com> Co-authored-by: Sujai Kumar Gupta <120925871+thesujai@users.noreply.github.com> Co-authored-by: trueforge-dev-bot[bot] <trueforge-dev-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
truefoundry, sendanthropic_beta: fine-grained-tool-streaming-2025-05-14on outbound model requests instead of mutating tool defs witheager_input_streaming(safer rollout; feat: pass eager_input_streaming on TrueFoundry chat tools #1071 remains the tool-def approach)anthropic, pin call-leveltoolStreaming: trueso tools get fine-grained input streaming on the Anthropic wireTest plan
anthropic_betaheader on compatible clientbuildProviderOptionsincludestoolStreaming: trueMade with Cursor
Note
Medium Risk
Changes outbound LLM headers/provider options and tool-call argument handling on the agent execution path; parse failures are isolated but behavior for malformed args differs from prior implicit JSON.parse throws.
Reviewed by Cursor Bugbot for commit e3e7090. Bugbot is set up for automated code reviews on this repo. Configure here.