What happened?
When using an OpenAI-compatible provider, ~/.qwen/settings.json's model.name ends up holding an internal runtime-snapshot id instead of a plain model id, and it gains another prefix layer on every restart:
$runtime|openai|$runtime|openai|qwen3.6-27b-autoround
This whole string is sent to the endpoint as the model id, so the API returns:
404 The model "$runtime|openai|$runtime|openai|qwen3.6-27b-autoround" does not exist
The $runtime|${authType}|${modelId} form is an internal, in-memory RuntimeModelSnapshot id — it should never be persisted to model.name nor sent to a provider endpoint.
Steps to reproduce
Configure an OpenAI-compatible provider (OPENAI_MODEL, OPENAI_BASE_URL).
Switch models via the /model dialog or /model so a RuntimeModelSnapshot becomes active.
settings.json's model.name picks up a $runtime|openai|... value.
Restart Qwen Code → the prefix is re-applied, producing a doubly-stacked id.
The next request fails with 404 ... does not exist.
What did you expect to happen?
settings.model.name should always be a plain, endpoint-sendable model id (qwen3.6-27b-autoround). Switching models or restarting must never wrap it in $runtime|....
Client information
Qwen Code v0.16.0
Model: qwen3.6-27b-autoround
Fast Model: not set
Auth: openai
Platform: win32 x64 (10.0.19045)
Node.js: v22.22.1
Session: bdbbc004-a6f3-4c88-9b9e-100230f3cb8f
Git commit: 94f7cb5
LSP: disabled
Login information
API Config — OpenAI-compatible provider.
OPENAI_BASE_URL=http://:9000/v1
OPENAI_MODEL=qwen3.6-27b-autoround
auth type: openai (USE_OPENAI)
Anything else we need to know?
.env was always correct; the corruption was confined to settings.json's model.name.
Workaround: manually reset model.name to the plain id (qwen3.6-27b-autoround), or drive the model purely via .env's OPENAI_MODEL and avoid switching models in the UI until fixed.
The bug is self-reinforcing: each restart adds another $runtime|openai| layer, so the model id keeps growing until manually cleaned.
What happened?
When using an OpenAI-compatible provider, ~/.qwen/settings.json's model.name ends up holding an internal runtime-snapshot id instead of a plain model id, and it gains another prefix layer on every restart:
$runtime|openai|$runtime|openai|qwen3.6-27b-autoround
This whole string is sent to the endpoint as the model id, so the API returns:
404 The model "$runtime|openai|$runtime|openai|qwen3.6-27b-autoround" does not exist$runtime|$ {authType}|${modelId} form is an internal, in-memory RuntimeModelSnapshot id — it should never be persisted to model.name nor sent to a provider endpoint.
The
Steps to reproduce
Configure an OpenAI-compatible provider (OPENAI_MODEL, OPENAI_BASE_URL).
Switch models via the /model dialog or /model so a RuntimeModelSnapshot becomes active.
settings.json's model.name picks up a $runtime|openai|... value.
Restart Qwen Code → the prefix is re-applied, producing a doubly-stacked id.
The next request fails with 404 ... does not exist.
What did you expect to happen?
settings.model.name should always be a plain, endpoint-sendable model id (qwen3.6-27b-autoround). Switching models or restarting must never wrap it in $runtime|....
Client information
Qwen Code v0.16.0
Model: qwen3.6-27b-autoround
Fast Model: not set
Auth: openai
Platform: win32 x64 (10.0.19045)
Node.js: v22.22.1
Session: bdbbc004-a6f3-4c88-9b9e-100230f3cb8f
Git commit: 94f7cb5
LSP: disabled
Login information
API Config — OpenAI-compatible provider.
OPENAI_BASE_URL=http://:9000/v1
OPENAI_MODEL=qwen3.6-27b-autoround
auth type: openai (USE_OPENAI)
Anything else we need to know?
.env was always correct; the corruption was confined to settings.json's model.name.
Workaround: manually reset model.name to the plain id (qwen3.6-27b-autoround), or drive the model purely via .env's OPENAI_MODEL and avoid switching models in the UI until fixed.
The bug is self-reinforcing: each restart adds another $runtime|openai| layer, so the model id keeps growing until manually cleaned.