Required API changes for o1 / GPT-5.x reasoning models
I’ve updated my PopClip extension today to work with the newer reasoning models, and wanted to share the necessary changes for anyone else planning to migrate.
Important deprecation timeline:
- chatgpt-4o-latest will be shut down on February 17, 2026 (replacement: gpt-5.1-chat-latest)
- o1-preview will be shut down on July 28, 2025 (replacement: o3)
- o1-mini will be shut down on October 27, 2025 (replacement: o4-mini)
The existing parameter configuration no longer works with the o1-series and GPT-5.x models and requires specific adjustments.
Key Changes
1. Token limit: max_tokens → max_completion_tokens
const { data } = await openai.post("chat/completions", {
model: "gpt-5.1"
max_completion_tokens: 1048, // Replaces max_tokens
reasoning_effort: "low", // New: Controls reasoning depth
messages: [...]
});
2. Reasoning control: The new reasoning_effort parameter controls thinking depth:
"none"– No reasoning"low"– Minimal reasoning (fast, cost-effective)"medium"– Balanced (default)"high"– Maximum reasoning (slower, more expensive)
Additional Optional Parameters
{
model: "gpt-5.1",
max_completion_tokens: 1048,
reasoning_effort: "low",
temperature: 1.0, // Creativity (0-2)
top_p: 1.0, // Nucleus sampling
presence_penalty: 0.0, // Topic diversity (-2 to 2)
frequency_penalty: 0.0, // Word repetition (-2 to 2)
stream: false, // Streaming responses
n: 1, // Number of responses
store: true, // Store for evaluation
metadata: {} // Custom tracking data
}
Important: The o1-series models do not support system messages in the traditional sense. Prompts must be integrated into the user message.
Documentation
- Official Deprecation List: https://platform.openai.com/docs/deprecations
- API Reference: https://platform.openai.com/docs/api-reference/chat/create
- o1 Models Guide: https://platform.openai.com/docs/guides/reasoning
- o1 Developer Documentation: https://openai.com/index/o1-and-new-tools-for-developers/
Hope this helps anyone else migrating their extensions!