Skip to content

Python: OpenAI Chat Client consider mapping max_tokens to max_completion_tokens instead of max_tokens #1866

@eavanvalkenburg

Description

@eavanvalkenburg

Currently we map max_tokens from ChatOptions to max_tokens for the Chat Completion API, newer models, including reasoning models, use max_completion_tokens instead of max_tokens, we could map to the new field instead, rather then having people do that through additional_properties.

In dotnet, the field in the sdk is already deprecated (called _deprecatedMaxTokens), this is not the case in python, where the field is still shown, it is unclear from docs whether older api versions would break with this change.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions