Bug type
Regression (worked before, now fails)
Summary
Bug Description
When switching models from the WebUI / Control UI chat header picker, the selected model can be sent as a bare model id instead of a full provider/model reference.
If the current session is already pinned to another provider, the gateway resolves the bare model id against that current/default provider and rejects the request with an error like:
GatewayRequestError: model not allowed: openai-codex/glm-4.7
This makes valid models from other providers impossible to select from the picker.
Steps to Reproduce
- Open the WebUI / Control UI.
- Use a session currently associated with
openai-codex/gpt-5.4 or another provider-specific model.
- Open the chat header model picker.
- Select a model that belongs to another provider, for example
glm-4.7.
- Observe that the request fails with a
model not allowed error using the wrong provider prefix.
Expected Behavior
The model picker should submit the selected model as a full provider/model reference based on the catalog entry shown in the picker.
Selecting glm-4.7 should resolve to its configured provider, not inherit the current session provider.
Environment
- OpenClaw WebUI / Control UI
- Reproduced on March 15, 2026
- Session currently pinned to
openai-codex/gpt-5.4
- Another provider exposes
glm-4.7
Root Cause
The chat header model picker stored entry.id as the <option> value and only used the provider for the visible label.
When the selection changed, WebUI sent sessions.patch({ model: "<bare-model-id>" }) instead of sessions.patch({ model: "<provider>/<model>" }).
Proposed Fix
- Build picker option values from the catalog's full
provider/model identity
- Preserve the provider in the locally cached selected value
- Add a regression test to ensure the picker submits the full model reference
Steps to reproduce
- open webui - chat
- change to another provider/model, like openai to glm
- error shows
Expected behavior
no error
Actual behavior
OpenClaw version
3.14 source code (commit 8aaafa0)
Operating system
Macos 26.3
Install method
pnpm dev
Model
openai-codex / glm
Provider / routing chain
openai-codex
Config file / key location
No response
Additional provider/model setup details
No response
Logs, screenshots, and evidence
03:50:29 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✗ sessions.patch 29ms errorCode=INVALID_REQUEST errorMessage=model not allowed: openai-codex/glm-4.7 conn=f1084474…4add id=8c3f5cc6…7404
Impact and severity
No response
Additional information
No response
Bug type
Regression (worked before, now fails)
Summary
Bug Description
When switching models from the WebUI / Control UI chat header picker, the selected model can be sent as a bare model id instead of a full
provider/modelreference.If the current session is already pinned to another provider, the gateway resolves the bare model id against that current/default provider and rejects the request with an error like:
GatewayRequestError: model not allowed: openai-codex/glm-4.7This makes valid models from other providers impossible to select from the picker.
Steps to Reproduce
openai-codex/gpt-5.4or another provider-specific model.glm-4.7.model not allowederror using the wrong provider prefix.Expected Behavior
The model picker should submit the selected model as a full
provider/modelreference based on the catalog entry shown in the picker.Selecting
glm-4.7should resolve to its configured provider, not inherit the current session provider.Environment
openai-codex/gpt-5.4glm-4.7Root Cause
The chat header model picker stored
entry.idas the<option>value and only used the provider for the visible label.When the selection changed, WebUI sent
sessions.patch({ model: "<bare-model-id>" })instead ofsessions.patch({ model: "<provider>/<model>" }).Proposed Fix
provider/modelidentitySteps to reproduce
Expected behavior
no error
Actual behavior
OpenClaw version
3.14 source code (commit 8aaafa0)
Operating system
Macos 26.3
Install method
pnpm dev
Model
openai-codex / glm
Provider / routing chain
openai-codex
Config file / key location
No response
Additional provider/model setup details
No response
Logs, screenshots, and evidence
03:50:29 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✗ sessions.patch 29ms errorCode=INVALID_REQUEST errorMessage=model not allowed: openai-codex/glm-4.7 conn=f1084474…4add id=8c3f5cc6…7404Impact and severity
No response
Additional information
No response