Documentation
¶
Overview ¶
Package factory is the local host's llm.Runner composition: it resolves model.LLMConfig — a host-private config schema that never goes public — into one composed pkg/llm Runner (provider adapter, rate-limit decorator, timeout decorator).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New builds a composed llm.Runner from config. Provider and model fall back to model.DefaultLLMProvider / model.DefaultLLMModel when empty. Remote providers (anthropic, openai) get wrapped with a rate.Limiter: an explicit cfg.RateLimitRPS takes precedence, otherwise a conservative tier-1-safe default is selected per provider/model family (see providerDefaultRPS). Local providers (claude-cli, ollama) stay uncapped. Every runner is bounded by the configured cfg.Timeout (falling back to defaultTimeout) — deadlines are configuration, so they compose here rather than being defaulted by any consumer. Errors distinguish configuration problems from transport failures so the CLI can surface them distinctly.
Types ¶
This section is empty.