TanStack
OSS
ai
Overview
Sign in / Sign up
Open main menu
ai
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
claude/usechat-fetcher-alternative
a1f194a4 fix: address CodeRabbit review comments on PR #512 Closes 5 review items in one batch: - ChatFetcher return type now accepts Response/AsyncIterable directly (not just Promise<...>), so async generator fetchers work without `as unknown as ChatFetcher` casts. Drops 6 such casts from tests. - Rename DistributedOmit type parameters O/K → TObject/TKeys to satisfy the project's @typescript-eslint/naming-convention rule (2 CI lint errors). - StreamTruncatedError in readStreamLines no longer fires when the consumer aborts mid-line — user-initiated stop() is expected, not a truncation bug. - validateSearch in $feature.tsx whitelists mode against the allowed Mode union instead of casting arbitrary URL strings. - Fix rendered code snippet in server-fn-chat.tsx — the documented shape now matches the actual `chatFn({ data: { messages }, signal })` call. - Add a fetcher-specific e2e assertion: the route sends a sentinel `x-tanstack-ai-transport: fetcher` header, and chat.spec.ts waits for a request carrying it. Without this, a silent fallback to the connection adapter would still pass the response assertion. Verified: - pnpm test:lib: 26/26 - pnpm test:eslint: 26/26 - pnpm --filter @tanstack/ai-e2e test:e2e: 196/196
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
a1f194a4 Merge 03fd06b17369423b26592e756158a8fc7223586b into 6176067597f93cc1a3328efa8c489fd7f308776c
by Tom Beckenham
T
Failed
claude/usechat-fetcher-alternative
cd7c9a38 Merge b67a123ec41d3f31c4ad7b1d605e720106986bd6 into 6176067597f93cc1a3328efa8c489fd7f308776c
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
cd7c9a38 ci: apply automated fixes
by autofix-ci...
a
Succeeded
claude/usechat-fetcher-alternative
bd8caf62 refactor(e2e): narrow $feature.tsx route params via type predicates Route.useParams() returns provider/feature as raw strings. Previously the file used an `as { provider: Provider; feature: Feature }` cast on the destructure, which an earlier autofix removed — leaving TS to flag each downstream usage as TS2345. Replace with two small `isProvider` / `isFeature` type predicates over the existing ALL_PROVIDERS / ALL_FEATURES arrays. The existing "return <NotSupported />" guard now narrows the strings while still performing the runtime "is this a known provider/feature?" check.
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
bd8caf62 Merge ac02c64365a689462fff66cc7ac76d45d76a7bd1 into 6176067597f93cc1a3328efa8c489fd7f308776c
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
e77b6dc4 fix: complete tool calls with server results (#596) * fix: complete tool calls with server results * fix: hydrate server tool outputs from history * test: cover server tool history hydration * ci: apply automated fixes * test: add issue 176 manual repro page * ci: apply automated fixes * test: add live issue 176 repro flow * test: hide issue 176 repro from sidebar --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Alem Tuzlak
A
Failed
claude/usechat-fetcher-alternative
e77b6dc4 fix: complete tool calls with server results (#596) * fix: complete tool calls with server results * fix: hydrate server tool outputs from history * test: cover server tool history hydration * ci: apply automated fixes * test: add issue 176 manual repro page * ci: apply automated fixes * test: add live issue 176 repro flow * test: hide issue 176 repro from sidebar --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Alem Tuzlak
A
Succeeded
claude/usechat-fetcher-alternative
0546b596 fix(ai-anthropic): webFetchTool() + webSearchTool() no longer corrupt client tool args (#606) * fix(ai-anthropic): handle server_tool_use blocks without corrupting prior tool_use input The streaming adapter had no handler for Anthropic's `server_tool_use`, `web_fetch_tool_result`, or `web_search_tool_result` content blocks. When a client `tool_use` was followed by a `server_tool_use` in the same response, the server tool's `input_json_delta` events appended onto the prior client tool's input buffer — producing concatenated JSON that threw in the agent loop's JSON.parse. Closes #604. - Track `server_tool_use` in a separate buffer from `toolCallsMap` - Dispatch `input_json_delta` by `currentBlockType` so server-tool deltas can't leak into client tool args - Acknowledge `web_fetch_tool_result` / `web_search_tool_result` blocks in `content_block_stop` so they don't fall through to the text branch - Add unit tests for both the mixed-tool case and the server-only case Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai-anthropic): surface server-tool result errors and add observability Address review findings on the issue #604 fix: - web_fetch_tool_result / web_search_tool_result blocks may carry an error variant (url_not_accessible, max_uses_exceeded, etc.). Inspect the content at content_block_start and log via logger.errors so a failed server-side fetch/search isn't invisible to the consumer. - Log a breadcrumb on server_tool_use stop so devtools and telemetry can see which server tool ran with what input. - Parameterize the server-only test across web_fetch and web_search result block types so the OR'd branch can't silently regress. - Add a test asserting the error variant is logged. - Trim issue-number references and event-narration comments from tests per project conventions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(ai-anthropic): add e2e coverage for server_tool_use streaming fix aimock can't natively synthesize Claude's `server_tool_use` / `web_fetch_tool_result` blocks, so mount a custom path on aimock that emits the exact SSE shape from issue #604 and drive the Anthropic adapter against it through a test-only API route. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: apply automated fixes * test(ai-anthropic): drive e2e test through real webFetchTool() Reframe the #604 regression test around the user-facing surface: pass `webFetchTool()` from `@tanstack/ai-anthropic/tools` into the tools array alongside a user client tool, rather than just emitting synthetic `server_tool_use` SSE. The aimock mount stays as-is — aimock can't natively synthesize Claude's `server_tool_use` block shape, so it still hand-crafts the response. But the request side now goes through the actual `webFetchTool()` tool definition, proving the user-facing flow works end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: apply automated fixes --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Tom Beckenham
T
Failed
claude/usechat-fetcher-alternative
0546b596 fix(ai-anthropic): webFetchTool() + webSearchTool() no longer corrupt client tool args (#606) * fix(ai-anthropic): handle server_tool_use blocks without corrupting prior tool_use input The streaming adapter had no handler for Anthropic's `server_tool_use`, `web_fetch_tool_result`, or `web_search_tool_result` content blocks. When a client `tool_use` was followed by a `server_tool_use` in the same response, the server tool's `input_json_delta` events appended onto the prior client tool's input buffer — producing concatenated JSON that threw in the agent loop's JSON.parse. Closes #604. - Track `server_tool_use` in a separate buffer from `toolCallsMap` - Dispatch `input_json_delta` by `currentBlockType` so server-tool deltas can't leak into client tool args - Acknowledge `web_fetch_tool_result` / `web_search_tool_result` blocks in `content_block_stop` so they don't fall through to the text branch - Add unit tests for both the mixed-tool case and the server-only case Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai-anthropic): surface server-tool result errors and add observability Address review findings on the issue #604 fix: - web_fetch_tool_result / web_search_tool_result blocks may carry an error variant (url_not_accessible, max_uses_exceeded, etc.). Inspect the content at content_block_start and log via logger.errors so a failed server-side fetch/search isn't invisible to the consumer. - Log a breadcrumb on server_tool_use stop so devtools and telemetry can see which server tool ran with what input. - Parameterize the server-only test across web_fetch and web_search result block types so the OR'd branch can't silently regress. - Add a test asserting the error variant is logged. - Trim issue-number references and event-narration comments from tests per project conventions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(ai-anthropic): add e2e coverage for server_tool_use streaming fix aimock can't natively synthesize Claude's `server_tool_use` / `web_fetch_tool_result` blocks, so mount a custom path on aimock that emits the exact SSE shape from issue #604 and drive the Anthropic adapter against it through a test-only API route. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: apply automated fixes * test(ai-anthropic): drive e2e test through real webFetchTool() Reframe the #604 regression test around the user-facing surface: pass `webFetchTool()` from `@tanstack/ai-anthropic/tools` into the tools array alongside a user client tool, rather than just emitting synthetic `server_tool_use` SSE. The aimock mount stays as-is — aimock can't natively synthesize Claude's `server_tool_use` block shape, so it still hand-crafts the response. But the request side now goes through the actual `webFetchTool()` tool definition, proving the user-facing flow works end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: apply automated fixes --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
af014887 chore(release): downgrade non-react framework hooks to patch `ai-preact`, `ai-solid`, `ai-svelte`, and `ai-vue` don't add any new public exports — they only adjust internal plumbing to handle the new connection/fetcher XOR shape from `ai-client`. `ai-react` stays minor because it genuinely re-exports new symbols (`rpcStream`, `ChatFetcher`, `ChatFetcherInput`, `ChatFetcherOptions`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
af014887 Merge ced9669ec53dae2c1bd7e79e4f62235112fcdc58 into ff338557d9ea54c960617f52c89c488140d60f85
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
86d853f8 Merge ebec591ad62cba6cf73724f80a7ed6b1e4173a35 into ff338557d9ea54c960617f52c89c488140d60f85
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
86d853f8 chore(release): bump framework hooks to minor for fetcher option Add `@tanstack/ai-preact`, `ai-solid`, `ai-svelte`, and `ai-vue` to the fetcher changeset as minor bumps — they all expose the new `fetcher` option transitively via `ChatClientOptions`. Also simplify the hooks to pick the transport into a single object before constructing `ChatClient`, instead of duplicating the option bag in if/else branches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
074e557f refactor(hooks): branch on connection/fetcher in useChat instead of spreading a partial transport Mirrors the pattern in `useGeneration` (multimedia hooks): build a `baseOptions` literal once, then call `new ChatClient(...)` in two narrow branches with the matching transport. Drops the `optionsRef.current.fetcher!` non-null assertion and the awkward discriminated-union spread, and provides a clear hook-level error when neither `connection` nor `fetcher` is provided. Applied to all five chat hooks: ai-react, ai-preact, ai-solid, ai-vue, ai-svelte. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
074e557f Merge 6a7d2f785058e59dee37e53b5d0bcd460b590d89 into ff338557d9ea54c960617f52c89c488140d60f85
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
f7cc9149 refactor(ai-client): enforce connection/fetcher XOR via ChatTransport type Promote `ChatClientOptions` to a discriminated union so exactly one of `connection` or `fetcher` is required at the type level, surface stream truncation as a `StreamTruncatedError` instead of a silent warn, synthesize RUN_FINISHED on legacy `[DONE]` sentinels, and abort fetcher-returned async iterables that ignore their signal. Update framework wrappers (react/preact/solid/svelte/vue) and the e2e route to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
f7cc9149 Merge 8f455c5c9dac261b693de2fa097bb98e43a2bc02 into ff338557d9ea54c960617f52c89c488140d60f85
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
ed2f471e Merge 8efd867e48d6824ac2122ced30a4f982e12e7c16 into ff338557d9ea54c960617f52c89c488140d60f85
by Tom Beckenham
T
Succeeded
claude/usechat-fetcher-alternative
ed2f471e fix(ai-client): port #508 robustness fixes onto fetcher-alt branch The fetcher path uses the same SSE parsing and connect-wrapper plumbing as the stream() path on #508, so the polish that landed during #508's review applies directly here. Carry it over so this branch has the same robustness. - Skip SSE control lines (`:` comments, `event:` / `id:` / `retry:`) in responseToSSEChunks. Proxies and CDNs inject these as keepalives; letting them through would feed JSON.parse a non-payload line. - Drop unterminated trailing buffer in readStreamLines. A non-empty buffer at stream end means the connection was cut mid-line, so the data is partial — yielding it would surface a misleading RUN_ERROR for what is really a transport-layer issue. - Surface JSON.parse failures in responseToSSEChunks and fetchHttpStream. Stop swallowing them behind console.warn; let SyntaxError propagate so the connect-wrapper turns it into a visible RUN_ERROR. - Drop unsafe `as unknown as StreamChunk` casts in normalizeConnectionAdapter's synthesized RUN_FINISHED / RUN_ERROR events. Use EventType + RunFinishedEvent / RunErrorEvent so missing required fields are caught by the compiler. Track upstream threadId/runId from chunks and reuse them in the synthesis instead of fabricating both ids unconditionally. - Forward optional abortSignal third arg through stream() and rpcStream() factory signatures. Backwards-compatible for existing callers; lets long-running factories cancel when useChat aborts. Mirrors what fetcherToConnectionAdapter already does. Tests: - Update the two `should handle malformed JSON gracefully` tests to assert SyntaxError throws instead of silent drop. - Update stream() / rpcStream() factory mock assertions to expect the new third arg. - Add chat-fetcher test asserting a fetcher returning a malformed-SSE Response surfaces as a RUN_ERROR via onError. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Previous page
Previous
Next
Next page