Back to library
AI
best practice

Ensure Workflow Continuity with Automated Model Fallbacks for Refused Queries

Avoid workflow breaks by enabling automatic model fallbacks.

Use the new 'fallbacks' API parameter to automatically reroute queries to Claude Opus 4.8 if Claude Fable 5 triggers a safety refusal.

Claude

The Scenario

You are conducting sensitive research in fields like biology or cybersecurity that might trigger strict safety filters. You need a reliable way to ensure you still get a response even if the highest-tier model refuses.

Before & after

The old way

If a prompt triggered a safety filter, the model would simply fail. You would then spend 10-15 minutes manually re-writing the prompt to be 'safer' or switching models.

With AI

Enable the 'fallbacks' beta parameter. If Fable 5 refuses a sensitive request, it automatically routes to Opus 4.8, providing a safe alternative in about 30 seconds.

The Prompt

// Configure requests with the beta fallback header
{
  "model": "claude-fable-5",
  "fallbacks": ["claude-3-opus-20240229"],
  "messages": [
    {"role": "user", "content": "[YOUR_COMPLEX_RESEARCH_QUERY]"}
  ]
}

Fable 5 is more conservative with safety filters (triggering in nearly 5% of cases). By using the opt-in 'fallbacks' parameter, you can ensure your workflows continue uninterrupted by automatically calling Claude Opus 4.8 when a Fable 5 request is refused.

Source

Claude Platform - Claude API Docs
"An opt-in fallbacks parameter... re-runs refused requests on another model, billed at the fallback model's rates."