Repository navigation
fix(prompt-chatgpt): replace gpt-3.5-turbo, shut down by OpenAI on 2026-10-23 - #489
pcbeingused333 wants to merge 1 commit into
Conversation
…26-10-23 OpenAI retired gpt-3.5-turbo on 2026-10-23 and names gpt-5.6-terra as its replacement, so the prompt-chatgpt templates fail on every request. Point the python, node and php templates and their READMEs at gpt-5.6-terra, and send the limit as max_completion_tokens: the gpt-5 family rejects max_tokens. The dart template is left unchanged: dart_openai 3.x (the newest release that supports its Dart 2 SDK constraint) still sends max_tokens. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔵 Tier A · Mergeable after minor fixes
The Python, Node, and PHP prompt-chatgpt templates now use GPT-5.6-terra and send their configured limits as
Note Not approving while a bug finding is open: 150-token cap also limits GPT-5.6 reasoning
Fix with agent prompt### Issue 1
php/prompt-chatgpt/src/index.php:26
**150-token cap also limits GPT-5.6 reasoning**
`max_completion_tokens` counts internal reasoning tokens as well as visible answer text, so the PHP template's default budget of 150 can be consumed before a multi-step prompt gets a useful answer; the handler still returns this as a successful completion. The old GPT-3.5 `max_tokens` limit did not have this reasoning-token cost, so consider raising the default or documenting that the configured budget includes reasoning.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 6
Reviewed |
| 'model' => 'gpt-3.5-turbo', | ||
| 'max_tokens' => $_ENV['MAX_TOKENS'] ?: 150, | ||
| 'model' => 'gpt-5.6-terra', | ||
| 'max_completion_tokens' => $_ENV['MAX_TOKENS'] ?: 150, |
There was a problem hiding this comment.
150-token cap also limits GPT-5.6 reasoning
max_completion_tokens counts internal reasoning tokens as well as visible answer text, so the PHP template's default budget of 150 can be consumed before a multi-step prompt gets a useful answer; the handler still returns this as a successful completion. The old GPT-3.5 max_tokens limit did not have this reasoning-token cost, so consider raising the default or documenting that the configured budget includes reasoning.
Prompt To Fix With AI
This is a comment left during a code review.
Path: php/prompt-chatgpt/src/index.php
Line: 26
Comment:
**150-token cap also limits GPT-5.6 reasoning**
`max_completion_tokens` counts internal reasoning tokens as well as visible answer text, so the PHP template's default budget of 150 can be consumed before a multi-step prompt gets a useful answer; the handler still returns this as a successful completion. The old GPT-3.5 `max_tokens` limit did not have this reasoning-token cost, so consider raising the default or documenting that the configured budget includes reasoning.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · bug · Reply if this doesn't apply.
The
prompt-chatgptfunction templates callgpt-3.5-turbo, which OpenAI shut down on 2026-10-23, so a freshly deployed python, node or php template answers every request with "Failed to query model."Fix:
gpt-5.6-terra, the replacement OpenAI lists forgpt-3.5-turbo(https://developers.openai.com/api/docs/deprecations), in the threemainfiles and their READMEs;max_completion_tokensinstead ofmax_tokens, since the gpt-5 family rejectsmax_tokens. TheOPENAI_MAX_TOKENS/MAX_TOKENSenv var names are unchanged;Not changed: the dart template.
dart_openai3.x, the newest line compatible with its Dart 2 SDK constraint, still sendsmax_tokens, so fixing it needs a dependency/SDK bump that seems better as its own change. It keeps pointing at the retired model for now.Testing: the repo has no tests for these templates, so the python (
openai<0.28) and node (openai@^4.47) handlers were run against a local stub of/v1/chat/completionsthat answers 400 for a model outsidegpt-5*or whenmax_tokensis in the body. Onmainboth return 500; with this change both return 200. The php template was changed the same way but not executed. Not run against a live OpenAI key, so whether a smallmax_completion_tokensbudget (default 512) is enough for a reasoning model's output is untested.Disclosure: prepared with the assistance of an AI coding tool (Claude), submitted for human review.