Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.38 KB

File metadata and controls

36 lines (27 loc) · 1.38 KB

DMFR Task Runner (Dynamic Model Fallback & Recovery)

DMFR Task Runner ensures that your automated tasks NEVER fail due to Rate Limits or Quota Exhaustion. It implements a resilient execution strategy:

  1. Start with a high-performance model (e.g., Gemini 3.0 Flash).
  2. Monitor for failure (Rate Limit/429/Quota).
  3. Automatically switch to a backup model (e.g., Gemini 2.0 Flash) and retry.
  4. Preserve context and inject it into the fallback run.

Usage

Configuration

Customize your model chain and timeouts.

# Set default chain (Example)
node skills/dmfr-task-runner/index.js configure --chain "google/gemini-3-flash-preview,google/gemini-2.0-flash-001,gpt-4o-mini"

Run a Task

Run any task description. The runner will handle model selection and fallbacks internally.

# Execute resilient task
node skills/dmfr-task-runner/index.js run --task "Write a poem about resilience"

How It Works

  1. Orchestrator: Receives the task.
  2. Worker (Attempt 1): Generates a script targeting Model A. Executes via local-task-runner.
  3. Failure Detection: Monitors stderr for "429", "Quota", "Rate Limit".
  4. Fallback (Attempt 2): Automatically regenerates the script targeting Model B. Injects context. Re-runs.
  5. Success: Returns the result.

Integration

This skill relies on local-task-runner for actual execution. Ensure it is installed.