#openrouter issue - doesn't recognise auto

1 messages ยท Page 1 of 1 (latest)

latent hill
#

getting this

โš ๏ธ Agent failed before reply: Unknown model: openrouter/auto.
Logs: clawdbot logs --follow

opaque rainBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

hexed joltBOT
# latent hill getting this โš ๏ธ Agent failed before reply: Unknown model: openrouter/auto. Logs...

Based on my investigation, here's what's happening and how to fix it:

The Issue

The error "Unknown model: openrouter/auto" occurs because OpenRouter needs to be explicitly configured in your Clawdbot config. The model registry doesn't automatically discover OpenRouter models without configuration.

Solution

Add OpenRouter to your config file:

{
  env: { 
    OPENROUTER_API_KEY: "sk-or-your-key-here" 
  },
  agents: {
#
    defaults: {
      model: { primary: "openrouter/auto" }
    }
  }
}

Or use a specific model instead of auto:

{
  env: { 
    OPENROUTER_API_KEY: "sk-or-your-key-here" 
  },
  agents: {
#
    defaults: {
      model: { primary: "openrouter/anthropic/claude-sonnet-4-5" }
    }
  }
}

Notes

Once you add the config with your OpenRouter API key, restart Clawdbot and it should recognize the model.

latent hill
#

@hexed jolt which file - whats the command