Skip to content

feat(openai): Add support for reasoning_effort='none' in GPT-5.1 - #16658

Merged
ishaan-jaff merged 2 commits into
BerriAI:mainfrom
Chesars:feat/add-reasoning-effort-none-support-gpt-5.1
Nov 14, 2025
Merged

ishaan-jaff merged 2 commits into
BerriAI:mainfrom
Chesars:feat/add-reasoning-effort-none-support-gpt-5.1

Conversation

@Chesars

@Chesars Chesars commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Title

Add support for reasoning_effort='none' in GPT-5.1

Relevant issues

Fixes #16633

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard
    requirement
    - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Summary

OpenAI's GPT-5.1 introduced a new reasoning_effort="none" parameter value which replaces the previous "minimal" setting for faster, lower-latency responses. This is
now the default setting for GPT-5.1. This PR adds full support for this new parameter value.

Details

Code:

  • Updated REASONING_EFFORT type in litellm/types/llms/openai.py to include "none" value
  • The type now supports: Literal["none", "minimal", "low", "medium", "high"]

Documentation:

  • Updated docs/my-website/docs/providers/openai.md to include GPT-5.1, GPT-5-mini, and GPT-5-nano models
  • Added documentation showing "none" as GPT-5.1's default reasoning effort
  • Clarified that "none" replaces "minimal" in the GPT-5.1 model family

Tests:

  • Added test_gpt5_1_reasoning_effort_none() test that verifies:
    • reasoning_effort="none" passes through correctly
    • Other valid values ("low", "medium", "high") continue to work
  • All existing tests continue to pass (15/15)

Tests

tests/test_litellm/llms/openai/test_gpt5_transformation.py::test_gpt5_1_reasoning_effort_none PASSED [100%]

All GPT-5 transformation tests pass:

Related Documentation

Reference: OpenAI GPT-5.1 Documentation

OpenAI's GPT-5.1 introduced a new reasoning effort parameter 'none'
which replaces the previous 'minimal' setting for faster, lower-latency
responses. This is now the default setting for GPT-5.1.

Changes:
- Updated REASONING_EFFORT type to include 'none' value
- Added GPT-5.1, GPT-5-mini, and GPT-5-nano to documentation
- Updated docs to reflect 'none' as GPT-5.1's default reasoning effort
- Added test to verify reasoning_effort='none' passes through correctly

Fixes BerriAI#16633
@vercel

vercel Bot commented Nov 14, 2025

Copy link
Copy Markdown

@Chesars is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@ishaan-jaff ishaan-jaff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ishaan-jaff
ishaan-jaff merged commit 65061ba into BerriAI:main Nov 14, 2025
3 of 6 checks passed
@Chesars
Chesars deleted the feat/add-reasoning-effort-none-support-gpt-5.1 branch November 14, 2025 21:43
@JamesHutchison

Copy link
Copy Markdown

Does this support the temperature parameter as well? I do not see that in the test.

    def map_openai_params(
        self,
        non_default_params: dict,
        optional_params: dict,
        model: str,
        drop_params: bool,
    ) -> dict:
        ################################################################
        # max_tokens is not supported for gpt-5 models on OpenAI API
        # Relevant issue: https://github.com/BerriAI/litellm/issues/13381
        ################################################################
        if "max_tokens" in non_default_params:
            optional_params["max_completion_tokens"] = non_default_params.pop(
                "max_tokens"
            )

        if "temperature" in non_default_params:
            temperature_value: Optional[float] = non_default_params.pop("temperature")
            if temperature_value is not None:
                if temperature_value == 1:
                    optional_params["temperature"] = temperature_value
                elif litellm.drop_params or drop_params:
                    pass
                else:
                    raise litellm.utils.UnsupportedParamsError(
                        message=(
                            "gpt-5 models (including gpt-5-codex) don't support temperature={}. Only temperature=1 is supported. To drop unsupported params set `litellm.drop_params = True`"
                        ).format(temperature_value),
                        status_code=400,
                    )

@Chesars

Chesars commented Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

Hi @JamesHutchison Thanks, you're right, GPT 5.1 added support for temp, top_p and logprobs if reasoning_effort=none. PR #17011 is in progress.

fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…riAI#16658)

* feat(openai): Add support for reasoning_effort='none' in GPT-5.1

OpenAI's GPT-5.1 introduced a new reasoning effort parameter 'none'
which replaces the previous 'minimal' setting for faster, lower-latency
responses. This is now the default setting for GPT-5.1.

Changes:
- Updated REASONING_EFFORT type to include 'none' value
- Added GPT-5.1, GPT-5-mini, and GPT-5-nano to documentation
- Updated docs to reflect 'none' as GPT-5.1's default reasoning effort
- Added test to verify reasoning_effort='none' passes through correctly

Fixes BerriAI#16633

* feat(responses): Add support for reasoning_effort='none' in Responses API transformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support reasoning.effort none for OpenAI GPT-5.1 models

3 participants