fix: support max_completion_tokens for reasoning models - #24
Open
tink-bot wants to merge 2 commits into
Open
Conversation
Reasoning models (o1/o3/o4/gpt-5 series) reject max_tokens and non-default temperature; go-openai's ReasoningValidator fails such requests client-side before anything is sent. - Add a max_completion_tokens input that takes precedence over max_tokens. - When the model is a reasoning model and max_completion_tokens is not set, send the max_tokens budget as max_completion_tokens so existing configs keep working. - Omit temperature for reasoning models (fixed at 1) and print a note when a different value was configured.
|
This PR is entirely AI generated and reviewed by me, feel free to discard it completely |
kolaente
added a commit
to go-vikunja/vikunja
that referenced
this pull request
Aug 3, 2026
Upstream rejects max_tokens/temperature for gpt-5 series models, breaking auto-label with gpt-5.6-luna. Pin to the fork carrying appleboy/LLM-action#24 until it is merged and released.
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.
Reasoning models (o1/o3/o4/gpt-5 series) unusable with this action — go-openai's
ReasoningValidatorrejects requests client-side:max_tokensset =this model is not supported MaxTokens, please use MaxCompletionTokens; temperature other than 1 fails too. Action always sends both (defaults 1000 / 0.7), so every reasoning-model run errors before any HTTP request.Fixes #23
Changes:
max_completion_tokensinput, takes precedence overmax_tokens.max_tokensset = budget sent asmax_completion_tokens, existing configs keep working without changes.action.ymldocs updated.How to verify
model: gpt-5.6-luna(or anyo1/o3/o4/gpt-5model),max_tokens: '4000', andtemperature: '0.2'against the OpenAI API.gpt-4oand the same inputs.max_tokensandtemperaturesent as configured.Before this PR: step 1 failed with
chat completion error: this model is not supported MaxTokens, please use MaxCompletionTokens.