Repository navigation
fix(chat): send max_completion_tokens to GPT-5 models in OpenAIChat - #498
pcbeingused33 wants to merge 4 commits into
Conversation
|
Heads up — this now conflicts with I merged eight other pull requests just now (#473, #485, #486, #489, #492, #493, #494, #499). Each appended its own entry to Resolving it is just keeping both entries: git fetch origin main
git merge origin/main
# keep both sides in docs/CHANGELOG.md, main's entries first
git add docs/CHANGELOG.md && git commit --no-edit && git pushI tried to do this for you directly and my environment blocks pushing to contributor forks, so it needs your hands. Once it's pushed I'll merge it — no re-review needed, the change itself hasn't moved. Sorry for the churn. Merging a batch into an append-only changelog guarantees this, and the four of you drew the short straw on ordering. 🤖 Generated with Claude Code |
# Conflicts: # docs/CHANGELOG.md
# Conflicts: # docs/CHANGELOG.md
CLAUDE.md asks every contributor to append an entry to docs/CHANGELOG.md, and the file is append-only, so any two concurrent pull requests collide at the bottom of it even when their code does not overlap. Merging a batch makes that quadratic: each merge re-conflicts every pull request still open. That is not hypothetical. Merging eight pull requests broke the four still in the queue (#487, #491, #495, #498) with docs/CHANGELOG.md as the only conflicting file in all four; their authors each resolved it, and merging #487 immediately re-broke the remaining three the same way. `union` is a built-in git merge driver that keeps the lines from both sides rather than writing conflict markers, which is the right resolution for an append-only log. Verified against the three pull requests this had just blocked, with the file as the only variable: without .gitattributes: #498 CONFLICT #491 CONFLICT #495 CONFLICT with .gitattributes: #498 clean #491 clean #495 clean Scope: this is verified for git merges, which is where contributors resolve. Whether GitHub's own merge-button machinery honours the attribute server-side is untested. Ordering inside a merged region follows the two sides, so the result still wants a glance when entry order carries meaning. No changelog entry for this one, deliberately: it is a repository tooling change rather than a user-visible feature or fix, and adding an entry would contribute to the problem it removes. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
This is green on its own merits and just needs git fetch origin main && git merge origin/main && git pushTwo things changed on
Once it is pushed I will merge — no re-review needed, your change itself has not moved. 🤖 Generated with Claude Code |
# Conflicts: # docs/CHANGELOG.md
What does this PR do?
OpenAIChat.askonly treatso1,o3ando4as reasoning models. A GPT-5 model, for exampleleann ask <index> --llm openai --llm-model gpt-5, getsmax_tokensandtemperature=0.7. The Chat Completions API rejectsmax_tokensand a non-default temperature for GPT-5 reasoning models, so the user getsError: Could not get a response from OpenAIinstead of an answer.gpt-5*model names now take the same branch as the o-series:max_completion_tokensandtemperature=1.0. This also applies to prefixed names such asopenai/gpt-5.5. Other models are sent the same parameters as before.--thinking-budgethandling is unchanged by this PR, so it is still not forwarded asreasoning_effortfor GPT-5 models.The new tests mock the OpenAI client and check the request parameters. The four GPT-5 cases fail on
mainand pass with this change; thegpt-4ocase passes on both. No live API call was made.Related Issues
None filed. Found by reading the other providers in
chat.pyafter #477.Checklist
pytest tests/test_openai_chat_gpt5_params.py); the full suite was not runruff formatandruff checkon the changed Python files)pre-commit run --all-files)This change was prepared with the help of an AI coding assistant.