Skip to content

feat(runtime): configurable per-profile model fallback chains - #226

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/configurable-model-fallback-chain-09d6
Nov 8, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/configurable-model-fallback-chain-09d6

Conversation

@nettee

@nettee nettee commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the hardcoded Grok fallback from #225 / 0.8.16 with a per-profile ordered model_fallback_chain (max 3 models).

  • Unset / length ≤ 1 → no fallback (cleaner than keeping a permanent Grok hardcode; Mini must set chains via BCN-41 after upgrade).
  • Length 2–3 → on retryable provider/model failure of attempt N, retry with chain entry N+1 in the same Run.
  • Feishu failure + on_failure cascade fire only after the last chain entry fails.
  • Non-retryable errors still skip the chain.

Config / API (for BCN-41)

PUT /api/profiles/:id/model-fallback-chain
{ "chain": ["gpt-6.1-terra-high", "grok-4.7-high"] }
  • Choice keys from Dashboard / ~/.beacon/model-choices.yaml (validated, unique, max 3).
  • Disk: profile.yaml → model_fallback_chain: [{provider,id,thinking?}, …]
  • GET /api/model-allocations includes fallbackChain + fallbackModels; /models UI can edit the chain.
  • Hot-reload via existing serve hook (appliesOnRestart: false when hooked).

Tests

  • 1-model → no retry
  • 2-model A→B success (no Feishu failure)
  • 3-model A→B→C; Feishu only after last failure
  • Non-retryable skips chain
  • Unset chain → no hardcoded Grok
  • PUT/parse fallback-chain API + profile schema

Version bump: 0.8.16 → 0.8.17.

Out of scope

  • Does not deploy Mini or write live profile chains (BCN-41).
Open in Web Open in Cursor 

Replace the hardcoded Grok fallback (#225 / 0.8.16) with an ordered
profile model_fallback_chain (max 3). Unset or length ≤1 means no
fallback; length 2–3 advances on retryable provider failures within the
same Run. Dashboard/API expose choice-key chains for BCN-41 Mini config.

Co-authored-by: nettee.liu <nettee.liu@gmail.com>
@cursor
cursor Bot merged commit 60ce75f into main Nov 8, 2026
3 checks passed
@cursor
cursor Bot deleted the cursor/configurable-model-fallback-chain-09d6 branch November 8, 2026 13:34
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.

2 participants