fix(llm): resolve catalog capabilities for reasoning-mode queries
Nightly Build / build (push) Successful in 7m53s

reasoning_mode_for (the add/edit form's reasoning-knob endpoint) evaluated
rules against an empty capability set, so a declared provider whose modes
are capability-gated never offered the knob; only id-glob rules (deepseek,
openai, anthropic) could match. It now resolves the model's capabilities
from the provider catalog first.

DeclaredProvider also gains llm_model_info (find in the listing) — until
now only anthropic/ollama overrode it, which is why a declared model's
context_length never refreshed from the catalog either (maybe_refresh_meta
always got None).

And DeepInfra's entry learns a second mode: models tagged 'reasoning' but
not 'reasoning_effort' (R1, DeepSeek-V4-Flash/Pro) accept the plain effort
levels per DeepInfra's docs — graded steps stay behind the
reasoning_effort tag.
This commit is contained in:
2026-08-07 15:30:45 +01:00
parent ea31fad188
commit 6b827e1b88
3 changed files with 24 additions and 3 deletions
+6 -2
View File
@@ -190,13 +190,17 @@ providers:
base_capabilities: [function_calling]
reasoning:
# Flat reasoning_effort (none/minimal/low/medium/high/xhigh/max);
# "none" disables reasoning where the model supports it. Models tagged
# `reasoning` but not `reasoning_effort` always think — no knob.
# "none" disables reasoning where the model supports it.
request: { kind: effort, remap: { disabled: none } }
modes:
- when: { capability: reasoning_effort }
values: [disabled, minimal, low, medium, high, xhigh, max]
default: high
# Models tagged only `reasoning` (R1, DeepSeek-V4-…) accept the plain
# levels — graded steps are a `reasoning_effort`-tag affair.
- when: { capability: reasoning }
values: [disabled, low, medium, high]
default: high
- id: lm_studio
name: "LM Studio"