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
+4
View File
@@ -76,6 +76,9 @@ const (
// ErrModelNotFound re-exports llm.ErrModelNotFound.
var ErrModelNotFound = llm.ErrModelNotFound
// ErrUnsupported re-exports llm.ErrUnsupported.
var ErrUnsupported = llm.ErrUnsupported
// Re-exported content and message constructors.
func Text(s string) Part { return llm.Text(s) }
func Image(mime string, data []byte) Part { return llm.Image(mime, data) }
@@ -96,6 +99,7 @@ func WithTemperature(t float64) Option { return llm.WithTempera
func WithTopP(p float64) Option { return llm.WithTopP(p) }
func WithMaxTokens(n int) Option { return llm.WithMaxTokens(n) }
func WithStopSequences(stops ...string) Option { return llm.WithStopSequences(stops...) }
func WithReasoningEffort(level string) Option { return llm.WithReasoningEffort(level) }
// WithModelCapabilities re-exports llm.WithCapabilities for Provider.Model
// calls made through this package.