Repository navigation
[Hotfix] Cherry-pick to release-v0.179.3 - #1094
truefoundry-saas merged 6 commits into
Conversation
🦋 Changeset detectedLatest commit: 168851d The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
…de 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 * nit: env ordering (cherry picked from commit 69f0990)
* 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 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)
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 168851d. Configure here.
| const outboundHeaders = | ||
| provider.type === 'truefoundry' | ||
| ? { ...headers, 'anthropic-beta': 'fine-grained-tool-streaming-2025-05-14' } | ||
| : headers; |
There was a problem hiding this comment.
Anthropic beta header on all models
Medium Severity
Every TrueFoundry request now gets anthropic-beta: fine-grained-tool-streaming-2025-05-14. In TrueFoundry mode all catalog models share provider.type === 'truefoundry', so GPT, Gemini, Bedrock, and other non-Anthropic models receive this Anthropic-only header. The header is also written last, so it replaces any existing anthropic-beta value instead of merging features. The native Anthropic path already uses toolStreaming; this obsolete beta is known to be rejected by some backends (for example Bedrock Claude), which can fail the whole model call.
Reviewed by Cursor Bugbot for commit 168851d. Configure here.


Automated cherry-pick for release request
735ce6c7-5f21-475b-9b37-e1109508fa67.Source PRs (merged to main):
Warning
This PR does not contain the fix yet. The cherry-pick conflicted, so
automation stopped at the first conflicting commit and left the rest out.
GitHub therefore shows this PR as mergeable, with no conflict to resolve —
it currently carries no changes at all (an empty placeholder commit).
Paste the prompt below into any coding agent that has this repository open.
It checks out this branch, applies the missing commits, and pushes.
Do not merge the PR. The release request checks every commit within a few
minutes (or use "Sync status" on it). The PR is merged when the request is
approved — or, if it is already approved, when a QA member or engineering
admin uses "Retry merge".
Agent prompt — copy from here:
Conflicting file(s):
packages/frontend/src/authSession.tsCommits still to apply (starting at the conflict):
7f2be59e6e8beaa91d67aa9e6338203a519beed769f099012ee004b79c4bd9da0e7e5725b804cdc0b037c92d91f64ea75665379062faf3c36551256c248e7683b4d3f96b5fd0bb54e875989ad1c148bcDo not merge manually — this PR is merged automatically when the release request is approved. If you do merge it yourself, use "Sync status" on the request so it stops showing as pending.
Note
Medium Risk
Changes the LLM request path and MCP tool-call handling for streaming/parsing, plus a behavioral change to model spec validation; analytics event names are a breaking rename for existing dashboards.
Overview
Release hotfix (0.179.2) bundling Anthropic tool streaming, analytics, session validation, and image build wiring.
Agent / LLM: For the TrueFoundry provider, outbound requests now send the
anthropic-beta: fine-grained-tool-streaming-2025-05-14header and always set AnthropictoolStreaming: truein provider options. Tool execution parsesfunction.argumentsbefore calling MCP tools; invalid or non-object JSON returns a structured parse error (no tool invoke) so the model can retry.Session specs:
model.params.reasoning_effortis checked against the model’s advertised efforts only when that list is non-empty—empty/missing lists no longer 422 specs that set an effort.Analytics: Public
AnalyticsEventsstrings are prefixed withtrueforge.for host sinks. The frontend wires PostHog viaVITE_POSTHOG_*in the Docker/release build;hostAnalyticsis created only for authenticated sessions and attachestenanton eachcapture.Reviewed by Cursor Bugbot for commit 168851d. Bugbot is set up for automated code reviews on this repo. Configure here.