Repository navigation
fix(prompt-chatgpt): replace gpt-3.5-turbo, shut down by OpenAI on 2026-10-23 - #489
pcbeingused333 wants to merge 3 commits 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.
There was a problem hiding this comment.
I raised PHP’s default to 512 to match Python and Node, and PHP now honors the documented OPENAI_MAX_TOKENS setting while retaining MAX_TOKENS as a fallback. The configured value is parsed as an integer. All three READMEs now explain that GPT-5.x reasoning tokens count toward that budget.
This comment was drafted with an AI coding assistant.
|
Hi, just a gentle ping on this one in case it slipped through. Happy to adjust anything if needed. Thanks! |
|
Friendly ping: could someone take a look at this when there's time? Happy to adjust or rebase anything. Thanks! |
Code review
Updates the Node, PHP, and Python prompt-chatgpt handlers to use GPT-5.6-terra and pass the configured response limit as max_completion_tokens. Their READMEs now describe the model and note that GPT-5.x token limits include reasoning tokens. Note @pcbeingused333 does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve. Walkthrough (6)
Reviewed Tip Comment |

The Python, Node, and PHP Prompt ChatGPT templates used the retired
gpt-3.5-turbomodel. This PR replaces it withgpt-5.6-terra, the replacement OpenAI lists in https://developers.openai.com/api/docs/deprecations, and passes the token budget asmax_completion_tokens.PHP now defaults to 512 completion tokens, matching Python and Node. It reads the documented
OPENAI_MAX_TOKENSvariable and falls back toMAX_TOKENSfor existing deployments. PHP converts the configured value to an integer before sending it to the API, matching Python and Node. The three READMEs explain that GPT-5.x counts reasoning tokens toward the same limit.Dart remains a separate follow-up because it needs a Dart SDK and dependency upgrade to send
max_completion_tokens.The Python and Node model migration was checked against a local Chat Completions stub. The PHP budget change was checked by inspecting the diff and verifying the environment lookup and fallback with
git grep. No live OpenAI request was sent.Disclosure: Prepared with AI coding assistance and submitted for human review.