Prove Routing with Fault Injection
A configured fallback is not yet a tested fallback
A normal smoke test proves only the primary path. Fault injection deliberately makes a dependency fail under controlled conditions, then checks that the service follows its recovery policy. Examples include an unavailable model tag, closed port, timeout, or explicit test stub.
Preserve the learner's corrected source configuration. Create a temporary test copy, replace only the primary backend with a known-missing model, start the proxy on a test port, and send a real chat-completion request. Success can then occur only through the configured fallback.
Scenario: An operator sees both model names in YAML and declares resilience complete. During the first outage, requests fail because the fallback mapping was attached to the wrong alias.
Validate response shape as well as HTTP status: a chat completion needs a non-empty assistant message. Inspect proxy logs for the initial failure and alternate selection, then stop the test process cleanly.
Goal: Repair the LiteLLM model list and fallback mapping. The checker starts the real installed proxy, sabotages only a temporary primary configuration, and proves SmolLM still returns a valid completion.