fix error where model always thinking#9
Conversation
Signed-off-by: thezukiru <121331256+thezukiru@users.noreply.github.com>
ChatGPT 5.5-Thinking review: The intent is good, but this change should not be merged as-is. It fixes plain base models by overriding feature flags from suffixes, but it also disables existing explicit mappings like GLM-5-Thinking, GLM-5-Search, and GLM-4.1V-Thinking-FlashX, because ParseModelName only handles lowercase -thinking / -search suffixes and the new code overwrites the mapping flags with false. It also does not add search MCP servers for generated -search variants. Please make suffix parsing case-insensitive, preserve exact builtin mappings, add/merge the required MCP servers for search variants, and add unit tests for base, thinking, search, thinking-search, uppercase builtin names, and intrinsic Thinking model names. |
Summary
-thinkingand-searchexplicitly control runtime features.Why
EnableThinking: true, using a plain model name likeGLM-5.1could still enable thinking mode unexpectedly.GLM-5.1to run without thinking, whileGLM-5.1-thinkingshould explicitly enable thinking.Changes
GetModelMappingso parsed suffix flags override the base model mapping feature flags.EnableThinking,WebSearch, andAutoWebSearchare now derived from the requested model suffixes.GLM-5.1→ thinking/search disabledGLM-5.1-thinking→ thinking enabledGLM-5.1-search→ search enabledGLM-5.1-thinking-search→ thinking and search enabledTest Plan
Checklist