Summary
On a Custom Inference endpoint, filling in the optional Model alias field causes
the request to be sent with a trailing carriage return glued to the Model name
value. The provider then rejects it with a "model not found" error, because
glm-5.2:cloud\r is not an exact match for glm-5.2:cloud.
Clearing the Model alias field makes the same endpoint, model, and API key work
immediately. Nothing else changes.
The UI describes this field as "aliases for the model picker in your input", i.e.
a display label. It should not affect the wire payload at all.
Environment
- Warp
v0.2026.07.29.09.05.stable_02 (stable)
- Windows 11, 10.0.26200
- API schema: OpenAI Chat Completions
- Endpoint URL:
https://ollama.com/v1
- Model name:
glm-5.2:cloud
- Model alias: a short display label along the lines of
GLM 5.2. I did not record
the exact string, but it was a plain human-readable label -- not the model
name, and not something I would have pasted from a file.
Steps to reproduce
- Settings -> AI -> Custom Inference -> Add custom model.
- API schema:
OpenAI Chat Completions. Endpoint URL: https://ollama.com/v1.
Provide a valid API key for the provider.
- Add a model with Model name =
glm-5.2:cloud.
- Fill in Model alias with any short display label (e.g.
GLM 5.2).
- Save, select that model, and send any agent request.
Expected
The request body carries "model": "glm-5.2:cloud". The alias is used only as the
label in the model picker.
Actual
The request fails:
Response stream finished unexpectedly with internal error:
POST "https://ollama.com/v1/chat/completions": 404 Not Found
{"message":"model \"glm-5.2:cloud\\r\" not found","type":"not_found_error","param":null,"code":null}
Note the \r in the model name echoed back by the provider. The model tag itself is
valid (glm-5.2:cloud is a published tag; ollama.com/library/glm-5.2/tags lists
tools, thinking, cloud), and the same key and endpoint succeed once the alias
is cleared.
Workaround
Leave Model alias empty.
Hypothesis (unverified)
Looks like CRLF-vs-LF handling when the model list is serialized/deserialized on
Windows: if rows are stored as a newline-delimited blob written with CRLF and then
split on \n only, the trailing \r stays attached to the last field of each row.
That would explain why the corruption appears only once a second field per row is
populated. I have not read the relevant code to confirm this, so treat the mechanism
as a guess -- the reproduction above is the reliable part.
Why this one is unpleasant to diagnose
The corrupting character is invisible in every UI that displays the value, and it is
not whitespace, so any trim()-style guard passes it through. The resulting error is
visually indistinguishable from a genuine typo in the model name, which sends users
hunting the endpoint URL and API key instead of the field that actually broke.
Suggested fix, independent of root cause: strip surrounding whitespace and control
characters from the model identifier before serializing it into the request body.
Summary
On a Custom Inference endpoint, filling in the optional Model alias field causes
the request to be sent with a trailing carriage return glued to the Model name
value. The provider then rejects it with a "model not found" error, because
glm-5.2:cloud\ris not an exact match forglm-5.2:cloud.Clearing the Model alias field makes the same endpoint, model, and API key work
immediately. Nothing else changes.
The UI describes this field as "aliases for the model picker in your input", i.e.
a display label. It should not affect the wire payload at all.
Environment
v0.2026.07.29.09.05.stable_02(stable)https://ollama.com/v1glm-5.2:cloudGLM 5.2. I did not recordthe exact string, but it was a plain human-readable label -- not the model
name, and not something I would have pasted from a file.
Steps to reproduce
OpenAI Chat Completions. Endpoint URL:https://ollama.com/v1.Provide a valid API key for the provider.
glm-5.2:cloud.GLM 5.2).Expected
The request body carries
"model": "glm-5.2:cloud". The alias is used only as thelabel in the model picker.
Actual
The request fails:
Note the
\rin the model name echoed back by the provider. The model tag itself isvalid (
glm-5.2:cloudis a published tag;ollama.com/library/glm-5.2/tagsliststools,thinking,cloud), and the same key and endpoint succeed once the aliasis cleared.
Workaround
Leave Model alias empty.
Hypothesis (unverified)
Looks like CRLF-vs-LF handling when the model list is serialized/deserialized on
Windows: if rows are stored as a newline-delimited blob written with CRLF and then
split on
\nonly, the trailing\rstays attached to the last field of each row.That would explain why the corruption appears only once a second field per row is
populated. I have not read the relevant code to confirm this, so treat the mechanism
as a guess -- the reproduction above is the reliable part.
Why this one is unpleasant to diagnose
The corrupting character is invisible in every UI that displays the value, and it is
not whitespace, so any
trim()-style guard passes it through. The resulting error isvisually indistinguishable from a genuine typo in the model name, which sends users
hunting the endpoint URL and API key instead of the field that actually broke.
Suggested fix, independent of root cause: strip surrounding whitespace and control
characters from the model identifier before serializing it into the request body.