Skip to content

[Question]: OpenAI reasoning effort fails with Unknown parameter: 'thinking' #94

Closed

Description

@aaroncvan

Preflight checklist

  • I checked the README (Configuration + Troubleshooting) and searched existing issues.

Your question

OpenAI reasoning effort fails with Unknown parameter: 'thinking'.

When using the Prompt Optimizer with the OpenAI provider, any non-off reasoning effort causes the request to fail with:

API 400:
{
"error": {
"message": "Unknown parameter: 'thinking'.",
"type": "invalid_request_error",
"param": "thinking",
"code": "unknown_parameter"
}
}

If I set reasoning effort to off, the optimizer works normally.

Is the OpenAI adapter incorrectly sending a thinking parameter when reasoning is enabled? What is the correct way to enable reasoning effort for OpenAI models?

What have you tried?

I tested the following configuration:

With max enabled, I consistently receive the Unknown parameter: 'thinking' 400 error.

I also tried setting reasoning effort to off. With off, the same API key, model, URL, and prompt work successfully.

This makes it look like the issue is specifically related to the parameter sent when reasoning is enabled rather than API authentication or general connectivity.

Context

Windows 11 x64, using the OpenAI API directly (no proxy).

  • Extension: Claude Code Usage
  • Extension ID: GrowthJack.claude-code-usage
  • Extension version: 2.3.0
  • Publisher: GrowthJack
  • VS Code version: 1.135.0 (user setup)
  • VS Code commit: 08d4889f9ec4a1685d257b9b95de036c8e1ce1e5
  • OS: Windows_NT x64 10.0.26200
  • Provider: OpenAI
  • Endpoint: https://api.openai.com/v1
  • Model: gpt-5.6-sol
  • Reasoning effort max: fails with Unknown parameter: 'thinking'
  • Reasoning effort off: works normally
  • No proxy / CC Switch / third-party API gateway

Activity

  1. github-actions commented on Aug 28, 2026

    @github-actions

    🤖 Automated first-pass reply

    The configured analysis model did not return a usable analysis for this issue. The item has still been received and remains available for maintainer review.

    To help with triage, please ensure the extension, VS Code, and operating-system versions plus anonymous diagnostic logs are included.


    🤖 Posted automatically by CCU Bot — not a maintainer decision.

  2. Alex668866 commented on Aug 31, 2026

    @Alex668866

    You’re right — this is a provider payload bug, not an authentication or model-support issue.

    At this point in the OpenAI chat-completions branch, the request adds both reasoning_effort and thinking. OpenAI Chat Completions accepts the top-level reasoning_effort; thinking is not a valid OpenAI parameter, which explains the 400. GPT-5.6 Sol does support max.

    Removing body.thinking when apiFormat === "openai" should fix it. I’d also add a request-body test asserting that OpenAI payloads never contain thinking. If this moves to the Responses API later, the equivalent shape is reasoning: { effort: "max" }.

  3. Carl723000 commented on Sep 2, 2026

    @Carl723000
    Collaborator

    Confirmed; thanks @Alex668866 for the precise diagnosis. The OpenAI-compatible request builder now emits reasoning_effort without the unsupported top-level thinking field. Regression tests cover both the DeepSeek-style path and a direct OpenAI GPT-5.6 Sol path, including max effort. The v2.3.1 release candidate passes the full local unit and UI suites plus an installed-VSIX smoke test. I am keeping this issue open until the fix is pushed and released, then it can be closed against the published build.

  4. Carl723000 commented on Sep 6, 2026

    @Carl723000
    Collaborator

    Fixed on main in 087bae5 and included in the reviewed v2.3.1 draft.

    The OpenAI-compatible Chat Completions request now sends reasoning_effort without the unsupported top-level thinking field. Regression coverage includes the direct OpenAI GPT-5.6 Sol path with max effort and the existing DeepSeek-style path. The release PR passed Node, UI, and packaged-VSIX checks.

    Closing as implemented; the maintainer-controlled v2.3.1 Release remains a draft until Publish is clicked.


    🤖 Generated with OpenAI Codex

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions