Files
OpenShell/crates/openshell-server
Maxime GrenuandJohn Myers 0e5ebb6f76 fix(router): use max_completion_tokens for OpenAI GPT-5+ validation (#575)
* fix(router): use max_completion_tokens for OpenAI GPT-5+ validation probe

OpenAI GPT-5 models reject the legacy max_tokens parameter and require
max_completion_tokens. The inference validation probe now sends
max_completion_tokens as the primary parameter, with an automatic
fallback to max_tokens when the backend returns HTTP 400 (for
legacy/self-hosted backends that only support the older parameter).

Closes #517

Signed-off-by: Maxime Grenu <maxime.grenu@gmail.com>

* style(router): fix cargo fmt import order and line length

---------

Signed-off-by: Maxime Grenu <maxime.grenu@gmail.com>
Co-authored-by: John Myers <johntmyers@users.noreply.github.com>
2026-03-25 16:20:30 -07:00
..