fix(neuralwatt): expose full reasoning scale#366
Conversation
The generator hardcoded low/medium/high levels for reasoning-capable models, but Neuralwatt now supports all the levels and, when needed, normalizes intermediate values to the right level. Assisted-by: Crush:glm-5.2
| reasoningLevels = []string{"minimal", "low", "medium", "high", "xhigh", "max"} | ||
| defaultReasoning = "high" |
There was a problem hiding this comment.
Usually, not every model support every setting. It's annoying when the /models endpoint doesn't return which ones are supported, but it is what it is.
We need to scope this list to glm-5.2, and fallback to just [low, medium, high] for other models.
Also, double-check the list. Many models support either xhigh or max, but not both. minimal is also not too common. Fine if this is the right list, just mentioning to double-check. 🙂
There was a problem hiding this comment.
Neuralwatt only support effort levels for GLM 5.2 and they communicate that through a boolean. They accept all the levels and normalise to the three that actually apply to GLM 5.2. I'm assuming they'll also normalise to the applicable levels if they get other models with efforts later on, but maybe there's some other way we want to handle this?
From their current docs:
| Value | Behavior |
|---|---|
"max" |
Deepest reasoning — best for complex math, multi-step planning, and agentic/coding tasks. Default when reasoning_effort is unset (and recommended). |
"xhigh" |
Mapped to max. |
"high" |
Enhanced reasoning — balanced depth and latency. |
"medium" |
Mapped to high. |
"low" |
Mapped to high. |
"minimal" |
Skips the reasoning phase entirely. |
"none" |
Skips the reasoning phase entirely (equivalent to enable_thinking: false). |
There was a problem hiding this comment.
Is this table for GLM-5.2 or every model?
There was a problem hiding this comment.
So, for GLM-5.2 we'll want:
- minimal
- high
- xhigh
The other are aliases, so we don't need them.
For other models (if added with support in the future), fallback to [low, medium, high] which is a reasonable guess.
The generator hardcoded low/medium/high levels for reasoning-capable models, but Neuralwatt now supports all the levels and, when needed, normalizes intermediate values to the right level.
Requires merging charmbracelet/openai-go#1 first, then updating and merging charmbracelet/fantasy#285, so I'm opening this as a draft for now.
Assisted-by: Crush:glm-5.2
CONTRIBUTING.md.