Skip to content

[Bug]: Config Form view marks models.providers as unsupported due to SecretInputSchema union #31490

@BUGKillerKing

Description

@BUGKillerKing

Bug type

Regression (worked before, now fails)

Summary

The Config page Form view fails to render the Model Providers section (models.providers). Instead of displaying editable form fields, it shows:

Unsupported schema node. Use Raw mode.

The root cause is that SecretInputSchema (used by the apiKey field) produces an anyOf union in JSON Schema that mixes a primitive type (string) with complex object types ({ source: "env"|"file"|"exec", ... }). The UI's normalizeUnion function cannot simplify this mixed union, so it marks apiKey as unsupported. This status propagates upward through additionalProperties, causing the entire models.providers section — and potentially other sections like agents.defaults.model and agents.list — to be hidden from the Form view.

Steps to reproduce

  1. Add a custom model provider to the OpenClaw config file:
models:
  providers:
    my-provider:
      baseUrl: "https://example.com/v1"
      apiKey: "sk-***"
      api: "openai-completions"
      models:
        - id: "my-model"
          name: "My Model"
          contextWindow: 200000
          maxTokens: 8192

2.Open the Control UI in a browser.
3. Navigate to the Config page.
4. Expand the Models section.
5. Look for the Model Providers subsection.

Image

Expected behavior

The Model Providers subsection renders editable form fields for the configured provider (baseUrl, apiKey, api, models, etc.), allowing users to view and edit the provider configuration directly in the Form view.

Actual behavior

The Model Providers subsection displays:

Unsupported schema node. Use Raw mode.
A banner also appears at the top of the config page:
Form view can't safely edit some fields. Use Raw to avoid losing config entries.
The provider configuration can only be viewed and edited through Raw mode.

OpenClaw version

openclaw@2026.3.2

Operating system

Ubuntu 24.04

Install method

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions