GeezerVison is showing github.com — Persistent invalid reasoning value ("low") overrides env and CLI settings · Issue #9969 · anomalyco/opencode
Persistent invalid reasoning value ("low") overrides env and CLI settings #9969Labels bugSomething isn't working DescriptionDescription
Bug Description
When running opencode with gpt-5.2-chat-latest, the CLI fails with:
Error: Unsupported value: ‘low’ is not supported with the ‘gpt-5.2-chat-latest’ model.
Supported values are: ‘medium’.
This occurs even when:
OPENCODE_REASONING=medium is exported
- No agent config sets
low
- Binary is reinstalled
- Issue reproduces in both CLI and VS Code
Root Cause (Identified)
The invalid reasoning value (low) was persisted in local state directories:
~/.local/share/opencode
~/.config/opencode
Removing these directories resolves the issue immediately:
rm -rf ~/.local/share/opencode
rm -rf ~/.config/opencode
Expected Behavior
• Invalid or unsupported reasoning values should not silently persist
• Cached state should not override environment variables or CLI defaults
• A warning or validation should occur when loading incompatible state
Environment
• OS: macOS (Apple Silicon)
• Shell: zsh
• opencode version: 1.1.30
• Install method: curl installer
### Plugins
_No response_
### OpenCode version
1.1.30
### Steps to reproduce
_No response_
### Screenshot and/or share link
_No response_
### Operating System
macOS 26.2
### Terminal
kitty Reacted by Dennis Roethig, Aiwei (Alwyn) Yin and E99p1ant Activitygithub-actions commented on Jan 22, 2026 This issue might be a duplicate of existing issues. Please check:
The root cause appears to be related to how cached state persists and overrides environment variables or CLI defaults. Other related issues that discuss configuration persistence and validation:
Feel free to ignore if your specific issue about reasoning values is distinct from these configuration override problems. Reacted by Dennis Roethig Luketto8 commented on Jan 30, 2026 This issue persists in my case even after deleting said files.
Only problem appears to be chatgpt as some free models seem to function properly trogers1 commented on Jan 30, 2026 Fwiw, I tried deleting everything opencode-related that I could find that seemed like it could potentially have something cached for opencode:
rm -rf ~/.cache/opencode \
rm -rf ~/.local/share/opencode \
rm -rf ~/.local/share/opentui/opencode \
rm -rf ~/.local/state/opencode \
rm -rf ~/.config/opencode \
rm -rf ~/.opencode \
rm -rf ~/.bun/install/cache/@opencode-ai \
brew uninstall opencode
Then re-install, re-authenticate with OpenAI (via API Token)--Issue still persists. R44VC0RP commented on Jan 30, 2026 Can you try running opencode upgrade @trogers1 as well as opencode export > session.json so I can see the session output? trogers1 commented on Jan 30, 2026 @R44VC0RP I had already uninstall+reinstalled so the upgrade command didn't do anything. But here's the exported session.json (with very minor edits for security):
{
"info": {
"id": "ses_3ef6cd3eaffeMDaSwUTXAWz6Hk",
"slug": "misty-cabin",
"version": "1.1.40",
"projectID": "global",
"directory": "/Code/debug",
"title": "System plan mode: read-only analysis and delegation",
"time": {
"created": 1769804606485,
"updated": 1769804606626
},
"summary": {
"additions": 0,
"deletions": 0,
"files": 0
}
},
"messages": [
{
"info": {
"id": "msg_c10932c18001j49NhjsK5q9nTp",
"sessionID": "ses_3ef6cd3eaffeMDaSwUTXAWz6Hk",
"role": "user",
"time": {
"created": 1769804606493
},
"summary": {
"title": "Text-only input: brief note \"Test\"",
"diffs": []
},
"agent": "plan",
"model": {
"providerID": "openai",
"modelID": "gpt-5.2-chat-latest"
}
},
"parts": [
{
"id": "prt_c10932c180023XvXLt3PzJSCRp",
"sessionID": "ses_3ef6cd3eaffeMDaSwUTXAWz6Hk",
"messageID": "msg_c10932c18001j49NhjsK5q9nTp",
"type": "text",
"text": "Test"
}
]
},
{
"info": {
"id": "msg_c10932c2d002s9sPM8svmgEbyg",
"sessionID": "ses_3ef6cd3eaffeMDaSwUTXAWz6Hk",
"role": "assistant",
"time": {
"created": 1769804606509,
"completed": 1769804606783
},
"error": {
"name": "APIError",
"data": {
"message": "Unsupported value: 'low' is not supported with the 'gpt-5.2-chat-latest' model. Supported values are: 'medium'.",
"statusCode": 400,
"isRetryable": false,
"responseHeaders": {
"alt-svc": "h3=\":443\"; ma=86400",
"cf-cache-status": "DYNAMIC",
"cf-ray": "9c63afe78f997851-SJC",
"connection": "keep-alive",
"content-length": "250",
"content-type": "application/json",
"date": "Fri, 30 Jan 2026 20:23:26 GMT",
"openai-organization": "HIDDEN",
"openai-processing-ms": "56",
"openai-project": "HIDDEN",
"openai-version": "2020-10-01",
"server": "cloudflare",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"x-content-type-options": "nosniff",
"x-request-id": "req_2c5d841c1a2c4699bdd82f83f0e37c95",
"set-cookie": "HIDDEN"
},
"responseBody": "{\n \"error\": {\n \"message\": \"Unsupported value: 'low' is not supported with the 'gpt-5.2-chat-latest' model. Supported values are: 'medium'.\",\n \"type\": \"invalid_request_error\",\n \"param\": \"text.verbosity\",\n \"code\": \"unsupported_value\"\n }\n}",
"metadata": {
"url": "https://api.openai.com/v1/responses"
}
}
},
"parentID": "msg_c10932c18001j49NhjsK5q9nTp",
"modelID": "gpt-5.2-chat-latest",
"providerID": "openai",
"mode": "plan",
"agent": "plan",
"path": {
"cwd": "/Code/debug",
"root": "/"
},
"cost": 0,
"tokens": {
"input": 0,
"output": 0,
"reasoning": 0,
"cache": {
"read": 0,
"write": 0
}
}
},
"parts": []
}
]
}R44VC0RP commented on Jan 30, 2026 Confirmed this, was able to repro. 👍🏻
 added a commit that references this issue on Jan 30, 2026This issue will close once commit dbd117a is merged into the 'dev' branch.dbd117a Luketto8 commented on Jan 30, 2026 Did some light digging and the following caught my eye. Might be worth checking out.
