feat(llm): ReasoningEffort request option and ErrUnsupported sentinel

Groundwork for the provider phase: reasoning levels map to native knobs
(OpenAI reasoning_effort, Ollama think); ErrUnsupported marks declared
capability mismatches that chains advance past without health penalty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 12:40:47 +02:00
parent 0d0e8e069e
commit 323558ed72
4 changed files with 25 additions and 2 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ func chainDo[T any](ctx context.Context, c *chain, attempt func(context.Context,
class := c.cfg.classify(err)
if class == llm.ClassPermanent {
if errors.Is(err, llm.ErrModelNotFound) || c.cfg.AdvanceOnPermanent {
if errors.Is(err, llm.ErrModelNotFound) || errors.Is(err, llm.ErrUnsupported) || c.cfg.AdvanceOnPermanent {
// Not a health problem (or policy says keep going):
// advance without penalizing the target.
failures = append(failures, fmt.Errorf("%s: %w", t.key, err))