trustgraph/trustgraph-flow
Azizultra32 2f23efc269 fix: use max_completion_tokens instead of deprecated max_tokens
The OpenAI API deprecated `max_tokens` in favor of `max_completion_tokens`
for chat completion endpoints. Newer models (gpt-4o, o1, o3, gpt-5.x)
reject `max_tokens` with:

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

This updates both the OpenAI and Azure OpenAI text completion providers
to use the new parameter name.

Fixes both streaming and non-streaming code paths.
2026-03-24 16:24:55 -07:00
..
trustgraph
pyproject.toml
README.md