Repository navigation
Name the serving route on advisor errors and failed fallbacks - #12
Merged
Merged
Conversation
Generation failures now carry the serving route, so error rows record advisorProvider instead of looking like primary-route failures. A failed fallback reports both reasons with the primary first (error classification unchanged), and the fallback check is guarded so its own failure never masks the primary error. Adds a regression test proving the shared advisor session re-pins back to anthropic once the primary recovers.
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.
Follow-up hardening for the PR #11 anthropic→opencode fallback, from live
review of the first fallback-era calls:
advisorProviderwhenever a route was chosen, so afailed generation on the fallback no longer looks like an Anthropic
failure. Rows where no route was chosen still omit it.
classifyAdvisorErroron the configured route.the primary error.
opencodeonfallback and back to
anthropicwhen the primary recovers.Considered and declined: scoping the fallback to unavailability reasons by
matching reason strings. The guarded-against case (an effort invalid on the
primary but valid on
opencode) succeeds on an equivalent route and is nowvisible via
advisorProvider, so string-based gating would add brittlenesswithout a real safety win.
Verification
bun test: 363 pass, 0 fail;tsc --noEmitclean.advisor_responseonanthropic/claude-opus-5-5#xhighwith benchmarksmatchedacross theboard, requester
meta/muse-spark-1.3#maxviainvocation_message.Models: anthropic/claude-opus-5-5:xhigh, meta/muse-spark-1.3:max, anthropic/claude-fable-5-1:xhigh