Skip to content

fix: replace 'minimal' with 'low' reasoning effort for gpt-5.4-mini#1395

Open
sgaluza wants to merge 2 commits intogetzep:mainfrom
sgaluza:fix/reasoning-effort-gpt54-mini
Open

fix: replace 'minimal' with 'low' reasoning effort for gpt-5.4-mini#1395
sgaluza wants to merge 2 commits intogetzep:mainfrom
sgaluza:fix/reasoning-effort-gpt54-mini

Conversation

@sgaluza
Copy link
Copy Markdown

@sgaluza sgaluza commented Apr 11, 2026

Summary

gpt-5.4-mini does not support reasoning.effort: "minimal". The supported values are: none, low, medium, high, xhigh.

This PR:

  • Updates DEFAULT_REASONING from 'minimal' to 'low' in openai_base_client.py
  • Adds VALID_REASONING_VALUES and VALID_VERBOSITY_VALUES constants with early validation in BaseOpenAIClient constructor — invalid values now raise ValueError immediately instead of failing at API call time
  • Updates existing tests to use valid reasoning values ('minimal''low', 'intense''high')
  • Adds parametrized tests for validation of both reasoning and verbosity parameters

Motivation

When using gpt-5.4-mini as the extraction model, batch operations fail with:

Unsupported value: 'minimal' is not supported with the 'gpt-5.4-mini' model.
Supported values are: 'none', 'low', 'medium', 'high', and 'xhigh'.

'low' was chosen over 'none' because edge extraction and node deduplication require minimal reasoning for quality results.

Test plan

  • All existing tests pass with updated values
  • New parametrized tests verify validation rejects invalid values
  • Tested in production with gpt-5.4-mini batch sync (78 documents)

gpt-5.4-mini does not support 'minimal' reasoning effort value.
Supported values are: 'none', 'low', 'medium', 'high', 'xhigh'.

- Update DEFAULT_REASONING constant from 'minimal' to 'low'
- Add VALID_REASONING_VALUES and VALID_VERBOSITY_VALUES validation
  in BaseOpenAIClient constructor for early error detection
- Update tests to use valid reasoning/verbosity values
- Add parametrized tests for validation of both parameters
@sgaluza sgaluza marked this pull request as draft April 11, 2026 18:13
…oning values

Allow legacy reasoning values ('minimal', 'intense') in validation
to avoid breaking existing users on older models.

Built [OnSteroids](https://onsteroids.ai)
@sgaluza sgaluza marked this pull request as ready for review April 11, 2026 18:20
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.

1 participant