Skip to content

Add support for GPT-5 family and recent OpenAI o-series models#238

Open
cterdam wants to merge 1 commit intoSakanaAI:mainfrom
cterdam:add_model_compatibility
Open

Add support for GPT-5 family and recent OpenAI o-series models#238
cterdam wants to merge 1 commit intoSakanaAI:mainfrom
cterdam:add_model_compatibility

Conversation

@cterdam
Copy link
Copy Markdown

@cterdam cterdam commented Mar 30, 2026

Summary

  • Add GPT-5 family models (gpt-5, gpt-5.1, gpt-5.2, gpt-5.4 and their mini/nano/pro/chat variants) to AVAILABLE_LLMS
  • Add missing o-series models (o3, o3-pro, o4-mini) and other GPT-4 models (gpt-4.5-preview, gpt-4-turbo, chatgpt-4o-latest, gpt-3.5-turbo) to AVAILABLE_LLMS
  • Fix get_response_from_llm and get_batch_responses_from_llm to use max_completion_tokens instead of max_tokens for GPT-5 models, since the latter raises Unsupported parameter: 'max_tokens' is not supported with this model
  • Add o4 to the o-series routing in get_response_from_llm and create_client so o4-mini is handled correctly

Test plan

  • Verify GPT-5 models use max_completion_tokens and complete successfully
  • Verify older GPT-4 models still use max_tokens and are unaffected
  • Verify o4-mini routes through the o-series code path (max_completion_tokens, no system message, temperature=1)
  • Verify ensemble reviews (num_reviews_ensemble > 1) work with GPT-5 models via get_batch_responses_from_llm

🤖 Generated with Claude Code

…penAI models

GPT-5 models require max_completion_tokens instead of max_tokens (the latter
raises "Unsupported parameter" errors). This updates both get_response_from_llm
and get_batch_responses_from_llm to use the correct parameter for GPT-5 models
while preserving max_tokens for older GPT-4 models. Also adds o4-mini to the
o-series routing in get_response_from_llm and create_client.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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