thinkingOffUnlessAsked turns thinking off on a Messages request for a
non-Claude model that doesn't mention it (Claude Desktop's model_validation
probe, its health probe, title generation). MiniMax-M3.1-Flash-Preview and
Ark's glm-5.3 / glm-5.3-flash refuse that with 400, in wordings neither
alwaysThinks, mandatoryReasoning nor thinkingOffRefused matched, so the 400
went back to the client and Desktop wouldn't switch to the model.
alwaysThinks now matches the reporters' literal messages, narrowly:
- MiniMax: `requires adaptive thinking; thinking.type="disabled" (including
reasoning.effort=none) is not allowed (2013)`
- Ark: "thinking.type `disabled` is not supported by this model"
Both retry sites use it: the relayed Messages path (withoutThinkingOff,
gateway.go) and the translated Chat/Responses path (thinkingBackOn).
Tests: TestAnthropicPassthroughMiniMaxArkThinkingOffRefused (each vendor's
body: omitted thinking succeeds after one retry without thinking; adaptive
goes once, as sent; another 400 of MiniMax's own 2013 and a near Ark
wording "top_k is not supported by this model" are not retried), and
TestTranslatedThinkingOffRefused now runs the GLM, MiniMax and Ark wordings.
With the regex change reverted both fail (400 handed back). The JSON
envelopes around the reporters' messages are assumed (Anthropic's error
shape); not tried against the live MiniMax or Ark endpoints.
Run (sandbox HOME, private GOCACHE, worktree at origin/main 97dfed0f3):
gofmt -l; go vet ./... (darwin), GOOS=linux -tags nogui, GOOS=windows;
go build for all three; go test -tags nogui ./internal/gateway
./internal/provider ./internal/catalog ./internal/codexcat: all ok.