Repository navigation
feat(ai-client): send AG-UI protocolVersion in the run request body - #1934
kbuschgens wants to merge 4 commits into
Conversation
AG-UI 1.0 RunAgentInput has an optional protocolVersion field that the
consumer sends in-band. buildRunAgentInputBody now sets it to
PROTOCOL_VERSION ("1.0") for every connection adapter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01825k3Ap3Aa2ZVUkHA9d7iV
🦋 Changeset detectedLatest commit: f8ad02a The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01825k3Ap3Aa2ZVUkHA9d7iV
|
Thanks for the PR, @kbuschgens! 🙌 @jherr will take a look. Automated pre-review checks
Automated triage — a human review follows. |
|
Thanks for your review @AlemTuzlak! Two workflows are still pending for a maintainer approval. Could you approve them? |
|
View your CI Pipeline Execution ↗ for commit 37e1464
💡 With Ultracache enabled, Nx Cloud learns each task's file inputs in CI and uses them on later runs. Turn on Ultracache in workspace settings ↗ · Read docs ↗ ☁️ Nx Cloud last updated this comment at |
The chat client now sends
protocolVersion: "1.0"in every AG-UIRunAgentInputPOST body. AG-UI 1.0 (@ag-ui/core1.0.0) defines this optional field for the consumer's version. The spec says to send it in-band, so a recorded exchange describes itself. Before this PR,buildRunAgentInputBodydid not set it.🎯 Changes
buildRunAgentInputBodyin@tanstack/ai-clientsetsprotocolVersion: PROTOCOL_VERSION. All connection adapters use this function, so all of them send the field.@tanstack/ai/clientre-exportsPROTOCOL_VERSIONfrom@ag-ui/core, next toEventType.@tanstack/ai-clientgets the value from there.@tanstack/aiand@tanstack/ai-client).✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.docs/for this change, or this change is not user-facing.pnpm changeset), or this PR does not change a published package.🚀 Release Impact
Testing
Commands run.
test:prtarget set (nx affectedwith sherif, knip, docs, kiira, oxlint, lib, types, test:build, build): all 441 targets passed across 110 projects.@tanstack/ai-react:test:libtimed out once under parallel load and passed on rerun; Nx marks it flaky, and it does not touch this change.testing/e2e/tests/ag-ui-compliance.spec.tsfails without the fix (Received: undefined) and passes with it.ag-ui-compliance,ag-ui-foreign-client,ag-ui-old-client-rejection, andchatE2E specs: 19 passed.Manual test.
pnpm --filter @tanstack/ai-e2e test:e2e -- tests/ag-ui-compliance.spec.ts."protocolVersion": "1.0".How this PR makes testing easy. A unit test in
packages/ai-client/tests/connection-adapters.test.tsand an E2E assertion intesting/e2e/tests/ag-ui-compliance.spec.tsboth check the field in the request body.Risk / rollback
Low risk. The field is optional in the AG-UI schema, so servers that follow the spec accept it. A server with a strict schema that rejects unknown keys can reject the request. To undo, revert this PR.
Public API change
Before
After
Summary by CodeRabbit
1.0.