Skip to content

Commit 9e14c6f

Browse files
authored
docs(ai-chat): add the 4.5.0 GA changelog entry (triggerdotdev#4033)
## Summary Adds the `4.5.0` GA entry to the AI chat agents changelog covering the `chat.agent` changes in that release: a new `apiClient` option on `chat.headStart` and `chat.createStartSessionAction` for pointing chat sessions at a different project or environment, the fix for messaging chat agents deployed to a preview branch, and the fix for Head Start handovers when the agent also defines a `prepareMessages` hook. All four changes are from [triggerdotdev#4018](triggerdotdev#4018).
1 parent 4550b75 commit 9e14c6f

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

docs/ai-chat/changelog.mdx

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,42 @@
11
---
22
title: "Changelog"
33
sidebarTitle: "Changelog"
4-
description: "Pre-release updates for AI chat agents."
4+
description: "Changelog for the AI Agents SDK."
55
---
66

7+
<Update label="July 2, 2026" description="4.5.0" tags={["SDK", "Bug fix"]}>
8+
9+
## Point chat sessions at a different project or environment
10+
11+
[`chat.headStart`](/ai-chat/fast-starts#head-start) and [`chat.createStartSessionAction`](/ai-chat/sessions) now take an `apiClient` option (`baseURL` + `accessToken`). The server that creates the session and triggers the run can target a different project or environment than its ambient Trigger config, without setting a global `TRIGGER_SECRET_KEY`. Useful when your `chat.agent` lives in a separate project from the app serving the route, or when one server starts chats across more than one environment. Your LLM provider keys stay in the `run` callback and are unaffected. ([#4018](https://github.com/triggerdotdev/trigger.dev/pull/4018))
12+
13+
```ts
14+
export const POST = chat.headStart({
15+
agentId: "my-agent",
16+
apiClient: { baseURL, accessToken },
17+
run: async ({ chat }) =>
18+
streamText({ ...chat.toStreamTextOptions({ tools }), model: anthropic("claude-sonnet-4-6") }),
19+
});
20+
```
21+
22+
```ts
23+
const startSession = chat.createStartSessionAction("my-chat", {
24+
apiClient: { baseURL, accessToken },
25+
});
26+
27+
await startSession({ chatId, clientData });
28+
```
29+
30+
## Fix: chat agents on preview branches
31+
32+
Messaging a `chat.agent` (or `AgentChat`) deployed to a preview branch failed with `x-trigger-branch header required for preview env`. The realtime message-append and stream-subscribe calls now send the `x-trigger-branch` header, resolved the same way `sessions.start` resolves it, so preview-branch chat agents work. ([#4018](https://github.com/triggerdotdev/trigger.dev/pull/4018))
33+
34+
## Fix: Head Start handovers with a prepareMessages hook
35+
36+
A [Head Start](/ai-chat/fast-starts#head-start) handover passes the first turn's pending tool call to the agent as a tool-approval round whose trailing tool message must reach the model untouched. A `prepareMessages` hook that rewrites the last message (for example the recommended [prompt-caching](/ai-chat/prompt-caching) breakpoint) could disturb that tail, so the turn failed with `tool_use ids were found without tool_result`. The agent now preserves the approval tail across `prepareMessages`, so prompt caching and Head Start compose cleanly. ([#4018](https://github.com/triggerdotdev/trigger.dev/pull/4018))
37+
38+
</Update>
39+
740
<Update label="June 17, 2026" description="4.5.0-rc.7" tags={["SDK", "CLI", "Bug fix"]}>
841

942
## chat.headStart now works for custom agents and sessions

0 commit comments

Comments
 (0)