Skip to content

Fix judge API: use max_completion_tokens for OpenAI/OpenRouter#171

Merged
olearycrew merged 1 commit intopinchbench:mainfrom
juppytt:fix/openai-max-tokens
Apr 9, 2026
Merged

Fix judge API: use max_completion_tokens for OpenAI/OpenRouter#171
olearycrew merged 1 commit intopinchbench:mainfrom
juppytt:fix/openai-max-tokens

Conversation

@juppytt
Copy link
Copy Markdown
Contributor

@juppytt juppytt commented Apr 8, 2026

Summary

  • Newer OpenAI models (gpt-5.4-mini, etc.) reject the deprecated max_tokens parameter with HTTP 400
  • Use max_completion_tokens for the OpenAI-compatible judge endpoint (used by both OpenAI and OpenRouter)
  • Anthropic endpoint keeps max_tokens as required by their API

Test plan

  • Tested with --judge openai/gpt-5.4-mini

Newer OpenAI models (gpt-5.4-mini, etc.) reject the deprecated
max_tokens parameter. Use max_completion_tokens for OpenAI and
OpenRouter endpoints. Anthropic endpoint keeps max_tokens as
required by their API.
@olearycrew
Copy link
Copy Markdown
Member

Thanks for this @juppytt !!

@olearycrew olearycrew merged commit 8e0ad9a into pinchbench:main Apr 9, 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