mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
fix: correct OpenClaw modelDefault from openrouter/openrouter/auto to openrouter/auto (#2567)
The model ID `openrouter/openrouter/auto` had a double `openrouter/` prefix which failed validateModelId() (requires exactly one slash in provider/model format). This caused the model to be silently ignored on every OpenClaw launch, falling back to no model default. Fix: use the correct `openrouter/auto` model ID in both modelDefault field and the fallback in setupOpenclawConfig(). Fixes #2566 Agent: issue-fixer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6839e34395
commit
2ad7cbe0fc
2 changed files with 4 additions and 4 deletions
|
|
@ -3,13 +3,13 @@
|
|||
**Source of truth for the default LLM each agent uses via OpenRouter.**
|
||||
When updating an agent's default model, update BOTH the code and this file. This prevents regressions from stale model IDs.
|
||||
|
||||
Last verified: 2026-03-12
|
||||
Last verified: 2026-03-13
|
||||
|
||||
| Agent | Default Model | How It's Set |
|
||||
|---|---|---|
|
||||
| Claude Code | _(routed by Anthropic)_ | `ANTHROPIC_BASE_URL=https://openrouter.ai/api` — model selection handled by Claude's own routing |
|
||||
| Codex CLI | `openai/gpt-5.3-codex` | Hardcoded in `setupCodexConfig()` → `~/.codex/config.toml` |
|
||||
| OpenClaw | `openrouter/openrouter/auto` | `modelDefault` field in agent config; written to OpenClaw config via `setupOpenclawConfig()` |
|
||||
| OpenClaw | `openrouter/auto` | `modelDefault` field in agent config; written to OpenClaw config via `setupOpenclawConfig()` |
|
||||
| ZeroClaw | _(provider default)_ | `ZEROCLAW_PROVIDER=openrouter` — model selection handled by ZeroClaw's OpenRouter integration |
|
||||
| OpenCode | _(provider default)_ | `OPENROUTER_API_KEY` env var — model selection handled by OpenCode natively |
|
||||
| Kilo Code | _(provider default)_ | `KILO_PROVIDER_TYPE=openrouter` — model selection handled by Kilo Code natively |
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@ function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
|
|||
name: "OpenClaw",
|
||||
cloudInitTier: "full" satisfies AgentConfig["cloudInitTier"],
|
||||
preProvision: detectGithubAuth,
|
||||
modelDefault: "openrouter/openrouter/auto",
|
||||
modelDefault: "openrouter/auto",
|
||||
install: async () => {
|
||||
await installAgent(
|
||||
runner,
|
||||
|
|
@ -657,7 +657,7 @@ function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
|
|||
"ANTHROPIC_BASE_URL=https://openrouter.ai/api",
|
||||
],
|
||||
configure: (apiKey: string, modelId?: string, enabledSteps?: Set<string>) =>
|
||||
setupOpenclawConfig(runner, apiKey, modelId || "openrouter/openrouter/auto", dashboardToken, enabledSteps),
|
||||
setupOpenclawConfig(runner, apiKey, modelId || "openrouter/auto", dashboardToken, enabledSteps),
|
||||
preLaunch: () => startGateway(runner),
|
||||
preLaunchMsg: "Your web dashboard will open automatically — use it for WhatsApp QR scanning and channel setup.",
|
||||
launchCmd: () =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue