GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #9969

New issue
Copy link
New issue
Copy link
Closed
#11363
Closed
Persistent invalid reasoning value ("low") overrides env and CLI settings#9969
#11363
Copy link
Assignees
R44VC0RP
Labels
bugSomething isn't working

Description

@xuxiaoyang-if
xuxiaoyang-if
opened on Jan 22, 2026
Issue body actions

Description

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

Activity

  1. xuxiaoyang-if
    added
    bugSomething isn't working
    on Jan 22, 2026
  2. github-actions
    assigned
    rekram1-node
    on Jan 22, 2026
  3. github-actions commented on Jan 22, 2026

    @github-actions
    github-actionsBot
    on Jan 22, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Session Todo-list is forgotten after compaction #5934: Session todo-list is forgotten after compaction (related state persistence issue)
    • Config variables in opencode.json overwritten with actual values on start up #9086: Config variables overwritten with actual values on startup (config state override issue)

    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:

    • [FEATURE]: Persist desktop/web steps panel collapse state across sessions #7174: Persist desktop/web steps panel collapse state across sessions
    • [FEATURE]: slash command for reload #6719: Slash command for reload

    Feel free to ignore if your specific issue about reasoning values is distinct from these configuration override problems.

    Reacted by Dennis Roethig
  4. Luketto8 commented on Jan 30, 2026

    @Luketto8
    Luketto8
    on Jan 30, 2026
    More actions

    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

  5. trogers1 commented on Jan 30, 2026

    @trogers1
    trogers1
    on Jan 30, 2026
    More actions

    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.

  6. R44VC0RP
    assigned
    R44VC0RP
    and unassigned
    rekram1-node
    on Jan 30, 2026
  7. R44VC0RP commented on Jan 30, 2026

    @R44VC0RP
    R44VC0RP
    on Jan 30, 2026
    Contributor
    More actions

    Can you try running opencode upgrade @trogers1 as well as opencode export > session.json so I can see the session output?

    Reacted by Taylor Rogers
  8. trogers1 commented on Jan 30, 2026

    @trogers1
    trogers1
    on Jan 30, 2026
    More actions

    @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": []
        }
      ]
    }
  9. R44VC0RP commented on Jan 30, 2026

    @R44VC0RP
    R44VC0RP
    on Jan 30, 2026
    Contributor
    More actions

    Confirmed this, was able to repro. 👍🏻

    Image
  10. R44VC0RP
    added a commit that references this issue on Jan 30, 2026

    fix(provider): exclude chat models from textVerbosity setting

    This issue will close once commit dbd117a is merged into the 'dev' branch.
    dbd117a
  11. Luketto8 commented on Jan 30, 2026

    @Luketto8
    Luketto8
    on Jan 30, 2026
    More actions

    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"
          }
  12. R44VC0RP
    closed this as completedin #11363on Jan 30, 2026
  13. R44VC0RP commented on Jan 30, 2026

    @R44VC0RP
    R44VC0RP
    on Jan 30, 2026
    Contributor
    More actions

    Merged the fix, thanks for the help!

    Reacted by Luka and Taylor Rogers
  14. cdenneen commented on Feb 4, 2026

    @cdenneen
    cdenneen
    on Feb 4, 2026
    More actions

    @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?

  15. R44VC0RP commented on Feb 4, 2026

    @R44VC0RP
    R44VC0RP
    on Feb 4, 2026
    Contributor
    More actions

    I don't think it would be available in 1.1.47, I would try 1.1.51 for best success

  16. trogers1 commented on Feb 17, 2026

    @trogers1
    trogers1
    on Feb 17, 2026
    More actions

    @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.

  17. R44VC0RP commented on Feb 17, 2026

    @R44VC0RP
    R44VC0RP
    on Feb 17, 2026
    Contributor
    More actions

    Will review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @R44VC0RP
    R44VC0RP

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.