sam e88ab5ee85 fix(middleware): remove off-by-one tail call in retry streaming paths
ChatStream and StreamObject were issuing one extra unscheduled provider
call after MaxAttempts was exhausted, billing MaxAttempts+1 calls instead
of MaxAttempts on permanent-failure retries. Capture the last stream/err
across iterations and return them after the loop instead.

Adds middleware/retry_test.go with exact call-count assertions for all
four retry paths (Chat, ChatStream, GenerateObject, StreamObject),
MaxAttempts=1 short-circuit, non-retryable short-circuit, success-after-
retries, and ctx-cancellation paths.

Refs ai-sdk-5jb.1
2026-08-28 22:28:48 +10:00
2026-08-25 05:48:17 +10:00
S
Description
Archie connects events from your systems to agents that can investigate, reason, and act. Define what an event means, map its data into a workflow, and give that workflow an agent equipped for the job: its own execution environment, tools, and identity.
https://archie.catlow.cloud
Apache-2.0
133 MiB
0 Stars 1 Watchers 0 Forks
2026-11-10 10:01:23 +00:00
Languages
Go 76.8%
Vue 13.1%
TypeScript 7.8%
JavaScript 1.2%
Shell 0.6%
Other 0.4%