openclaw - 💡(How to fix) Fix Runtime LLM allowlist diagnostics can double-prefix provider-qualified model refs [3 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

OpenClaw runtime LLM policy reports a denied plugin model override as openrouter/openrouter/gpt-5.4-mini when Lossless passes an OpenRouter-shaped model ref. The canonical provider-precedence bug that caused Lossless to select OpenRouter in this incident is tracked upstream in Lossless: https://github.com/Martian-Engineering/lossless-claw/issues/738

Error Message

[lcm] runtime.llm.complete error: Plugin LLM completion model override "openrouter/openrouter/gpt-5.4-mini" is not allowlisted for plugin "lossless-claw".

Root Cause

OpenClaw runtime LLM policy reports a denied plugin model override as openrouter/openrouter/gpt-5.4-mini when Lossless passes an OpenRouter-shaped model ref. The canonical provider-precedence bug that caused Lossless to select OpenRouter in this incident is tracked upstream in Lossless: https://github.com/Martian-Engineering/lossless-claw/issues/738

Fix Action

Fixed

Code Example

[lcm] runtime.llm.complete error: Plugin LLM completion model override "openrouter/openrouter/gpt-5.4-mini" is not allowlisted for plugin "lossless-claw".

---

Requested model: openrouter/gpt-5.4-mini

---

Source paths on upstream/main:
- src/plugins/runtime/runtime-llm.runtime.ts:220 normalizeAllowedModelRef(raw)
- src/plugins/runtime/runtime-llm.runtime.ts:237-238 returns `${normalized.provider}/${normalized.model}`
- src/plugins/runtime/runtime-llm.runtime.ts:401-406 builds resolvedModelRef from normalizeModelRef(selection.provider, selection.modelId)
- src/plugins/runtime/runtime-llm.runtime.ts:407-412 checks the allowlist
- extensions/openrouter/openclaw.plugin.json:8-12 sets openrouter prefixWhenBare=openrouter

---

flowchart TD
  A[Plugin request model openrouter/gpt-5.4-mini] --> B[OpenClaw runtime.llm.complete]
  B --> C[selection provider=openrouter]
  C --> D[selection modelId=openrouter/gpt-5.4-mini]
  D --> E[host resolvedModelRef]
  E --> F[openrouter/openrouter/gpt-5.4-mini]
  F --> G[policy denial / confusing diagnostic]

  classDef bad fill:#ffd6d6,stroke:#cc3333,color:#111;
  class F,G bad;
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

OpenClaw runtime LLM policy reports a denied plugin model override as openrouter/openrouter/gpt-5.4-mini when Lossless passes an OpenRouter-shaped model ref. The canonical provider-precedence bug that caused Lossless to select OpenRouter in this incident is tracked upstream in Lossless: https://github.com/Martian-Engineering/lossless-claw/issues/738

Steps to reproduce

  1. Have a plugin call api.runtime.llm.complete with a model selection that resolves to provider openrouter and model id openrouter/gpt-5.4-mini.
  2. Configure the plugin runtime LLM allowlist with the expected short ref, e.g. openrouter/gpt-5.4-mini.
  3. Trigger the runtime LLM policy check.
  4. Observe the host policy error use a double-prefixed ref.

Expected behavior

OpenClaw should normalize provider/model refs consistently for runtime LLM policy checks and diagnostics. It should not report openrouter/openrouter/... when the actionable model ref is openrouter/....

Actual behavior

Local 2026.5.19 logs showed:

[lcm] runtime.llm.complete error: Plugin LLM completion model override "openrouter/openrouter/gpt-5.4-mini" is not allowlisted for plugin "lossless-claw".

Lossless had requested/reported:

Requested model: openrouter/gpt-5.4-mini

The doubled provider in the host error made the remediation confusing.

OpenClaw version

2026.5.19

Operating system

macOS 26 / Darwin arm64

Install method

Global OpenClaw gateway managed by launchd (ai.openclaw.gateway)

Model

Observed host-normalized ref: openrouter/openrouter/gpt-5.4-mini

Actionable/plugin-facing ref: openrouter/gpt-5.4-mini

Provider / routing chain

Plugin runtime LLM call -> OpenClaw api.runtime.llm.complete -> runtime model override policy

Additional provider/model setup details

This issue is intentionally narrowed to OpenClaw host normalization/diagnostics.

The broader incident was not intended to use OpenRouter. Lossless was configured for openai-codex/gpt-5.4-mini, but a bare LCM_SUMMARY_MODEL=gpt-5.4-mini env override caused Lossless to lose the configured provider and resolve through the active runtime/fallback context. That is tracked in Lossless upstream:

Logs, screenshots, and evidence

Source paths on upstream/main:
- src/plugins/runtime/runtime-llm.runtime.ts:220 normalizeAllowedModelRef(raw)
- src/plugins/runtime/runtime-llm.runtime.ts:237-238 returns `${normalized.provider}/${normalized.model}`
- src/plugins/runtime/runtime-llm.runtime.ts:401-406 builds resolvedModelRef from normalizeModelRef(selection.provider, selection.modelId)
- src/plugins/runtime/runtime-llm.runtime.ts:407-412 checks the allowlist
- extensions/openrouter/openclaw.plugin.json:8-12 sets openrouter prefixWhenBare=openrouter
flowchart TD
  A[Plugin request model openrouter/gpt-5.4-mini] --> B[OpenClaw runtime.llm.complete]
  B --> C[selection provider=openrouter]
  C --> D[selection modelId=openrouter/gpt-5.4-mini]
  D --> E[host resolvedModelRef]
  E --> F[openrouter/openrouter/gpt-5.4-mini]
  F --> G[policy denial / confusing diagnostic]

  classDef bad fill:#ffd6d6,stroke:#cc3333,color:#111;
  class F,G bad;

Impact and severity

Affected: plugin authors/users debugging runtime LLM allowlist failures for provider/model refs that already include a provider segment. Severity: Medium as a host issue by itself; it becomes high-severity only when combined with the Lossless provider-precedence bug in #738. Frequency: Reproduced in local logs during a 99% context incident. Consequence: diagnostics point to a malformed model ref and can lead users to add the wrong allowlist entries.

Additional information

Suggested OpenClaw fix shape: normalize runtime LLM model refs with a helper that strips only duplicated provider prefixes after normalizeModelRef(), and add a regression where provider="openrouter", modelId="openrouter/gpt-5.4-mini", and allowedModels=["openrouter/gpt-5.4-mini"] does not produce openrouter/openrouter/... in the check/error path.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

OpenClaw should normalize provider/model refs consistently for runtime LLM policy checks and diagnostics. It should not report openrouter/openrouter/... when the actionable model ref is openrouter/....

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Runtime LLM allowlist diagnostics can double-prefix provider-qualified model refs [3 pull requests]