Skip to content

feat: add x-tfy-conversation-id header for session tracking in gateway calls - #1210

Merged
thesujai merged 1 commit into
mainfrom
feat/conversation-id-to-gateway
Oct 28, 2026
Merged

thesujai merged 1 commit into
mainfrom
feat/conversation-id-to-gateway

Conversation

@thesujai

@thesujai thesujai commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

…

Summary

Closes AGE-2549

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
Additive request header on gateway invokes; behavior is covered by unit tests and does not change auth or metadata parsing.

Overview
Gateway outbound calls now include a dedicated x-tfy-conversation-id header set to the TrueForge session id, in addition to the existing x-tfy-metadata JSON (which still carries tfg.session_id and other turn stamps).

The new constant lives in gatewayMetadata.ts, and gatewayMetadataHeadersForTurn merges it whenever turn metadata is present—so TrueFoundry and inline model provider and MCP invoke paths pick it up automatically. Unit tests were extended to assert the header across those flows.

Reviewed by Cursor Bugbot for commit ea64f95. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ea64f95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge Patch

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

@thesujai
thesujai merged commit f91d0c3 into main Oct 28, 2026
15 checks passed
@thesujai
thesujai deleted the feat/conversation-id-to-gateway branch October 28, 2026 14:02
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