mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #424] [Issue]: GLM heuristic sends enable_thinking to non-GLM OpenAI-compatible providers (Venice), causing 400 errors on v1.5.7 #182
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#182
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cha1latte on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/424
Originally assigned to: @SpicyMarinara on GitHub.
Summary
The OpenAI-compatible provider injects
enable_thinkinginto request bodies whenever the model ID contains the substringglm, which causes 400 errors on strict OpenAI-schema backends like Venice that serve GLM-named models. Discord post: https://discord.com/channels/1417099416812392641/1500990509999722637Expected behavior
enable_thinkingshould only be sent to backends known to accept it (real GLM-hosted endpoints), not to every OpenAI-compatible connection that happens to be routing a model withglmin its name. Failing that, users should be able to strip or override request body fields from the connection settings.Actual behavior
Every request from a Venice connection using a GLM-named model fails with a 400. The Venice schema validator rejects the
enable_thinkingkey itself, not just its value, so the request never reaches the model. This fires on any chat mode and on the built-in Send Test Message button, so the connection is unusable end-to-end.Related but distinct from the (closed) #173: that one was about
enable_thinkingbeing sent unconditionally; this is the residual code path where it's still sent based on a model-ID heuristic, with no user-facing way to remove it.Steps to reproduce
glm.Workaround attempted: Setting
enable_thinkingin Default Chat Parameters → Custom Parameters with valuesfalse,null, and blank. Blank is rejected by the UI.falseandnullboth still produce the same 400 — Venice rejects the key itself, so users would need to be able to strip the field, not override its value.Environment
Logs, screenshots, or video
Screenshot of the failed Test Message:
Full error from the screenshot:
Additional context
Suspected cause — the GLM detection in the OpenAI-compatible provider is a substring check on the model ID:
…and then:
This conflates "the model is a GLM family model" with "the backend speaks GLM's extended schema." Venice serves GLM-named models but uses strict OpenAI schema validation, so the assumption breaks.
Suggested fixes:
Reported on Discord by user Rinha Osuzume.
Template check