gpt-5.2 modelID worked for me,
but gpt-5.2-chat-latest does not.
So appears to misbehave at
if (
input.model.api.id.includes("gpt-5.") &&
!input.model.api.id.includes("codex") &&
input.model.providerID !== "azure"
) {
result["textVerbosity"] = "low"
}R44VC0RP commented on Jan 30, 2026 Merged the fix, thanks for the help! Reacted by Luka and Taylor Rogers cdenneen commented on Feb 4, 2026 @R44VC0RP is there a fix on 1.1.47? I'm using nixpkgs-unstable. This was working for me on gpt-5.2-chat for a while and then all of a sudden seemed to break. I've reviewed everything in ~/.local/share/opencode and ~/.config/opencode and don't see anything referencing "low" so not sure how to properly override. Seems the PR that was merged was for an environment variable to overwrite a opencode.json? But in my case no opencode.json has any mention of low. How can I fix this? R44VC0RP commented on Feb 4, 2026 I don't think it would be available in 1.1.47, I would try 1.1.51 for best success trogers1 commented on Feb 17, 2026 @R44VC0RP was there a regression in v1.2 on this? I'm getting the same issue now that I've upgraded (opencode --version -> 1.2.0) that you previously solved:
Unsupported value: 'none' is not supported with the 'gpt-5.2-chat-latest' model. Supported values are: 'medium'.
The only difference is that we now have 'none' rather than 'low' in the error message. R44VC0RP commented on Feb 17, 2026
MetadataMetadatabugSomething isn't working DevelopmentNo branches or pull requestsIssue actions
|