Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

resolveResumeRunId.md

27 lines569 Bytes

1---
2id: resolveResumeRunId
3title: resolveResumeRunId
4---
5​
6```ts
7function resolveResumeRunId(request): string | null;
8```
9​
10Defined in: packages/ai/src/stream-durability.ts:141
11​
12The run id a request names: `X-Run-Id` header first, then `?runId`.
13​
14The single implementation of that precedence, shared by the durability
15adapters below and by the resume response helpers' run driver
16(`stream-to-response.ts`), so the helper and the adapter can never disagree
17about which run a request is talking about.
18​
19## Parameters
20​
21### request
22​
23`Request`
24​
25## Returns
26​
27`string` \| `null`