Skip to content

feat: Support GPT-5 maxCompletionTokens - #897

Merged
johanandren merged 2 commits into
mainfrom
wip-gpt5-patriknw
Aug 21, 2025
Merged

johanandren merged 2 commits into
mainfrom
wip-gpt5-patriknw

Conversation

@patriknw

Copy link
Copy Markdown
Contributor

Refs #880
Requires a new runtime release with https://github.com/lightbend/kalix-runtime/pull/4142

@github-actions github-actions Bot added documentation documentation related java-sdk labels Aug 15, 2025

@johanandren johanandren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (once runtime released/bumped)

top-p = NaN
# Maximum number of tokens to generate (-1 for model default)
# Not supported by GPT-5, use max-completion-tokens instead.
max-tokens = -1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message if trying to use this is pretty clear:

"Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",

base-url = ""
# Controls randomness in the model's output (0.0 to 1.0)
# Not supported by GPT-5.
temperature = NaN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error message if trying to use this:

"Unsupported value: 'temperature' does not support 0.8 with this model. Only the default (1) value is supported.",

# predictable text while higher values (like 0.9) allow more creativity
# and variation.
# Not supported by GPT-5.
top-p = NaN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@github-actions github-actions Bot removed the documentation documentation related label Aug 21, 2025
@patriknw

Copy link
Copy Markdown
Contributor Author

rebased, can be merged after validation

@johanandren
johanandren merged commit 01e525a into main Aug 21, 2025
@johanandren
johanandren deleted the wip-gpt5-patriknw branch August 21, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants