mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-27 10:20:54 +08:00
The Test button on System -> LLM always sent the output cap as max_tokens, because POST /api/llm/test never read the profile's max_tokens_field. OpenAI reasoning models (o-series, GPT-5) reject max_tokens with unsupported_parameter, so a profile set to max_completion_tokens failed the test with HTTP 400 while conversations with the same profile worked. testLLM now accepts max_tokens_field from the form and falls back to the stored profile's value when the field is omitted (list-view test). It is normalized like profile saves: only the openai format with max_completion_tokens keeps it. The form passes its current selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>