Skip to content

fix: GLM thinking values, remove output popup, filter enabled models — fixes #61, #67, #62#68

Merged
ltmoerdani merged 1 commit into
ltmoerdani:mainfrom
Wallacy:fixes/glm-thinking-zen-models-usage-panel
Jul 2, 2026
Merged

fix: GLM thinking values, remove output popup, filter enabled models — fixes #61, #67, #62#68
ltmoerdani merged 1 commit into
ltmoerdani:mainfrom
Wallacy:fixes/glm-thinking-zen-models-usage-panel

Conversation

@Wallacy

@Wallacy Wallacy commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

fix: GLM thinking values, remove output popup, filter enabled models — fixes #61, #67, #62

Goal

Fix three reported bugs: GLM accepting invalid thinking values, unwanted output channel popup, and model list showing disabled/unavailable models.

What was implemented

#61 — GLM thinking allows invalid values

  • Remove "on" from opencodego.thinking.glm enum — GLM 5.2 only accepts off/high/max per models.dev
  • buildThinkingPayload now sends reasoning_effort for GLM when the value is effort-based (high/max); only "off" maps to thinking: { type: "disabled" }
  • buildFamilyThinkingSchema split into separate blocks for GLM and Kimi (were combined in a single if)
  • Updated validate-models.mts to test GLM with high/max instead of on
  • Updated package.json with correct enum and concise description

#67 — Annoying output window popup

  • Removed 3 this.getOutputChannel().show(true) calls in testConnection() (success and error paths) and in provideLanguageModelChatResponse() error catch

#62 — Display only enabled models

  • fetchModels() already sent Authorization: Bearer <key> header, but the key was only read from secret storage internally. Now the API key is passed explicitly from provideLanguageModelChatInformation() to fetchModels(), ensuring the header always carries the correct key

Changelog

Fixed:
- GLM 5.2 now only accepts off/high/max (removed invalid "on")
- GLM high/max now send reasoning_effort instead of thinking toggle
- Output channel no longer pops up randomly during requests
- Model list fetch always sends Authorization header with the correct API key

Testing

86/86 unit tests pass. GLM dry-run on validate-models.mts confirms:

  • GLM 5.1: high{"thinking":{"type":"enabled"}}
  • GLM 5.2: high{"reasoning_effort":"high"}, max{"reasoning_effort":"max"}

…odel fetch

- ltmoerdani#61: Remove invalid 'on' from GLM thinking enum, accept only 'off'/'high'/'max'
- ltmoerdani#61: Send reasoning_effort for GLM when value is effort-based (high/max)
- ltmoerdani#61: Split combined glm/kimi schema into separate blocks
- ltmoerdani#67: Remove getOutputChannel().show(true) calls causing random popups
- ltmoerdani#62: Pass Authorization header when fetching model list (already implemented)
- ltmoerdani#61: Update validate-models.mts to test GLM with high/max instead of on
- Add comprehensive unit tests for GLM effort values (issue ltmoerdani#61)
@ltmoerdani

Copy link
Copy Markdown
Owner

nice one, clean fix for 3 bugs at once. I went through the code:

#61 GLM thinking good approach sending reasoning_effort directly for effort-based values and letting the gateway handle resolution. Splitting glm || kimi into separate blocks makes sense too since they behave differently now. One small question: if a user already has glm: "on" saved in their workspace config, buildThinkingPayload will send reasoning_effort: "on" to the gateway. Will that fail gracefully or could it error out? If it might cause issues, might be worth adding a fallback onhigh in buildThinkingPayload before it hits the gateway.

#67 output popup the show(true) calls were just in the wrong spots. Error handling via showErrorMessage is enough on its own.

#62 filter models clean, one-line change at the call site makes fetchModels more reusable. Nice.

102 lines of new tests covering effort values, schema generation, override, and invalid value rejection. Solid coverage.

I tested locally, works well. Merged ready. The stale GLM "on" config question is optional though, depends on how the gateway handles it, if it's graceful, just skip it.

@ltmoerdani ltmoerdani merged commit c81938b into ltmoerdani:main Jul 2, 2026
2 checks passed
ltmoerdani added a commit that referenced this pull request Jul 2, 2026
…bility

- Added documentation for PR #42 and PR #43 addressing issue #41 regarding duplicate agent-host models in the Manage Language Models panel.
- Introduced a new boolean setting `opencodego.showInAgentsWindow` to control the visibility of agent-host models.
- Implemented separate vendor IDs for agent models to eliminate duplication across UI surfaces.
- Updated related files and settings to reflect changes in model registration and visibility.

feat: Add manual usage targets and live pricing for Go usage tracker

- Documented PR #50 which introduces manual configuration for Go usage targets and updates cost estimation to use live pricing.
- Implemented a command to allow users to set manual usage targets for session, weekly, and monthly spent.
- Enhanced the usage tracker to read actual billed amounts from SQLite database for accurate cost estimation.

fix: Improve SQLite-backed cost accuracy and resolve DeepSeek context overflow

- Documented PR #60 addressing subscription cost drift by integrating SQLite data into the usage tracker.
- Fixed context overflow issue for DeepSeek by adjusting token limits based on prompt size.
- Cleaned up SSE logging to reduce noise in the Output channel.

fix: Resolve GLM thinking values and output popup issues

- Documented PR #68 which fixes GLM thinking values to accept valid effort-based options for GLM 5.2.
- Removed intrusive output channel popups during normal operations and connection tests.
- Ensured model list fetch includes the Authorization header for accurate model visibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] setting "opencodego.thinking.glm" allows invalid values

2 participants