Skip to content

feat(core): add fallback targets for provider errors#905

Open
christso wants to merge 1 commit intomainfrom
feat/899-fallback-targets
Open

feat(core): add fallback targets for provider errors#905
christso wants to merge 1 commit intomainfrom
feat/899-fallback-targets

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 1, 2026

Summary

  • Added fallback_targets field to target definitions in targets.yaml
  • When primary target fails with retryable errors after exhausting retries, tries fallback targets in order
  • Records target_used in result JSONL when a fallback was used
  • Non-breaking: fallback_targets is optional, existing configs work unchanged

Test plan

  • 10 unit tests covering schema resolution and orchestrator fallback logic
  • All tests pass
  • Build, typecheck, lint clean
  • 53 example YAML files validate successfully

Closes #899

🤖 Generated with Claude Code

When a primary target fails with retryable errors after exhausting
retries, the runner now tries fallback_targets in order. The result
JSONL records which target actually served the response via target_used.

Closes #899

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8f9ba26
Status: ✅  Deploy successful!
Preview URL: https://08fd23ad.agentv.pages.dev
Branch Preview URL: https://feat-899-fallback-targets.agentv.pages.dev

View logs

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.

feat: fallback targets for provider errors

1 participant