Skip to content

Name the serving route on advisor errors and failed fallbacks - #12

Merged
judagent[bot] merged 1 commit into
masterfrom
fix/advisor-fallback-followups
Sep 23, 2026
Merged

judagent[bot] merged 1 commit into
masterfrom
fix/advisor-fallback-followups

Conversation

@judagent

@judagent judagent Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Follow-up hardening for the PR #11 anthropic→opencode fallback, from live
review of the first fallback-era calls:

  • Error rows now record advisorProvider whenever a route was chosen, so a
    failed generation on the fallback no longer looks like an Anthropic
    failure. Rows where no route was chosen still omit it.
  • A failed fallback reports both reasons with the primary first, keeping
    classifyAdvisorError on the configured route.
  • The fallback support check is wrapped so its own failure can never mask
    the primary error.
  • Regression test: the shared advisor session re-pins to opencode on
    fallback and back to anthropic when 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 now
visible via advisorProvider, so string-based gating would add brittleness
without a real safety win.

Verification

  • bun test: 363 pass, 0 fail; tsc --noEmit clean.
  • Live smoke on master (pre-fix): advisor_response on
    anthropic/claude-opus-5-5#xhigh with benchmarks matched across the
    board, requester meta/muse-spark-1.3#max via invocation_message.

Models: anthropic/claude-opus-5-5:xhigh, meta/muse-spark-1.3:max, anthropic/claude-fable-5-1:xhigh

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.
@judagent judagent Bot assigned judsd Sep 23, 2026
@judagent
judagent Bot merged commit 0696496 into master Sep 23, 2026
4 checks passed
@judsd
judsd deleted the fix/advisor-fallback-followups branch September 23, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant