Repository navigation
Move the AI Answer default off gpt-3.5-turbo before its 23 October shutdown - #403
Open
Lakshya-0910 wants to merge 1 commit into
Open
Lakshya-0910 wants to merge 1 commit into
Lakshya-0910 wants to merge 1 commit into
Conversation
…utdown OpenAI shuts gpt-3.5-turbo down on 23 October 2026. The default becomes gpt-4.1-mini, which is not retiring and accepts max_tokens. GPT-5 models reject max_tokens, so BuildChatGPTBody sends the limit as max_completion_tokens for them; other models are unchanged. TestTrimContextAsPerLimits was sized for gpt-3.5-turbo's 4,096-token window and relied on the default model; it now names that model explicitly. Closes appbaseio#402
nisatsama
suggested changes
Oct 6, 2026
Author
|
Thanks for the review, @nisatsama! I think that comment landed on the removed line (the red side of the diff). In this branch, |
nisatsama
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #402.
gpt-3.5-turbo→gpt-4.1-miniinplugins/pipelines/ai_answer.goandplugins/openai/util.go. OpenAI shutsgpt-3.5-turbodown on 23 October 2026;gpt-4.1-miniis not retiring and acceptsmax_tokensas sent today.BuildChatGPTBodysends the limit asmax_completion_tokenswhen the model starts withgpt-5(they rejectmax_tokens). Every other model gets exactly the body it gets now.body_test.gocovers both (and fails on the current code).TestTrimContextAsPerLimitswas sized for gpt-3.5-turbo's 4,096-token window and picked up the default model implicitly, so it now sets that model explicitly; its cases are unchanged.go test ./plugins/openai/ ./plugins/pipelines/passes;go build ./...andgofmtare clean.Tested live today with the default system prompt and a 300-token limit:
gpt-4.1-miniwithmax_tokens: 300: answered normally.gpt-5.6-terrawithmax_completion_tokens: 300(the new body): answered normally.gpt-5.6-terrawithmax_tokens: 300(the current body):400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.