mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
0363017503
The chat never responds and the browser console shows "TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation" on every agent run (onRunFailed, agentId: default). Root cause is in @ag-ui/client@0.0.56's HttpAgent: it stores the global fetch unbound (`this.fetch = config.fetch ?? fetch`) and later invokes it as `this.fetch(...)`, so native fetch runs with the agent instance as its receiver instead of `window`. Native fetch is brand-checked and throws "Illegal invocation". It surfaces in both dev and prod. Fixed upstream in @ag-ui/client@0.0.57 (`config.fetch ?? ((url, init) => fetch(url, init))`), which shipped in @copilotkit/* 1.60.1. Bumping these examples 1.60.0 -> 1.60.1 pulls 0.0.57 transitively; lockfiles regenerated. Scope: only the examples that take @ag-ui transitively from react-core are bumped here. Other integration examples force-pin @ag-ui via `overrides` to 0.0.53/0.0.55, where 1.60.1 would create a version skew; those need a per-integration bump and are intentionally left out of this change.