TC #74 — Phase 7 R2 fallback retry credits FALLBACK model name (INTERACTIVE) #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scenario
Config with broken primary endpoint + working fallback (e.g.,
cfg.routing = { fallback = true, fallback_model = "cloud" }, primary = nonexistent endpoint). Send a prompt.Expected
The fallback fires; usage in :cost detail is credited to the FALLBACK model name (cloud), NOT the primary.
R2 — broker emits payload.model = model_cfg.model which IS the fallback's name when chat_stream is called with fb_cfg.
Interactive — needs careful broker setup
Requires standing up a deliberately-broken primary and watching the fallback path execute, ideally via :cost detail after.
Verified PASS — autonomous after all.
Setup: config with broken primary (endpoint http://127.0.0.1:1, model 'fake-primary') + working cloud fallback (anthropic/claude-haiku-4.5). routing.fallback = true.
Run:
R2 invariant confirmed: the usage is credited to anthropic/claude-haiku-4.5 (fallback's model name), NOT 'fake-primary'. The broker emits payload.model = model_cfg.model — when chat_stream is called with fb_cfg during the fallback retry, model_cfg.model IS the fallback's name. The wrapper keys by payload.model so no primary-vs-fallback tracking is needed.
Closed by Phase 7 verify.