Repository navigation
Conversation
GLM models were excluded from reasoning variants, preventing runtime thinking toggle. Add none/high variants with correct parameter format per provider (thinking for Z.AI, reasoning for OpenRouter). Closes anomalyco#18598
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found potentially related PRs that address similar reasoning/thinking variant features: Related PRs:
These are not exact duplicates of PR #18599, but they address related functionality around reasoning/thinking variants for different providers. PR #18599 appears to be the first to specifically add this feature for GLM models. |
|
@rekram1-node hey, would appreciate a review when you get a chance. All checks pass, tested manually with GLM-5 via OpenRouter. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #18598
Type of change
What does this PR do?
GLM models were excluded from reasoning variants in
ProviderTransform.variants(), which meant users could not toggle thinking mode on/off at runtime — only via static config before starting a session.This PR removes GLM from the exclusion list and adds
none/highvariants with the correct parameter format per provider:thinking: { type: "enabled"/"disabled" }(native API format)reasoning: { enabled: true/false }Users just need
"reasoning": truein their model config to get the variant selector. The code handles the provider-specific format automatically.How did you verify your code works?
nonedisables thinking output,highenables it, switching works mid-sessionChecklist