Skip to content

Validate on model config does not correctly validate #7334

@loopy321

Description

@loopy321

LocalAI version:

v3.7.0
Environment, CPU architecture, OS, and Version:

docker
Describe the bug

there were missing commas in the MCP section of a config file, but the "Validate" button did not object.

To Reproduce

add the following section:

mcp:
  stdio: |
    {
      "mcpServers": {
        "ddg": {
          "command": "/docker/docker",
          "env": {
            "MAX_RESULTS": "10"
          },
          "args": [
            "run", "-i", "--rm", "-e", "MAX_RESULTS",
            "ghcr.io/mudler/mcps/duckduckgo:master"
          ]
        }
        "weather": {
          "command": "/docker/docker",
          "args": [
            "run", "-i", "--rm",
            "ghcr.io/mudler/mcps/weather:master"
          ]
        }
        "homeassistant": {
          "command": "/docker/docker",
          "env": {
            "HA_TOKEN": "",
            "HA_HOST": "http://"
          },
          "args": [
            "run", "-i", "--rm",
            "ghcr.io/mudler/mcps/homeassistant:master"
          ]
        }
      }
    }

Expected behavior

Validate should identify a bad config.
Logs

Only message from debug logs are:
ERR Server error error="no working MCP servers found" ip=172.21.0.1 latency=217.516173ms method=POST status=500 url=/mcp/v1/chat/completions
Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions