text: accept max_completion_tokens as an alias for max_tokens
Newer OpenAI clients send max_completion_tokens instead of the deprecated max_tokens. Our request model only read max_tokens, so such a request arrived with max_tokens=None and fell back to the default — ignoring the client's limit. Add a max_completion_tokens field and a model_validator that maps it onto max_tokens when max_tokens is omitted (max_tokens wins when both are present). Co-Authored-By:Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
Showing
Please
register
or
sign in
to comment