Skip to content

feat: retry gating, quarantine, and relaxed model-key regex - #29

Open
Oren-Schmerling wants to merge 2 commits into
Smart-Coders-HQ:mainfrom
Oren-Schmerling:feature/retry-quarantine
Open

Oren-Schmerling wants to merge 2 commits into
Smart-Coders-HQ:mainfrom
Oren-Schmerling:feature/retry-quarantine

Conversation

@Oren-Schmerling

@Oren-Schmerling Oren-Schmerling commented Oct 21, 2026 •

Copy link
Copy Markdown

Summary

Adds retry gating, post-fallback quarantine, and the relaxed model-key regex (folded in from #28) so a single merge makes all permanent.

Relaxed model-key regex (from #28)

Model IDs may contain dots, tildes, colons, and extra slashes:
/^[a-zA-Z0-9_-]{1,100}\/[a-zA-Z0-9._~\/:-]{1,200}$/
Accepts openrouter/openrouter/free, openrouter/~deepseek/deepseek-flash-latest, openrouter/anthropic/claude-3.5-sonnet, local/qwen3:32b. Previously these were rejected, which dropped entire agent fallback chains (agentCount: 0) and caused sessions to stall on quota errors.

Retry gating (retriesBeforeFallback)

Default 0. With N, the first N retry attempts defer fallback; attempt N+1 falls back. Missing attempt falls back immediately.

Quarantine (quarantineAfterFallbackMs)

Default 0 (disabled). After any fallback the model left behind is quarantined for the duration: excluded from fallback selection, preemptively redirected away from, and shown with a countdown in fallback-status.

Config

{ "defaults": { "retriesBeforeFallback": 3, "quarantineAfterFallbackMs": 21600000 } }

Verification

  • bun test — see CI
  • tsc --noEmit — 0 errors

@Oren-Schmerling
Oren-Schmerling marked this pull request as draft October 21, 2026 03:37
@Oren-Schmerling Oren-Schmerling changed the title feat: retry gating and quarantine for model-fallback plugin feat: retry gating, quarantine, and relaxed model-key regex Oct 22, 2026
@Oren-Schmerling
Oren-Schmerling marked this pull request as ready for review October 22, 2026 00:18
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