Skip to main content

Fallback Fixes

Use alternative models or strategies.

Held for the beta

This feature is built. It is not available in this release. It has no release date. This page describes it as designed.

Fallback fixes provide alternative strategies when the primary fails.

Use Cases

  • Model unavailability
  • Cost optimization
  • Latency reduction
  • Graceful degradation

Configuration

Fallback fixes use a fallback_type and fallback_config structure:

{
  "fix_id": "fix-fallback-001",
  "fix_type": "fallback",
  "config": {
    "fallback_type": "model",
    "fallback_config": {
      "model": "gpt-4o-mini"
    }
  }
}

Config Keys

KeyTypeDescription
fallback_typestring"model" or "default"
fallback_configobjectType-specific fallback configuration

Fallback Types

Model Fallback

Switch to a different model when the primary fails:

{
  "fix_type": "fallback",
  "config": {
    "fallback_type": "model",
    "fallback_config": {
      "model": "gpt-4o-mini"
    }
  }
}

When triggered, the runtime sets params["model"] to the fallback model before retrying the call.

Default Response Fallback

Return a predetermined default response instead of retrying:

{
  "fix_type": "fallback",
  "config": {
    "fallback_type": "default",
    "fallback_config": {
      "response": "I'm unable to process this request right now. Please try again later."
    }
  }
}

Common Fixes

Model Timeout

Switch to a faster, smaller model:

{
  "fix_type": "fallback",
  "config": {
    "fallback_type": "model",
    "fallback_config": {
      "model": "gpt-4o-mini"
    }
  }
}

Graceful Degradation

Return a safe default when all else fails:

{
  "fix_type": "fallback",
  "config": {
    "fallback_type": "default",
    "fallback_config": {
      "response": "Service temporarily unavailable. Please try again."
    }
  }
}

Targeting

A fix applies by its error_code — an exact code, or a pattern ending in * that matches by prefix. There is no way to target specific models or agents.

{
  "error_code": "TOOL.EXECUTION.TIMEOUT"
}

Next Steps