- llamacpp: 4MB SSE scanner buffer (the 64KB bufio.Scanner default killed
streams whose single line exceeded it, e.g. a write tool call carrying a
whole file) and an empty-choices guard in toResponse instead of a panic;
request payload now uses bytes.NewReader (drops a full string copy).
- anthropic: Capabilities() reported a 1M-token context window for any
non-haiku model. Callers use that number to decide when to compact, so
compaction would have fired far too late and requests overflowed the
real window. Default is now the standard 200k, configurable via
Config.ContextWindow for extended-window models/plans.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pkg/llm/providers/anthropic: new client implementation (was previously
imported by rony-harness but never committed here, so a fresh clone
wouldn't build)
- pkg/llm/providers/llamacpp: Config/Client gain the full local-model
sampling surface (max_tokens, context_window, top_k/top_p/min_p,
presence/repetition penalty, max_thinking_tokens) to match the
llamacpp-local* entries added to configs/ai_providers.yaml
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>