-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Runtime LLM allowlist diagnostics can double-prefix provider-qualified model refs #84887
Copy link
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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-miniwhen 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: Martian-Engineering/lossless-claw#738Steps to reproduce
api.runtime.llm.completewith a model selection that resolves to provideropenrouterand model idopenrouter/gpt-5.4-mini.openrouter/gpt-5.4-mini.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 isopenrouter/....Actual behavior
Local
2026.5.19logs showed:Lossless had requested/reported:
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-miniActionable/plugin-facing ref:
openrouter/gpt-5.4-miniProvider / routing chain
Plugin runtime LLM call -> OpenClaw
api.runtime.llm.complete-> runtime model override policyAdditional 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 bareLCM_SUMMARY_MODEL=gpt-5.4-minienv 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=openrouterImpact 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 whereprovider="openrouter",modelId="openrouter/gpt-5.4-mini", andallowedModels=["openrouter/gpt-5.4-mini"]does not produceopenrouter/openrouter/...in the check/error path.