Repository navigation
fix(gateway): onFallback reports the most recent error, as the walkers do - #348
Conversation
…s do When a fallback hop could not start on the way to the hop that serves, the error onFallback received was still the one the previous hop failed with. It is the most recent error, as generateText's and streamText's walks report it: a hop that could not start on the way, else the previous hop's failure.
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 31 minutes for your next included review. View limit details
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe gateway now passes the most recent error to onFallback, matching generateText and streamText walker behavior: intermediate hop-start failures take precedence over the previous hop's failure. A regression test covers this multi-hop fallback scenario. Sequence diagram for gateway fallback error reportingsequenceDiagram
participant Gateway
participant PreviousHop
participant IntermediateHop
participant ServingHop
participant onFallback
Gateway->>PreviousHop: request
PreviousHop-->>Gateway: failure
Gateway->>IntermediateHop: start hop
IntermediateHop-->>Gateway: start failure
Gateway->>ServingHop: request
ServingHop-->>Gateway: resolution
Gateway->>onFallback: onFallback({from, to, hop, error: start failure})
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
## [0.13.69](v0.13.68...v0.13.69) (2026-10-12) ### fix * **gateway:** onFallback reports the most recent error, as the walkers do (#348) ([c1b4847](c1b4847)) * **gemini:** read data URLs in linear time, send https images for Gemini to fetch, and read every block as a content filter (#342) ([ad4df66](ad4df66))
Fold of the review comments on #346 (CodeRabbit and Codex's GitHub review, the same finding): when a fallback hop could not start on the way to the hop that serves,
onFallbackreceived the error the previous hop failed with rather than the most recent one. It now receives the most recent error, as generateText's and streamText's walks report it: a hop that could not start on the way, else the previous hop's failure.Test:
completionGateway.test.ts, a fallback that cannot start between the failed hop and the one that serves.Summary by Sourcery
Report the latest failure reason through completion fallback callbacks, matching the behavior of the text-generation walkers.
Bug Fixes:
Tests: