fix(bootstrap): use "name" instead of "label" for model schema

OpenClaw 2026.4.29 renamed the per-model field from "label" to "name". The
old field is now an Unrecognized key, which fails schema validation at
gateway startup and exits OpenClaw before any HTTP listener binds.

Symptom (v2.1.0 first-launch):
  - models.providers.uclaw-cloud.models.0.name: Invalid input: expected string, received undefined
  - models.providers.uclaw-cloud.models.0: Unrecognized key: "label"
  - throwInvalidConfig() at io-DaEsZ_NY.js:2901 -> process exit

Found via end-to-end H: drive test of v2.1.0 portable zip.
This commit is contained in:
hfshfg
2026-05-02 18:58:05 +08:00
parent c99b52e8e2
commit 1f8224561b
2 changed files with 6 additions and 6 deletions

View File

@@ -16,9 +16,9 @@ const DEFAULT_PROVIDER_TEMPLATE = {
baseUrl: 'https://api.u-claw.org/v1', baseUrl: 'https://api.u-claw.org/v1',
api: 'openai-completions', api: 'openai-completions',
models: [ models: [
{ id: 'deepseek-chat', label: 'DeepSeek Chat' }, { id: 'deepseek-chat', name: 'DeepSeek Chat' },
{ id: 'qwen-plus', label: 'Qwen Plus' }, { id: 'qwen-plus', name: 'Qwen Plus' },
{ id: 'qwen-turbo', label: 'Qwen Turbo' }, { id: 'qwen-turbo', name: 'Qwen Turbo' },
], ],
}; };

View File

@@ -16,9 +16,9 @@ const DEFAULT_PROVIDER_TEMPLATE = {
baseUrl: 'https://api.u-claw.org/v1', baseUrl: 'https://api.u-claw.org/v1',
api: 'openai-completions', api: 'openai-completions',
models: [ models: [
{ id: 'deepseek-chat', label: 'DeepSeek Chat' }, { id: 'deepseek-chat', name: 'DeepSeek Chat' },
{ id: 'qwen-plus', label: 'Qwen Plus' }, { id: 'qwen-plus', name: 'Qwen Plus' },
{ id: 'qwen-turbo', label: 'Qwen Turbo' }, { id: 'qwen-turbo', name: 'Qwen Turbo' },
], ],
}; };