Skip to content

fix(mcp): reasoning.effort 'minimal' incompatible with gpt-5.4-mini#1378

Open
daniel-rudaev wants to merge 1 commit intogetzep:mainfrom
D1DX:fix/reasoning-effort-compatibility
Open

fix(mcp): reasoning.effort 'minimal' incompatible with gpt-5.4-mini#1378
daniel-rudaev wants to merge 1 commit intogetzep:mainfrom
D1DX:fix/reasoning-effort-compatibility

Conversation

@daniel-rudaev
Copy link
Copy Markdown

Summary

The MCP server factory (factories.py:136) hardcodes reasoning='minimal' when creating OpenAIClient for 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:

Error code: 400 - {'error': {'message': "Unsupported value: 'minimal' is not supported 
with the 'gpt-5.4-mini' model.", 'param': 'reasoning.effort'}}

Related: #902

Changes

  • mcp_server/src/services/factories.py — change reasoning='minimal' to reasoning='low'
  • mcp_server/docker/Dockerfile.standalone — patch graphiti-core's DEFAULT_REASONING constant from 'minimal' to 'low' (defense in depth for the same value in the pip package), recompile bytecode after patching

Test plan

  • Verify gpt-5.4-mini entity extraction works without 400 errors
  • Verify gpt-5-mini (default model) still works with reasoning='low'
  • Verify non-reasoning models (gpt-4o-mini etc.) still pass reasoning=None

🤖 Generated with Claude Code

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.
@danielchalef
Copy link
Copy Markdown
Member


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

@daniel-rudaev
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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.

2 participants