Skip to content

[Bug]: buildQualifiedChatModelValue ignores provider when model already contains slash #62390

@DeepUmbrella

Description

@DeepUmbrella

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Description

ui/src/ui/chat-model-ref.ts

buildQualifiedChatModelValue function returns the model string directly when it contains a slash (/), ignoring the provided provider parameter.

Current Behavior

buildQualifiedChatModelValue("deepseek-ai/deepseek-v3.2", "nvidia")
// Returns: "deepseek-ai/deepseek-v3.2"
// Expected: "nvidia/deepseek-ai/deepseek-v3.2"

### Steps to reproduce

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "nvidia/z-ai/glm4.7",
        "fallbacks": [
          "nvidia/deepseek-ai/deepseek-v3.2"
        ]
      },
      "models": {
        "nvidia/deepseek-ai/deepseek-v3.2": {},
        "nvidia/z-ai/glm4.7": {
          "alias": "glm4"
        }
      },
      "sandbox": {
        "mode": "off"
      },
      "workspace": "~/.openclaw/workspace"
    },
    "list": [
      {
        "id": "main"
      }
    ]
  },
  
  "models": {
    "mode": "merge",
    "providers": {
     
  
      "nvidia": {
        "api": "openai-completions",
        "apiKey": "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",
        "baseUrl": "https://integrate.api.nvidia.com/v1",
        "models": [
          {
            "id": "minimaxai/minimax-m2.5",
            "name": "MiniMax M2.5"
          },
          {
            "id": "z-ai/glm4.7",
            "name": "GLM 4.7"
          },
          {
            "id": "deepseek-ai/deepseek-v3.2",
            "name": "DeepSeek V3.2"
          },
          {
            "id": "stepfun-ai/step-3.5-flash",
            "name": "Step 3.5 Flash"
          }
        ]
      }
    }
  }
 
  }
}


### Expected behavior

When a provider is explicitly provided, it should be prefixed to the model string, even if the model already contains a slash

### Actual behavior

the model string directly when it contains a slash (`/`), ignoring the provided `provider` 

### OpenClaw version

2026.4.5

### Operating system

macos

### Install method

github

### Model

nvidia/deepseek-ai/deepseek-v3.2

### Provider / routing chain

nvidia/deepseek-ai/deepseek-v3.2

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions