Documentation
¶
Overview ¶
Package factory resolves an llm.Runner from model.LLMConfig. It lives in a sub-package to break the import cycle: internal/llm defines the Runner interface consumed by the claude and gollm sub-packages, and the factory sits above all three to dispatch and wrap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New builds an 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. Errors distinguish configuration problems from transport failures so the CLI can surface them distinctly.
Types ¶
This section is empty.