Skip to content

fix: increase test connection max_tokens to satisfy GPT-5 minimum#75

Merged
renjfk merged 1 commit into
renjfk:mainfrom
devmarkpro:fix/test-connection-max-tokens
May 18, 2026
Merged

fix: increase test connection max_tokens to satisfy GPT-5 minimum#75
renjfk merged 1 commit into
renjfk:mainfrom
devmarkpro:fix/test-connection-max-tokens

Conversation

@devmarkpro
Copy link
Copy Markdown
Contributor

@devmarkpro devmarkpro commented May 18, 2026

Summary

  • GPT-5 series models (e.g., GPT-5.4) require max_output_tokens >= 16, but the "Test Connection" button in AI settings was sending max_tokens: 10
  • This caused a 400 error: Invalid 'max_output_tokens': integer below minimum value. Expected a value >= 16, but got 10 instead.
  • Increased to 20, which is compatible with both GPT-4 (min 1) and GPT-5 (min 16) model families
  • The production usage in NotificationService (which uses maxTokens: 300) is unaffected
ScreenShot 2026-05-18 at 21 32 44@2x

Test plan

  • Configure a GPT-5 series model (e.g., gpt-5.4) in Settings → AI and click "Test Connection" — should succeed
  • Configure a GPT-4 series model and click "Test Connection" — should still succeed (no regression)

GPT-5 series models require max_output_tokens >= 16. The test
connection was sending max_tokens: 10, causing a 400 error when
validating GPT-5 configurations. Increase to 20 for compatibility
with both GPT-4 and GPT-5 model families.
Copy link
Copy Markdown
Owner

@renjfk renjfk left a comment

Choose a reason for hiding this comment

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

Thanks!

@renjfk renjfk merged commit 8c7d0ec into renjfk:main May 18, 2026
1 check passed
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