server: answer reasoning_effort levels the template rejects with 400 (#32332)
The reasoning effort probe already renders every candidate level, but it dropped the ones the template raises on, so a request with such a level (e.g. max on Qwen3.8) reached the template and came back as a 500 on /v1/chat/completions, /v1/responses and /v1/messages. Keep the raising levels in reasoning_effort_rejected and reject them in oaicompat_chat_params_parse with an invalid_argument, which the server answers with a 400 listing the supported levels. Aliases and levels a template ignores are not rejected, so high on Qwen3.8 still renders as xhigh. Also trim the output_config.effort test to a single level.
This commit is contained in:
1 parent
05db09a4d3
commit
a946eb541a
8 files changed
+54
-4
No files matched your search
@@ -1979,5 +1979,6 @@ common_json common_chat_templates_get_caps(const common_chat_templates * chat_te
|
||||
: chat_templates->template_default->caps;
|
||||
common_json result = caps.to_map();
|
||||
result["reasoning_effort_levels"] = caps.reasoning_effort_levels;
|
||||
result["reasoning_effort_rejected"] = caps.reasoning_effort_rejected;
|
||||
return result;
|
||||
}
|
||||
Reference in new issue
Block a user