fix(mcp): reasoning.effort 'minimal' incompatible with gpt-5.4-mini#1378
Open
daniel-rudaev wants to merge 1 commit intogetzep:mainfrom
Open
fix(mcp): reasoning.effort 'minimal' incompatible with gpt-5.4-mini#1378daniel-rudaev wants to merge 1 commit intogetzep:mainfrom
daniel-rudaev wants to merge 1 commit intogetzep:mainfrom
Conversation
gpt-4.5-mini rejects 'minimal' as a reasoning.effort value — valid values are 'low', 'medium', and 'high'. This fix has two parts: 1. factories.py: change reasoning.effort from 'minimal' to 'low' so the OpenAI client no longer raises a validation error at startup. 2. Dockerfile.standalone: add a sed patch + bytecode recompile as a defense-in-depth measure for environments where the source file may differ from what is installed in site-packages.
Member
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The MCP server factory (
factories.py:136) hardcodesreasoning='minimal'when creatingOpenAIClientfor reasoning models. However, newer OpenAI models (gpt-5.4-mini, gpt-5.4, etc.) reject'minimal'— they only accept'none','low','medium','high', and'xhigh'.This causes all entity extraction to fail with a 400 error when using any gpt-5.4 series model:
Related: #902
Changes
mcp_server/src/services/factories.py— changereasoning='minimal'toreasoning='low'mcp_server/docker/Dockerfile.standalone— patchgraphiti-core'sDEFAULT_REASONINGconstant from'minimal'to'low'(defense in depth for the same value in the pip package), recompile bytecode after patchingTest plan
reasoning='low'reasoning=None🤖 Generated with Claude Code