Skip to content

manifest-model-router: injectProviderConfig uses minimal model object instead of AUTO_MODEL #1464

@guillaumegay13

Description

@guillaumegay13

Bug Report

Plugin

manifest-model-router v6.0.2 (OpenClaw plugin)

Description

The injectProviderConfig function in manifest-model-router writes a minimal model object {id:"auto", name:"auto"} to openclaw.json instead of using the already-defined AUTO_MODEL constant which includes the required input, cost, contextWindow, and maxTokens fields.

This causes OpenClaw to crash with:

Cannot read properties of undefined (reading 'input')

Root Cause

In dist/index.js, the injectProviderConfig function hardcodes:

let providerConfig = {baseUrl, api:"openai-completions", apiKey, models:[{id:"auto", name:"auto"}]}

But AUTO_MODEL is already correctly defined earlier in the same file:

var AUTO_MODEL = {id:"auto", name:"Auto Router", reasoning:false, input:["text"], cost:{input:0, output:0, cacheRead:0, cacheWrite:0}, contextWindow:2e5, maxTokens:16384}

And is correctly used in buildModelConfig and the auth flow — but not in injectProviderConfig.

Additional Issue

The configSchema in openclaw.plugin.json has additionalProperties: false but does not declare apiKey as an allowed property. The plugin code reads config.apiKey, but setting it via openclaw config set plugins.entries.manifest-model-router.config.apiKey fails config validation because the schema doesn't allow it.

Fix

In injectProviderConfig, replace:

models:[{id:"auto", name:"auto"}]

with:

models:[AUTO_MODEL]

And add apiKey to the configSchema.properties in openclaw.plugin.json.

Environment

  • OpenClaw: 2026.3.31
  • Plugin: manifest-model-router v6.0.2
  • OS: Ubuntu Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions