Repository navigation
a node retry avoids the upstream provider that just failed - #1094
Merged
Merged
Conversation
Co-Authored-By: codeaf <[email protected]>
Co-Authored-By: codeaf <[email protected]>
Co-Authored-By: codeaf <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sb7knukoGMPXo8kK876MsU
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sb7knukoGMPXo8kK876MsU
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Sb7knukoGMPXo8kK876MsU
santoshkumarradha
marked this pull request as ready for review
September 17, 2026 06:42
Member
Author
|
Pre-merge run on the exact head e7d65a5: Spark job 20260917-064054-000535, go build ./... ok, go vet ok, go test -count=1 ok for internal/exec, internal/exec/bare, internal/provider, internal/provider/pool, cmd/codeaf. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What failed
A node call that failed on the upstream machine OpenRouter routed it to was
retried up to three times as the same request. Each fresh attempt was built
with fresh knobs and — under the simple routing row — no
providerobject onthe wire at all, so the router's own default routing answered every attempt
the same way, all three landed on the same upstream, and the node ended with
after 3 node call attempts: provider ended the response with finish_reason=errorhaving produced no work.What the retry now does
An attempt that failed on a NAMED upstream — a relayed 5xx (
APIError.Provider,which is where a
finish_reason=errorreply is normalized to), or a cut stream(
StreamCut.Provider) — records that machine and the next attempt asks therouter not to use it. The names accumulate across the attempts of one call, so
the third attempt avoids the machines that failed the first two.
provider.WithRetryAvoid) the way everyother per-call fact does, and is read once into
callKnobs. It is built inthe node's own retry loop, handed over per attempt, and gone when the call
ends — nothing reaches a later call or a stored setting.
provider.ignore, merged into whatever preference objectthe request already composed rather than replacing it: the sort word, a
ranking and a demand all survive beside it.
only,orderandignorearenarrowed through one shared field law (
providerPrefs.strike), which theper-call refusal list already followed, so two lists cannot carry two answers
about how the three fields fit together.
ignore, and ademand the veto emptied stops being a demand.
of
off— including the direct, one-road services that resolve to it — areleft exactly as they were, so those requests are byte-for-byte unchanged.
always went.
Every request that does not fail this way carries an empty list and is
unchanged.
Tests
New tests beside both touched packages: the retry carries the list and
accumulates it; a cut stream's name is carried; a failure naming nobody avoids
nothing; a relayed 4xx names no machine; the list does not outlive its call, at
the node loop and at the request body alike; the veto goes out on the next body,
rides beside a ranked road, stays off a road that asked for no preference
object, and never empties a demand it joined.
How it was tested
Spark job
20260917-063523-000531, revisione1d0e75248273cbb1eddfac983313fcc7ff871b0:go build ./...,go vetandgo test -count=1over./internal/exec/...,./internal/provider/...and./cmd/codeaf/...— all green.🤖 Generated with Claude Code
https://claude.ai/code/session_01Sb7knukoGMPXo8kK876MsU