Map reasoning effort aliases to supported llama.cpp values

This commit is contained in:
Mikei386
2026-09-29 21:51:57 +02:00
parent d08e194be7
commit fd2c21f208
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -4,8 +4,9 @@ Effort is a template hint, not a guaranteed compute budget. llama.cpp forwards
positive levels to the model template; it handles 'none' as thinking disabled.
"""
CHAT_FIELDS=frozenset({'model','messages','stream','stream_options','temperature','top_p','top_k','max_tokens','max_completion_tokens','stop','seed','tools','tool_choice','parallel_tool_calls','response_format','presence_penalty','frequency_penalty','logprobs','top_logprobs','user','n','reasoning_effort'})
LLAMA_EFFORTS=frozenset({'none','minimal','low','medium','high','xhigh','max'})
EFFORT_ALIASES={'ultra':'max'}
LLAMA_EFFORTS=frozenset({'none','low','medium','high','xhigh'})
# The installed llama.cpp server rejects minimal and max. Use nearest supported hints.
EFFORT_ALIASES={'minimal':'low','max':'xhigh','ultra':'xhigh'}
class CompatibilityError(ValueError):pass