From 0c4e0081d812fe6488566a66ef1a6d4bfdbd639a Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 23 May 2026 22:36:59 +0000 Subject: [PATCH] docs: add DD#9 for foreman integration decision --- v2/CLAUDE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/v2/CLAUDE.md b/v2/CLAUDE.md index 840ca28..01714ca 100644 --- a/v2/CLAUDE.md +++ b/v2/CLAUDE.md @@ -32,3 +32,13 @@ 6. Streaming via pull-based `StreamReader.Next()` 7. Middleware for logging, retry, timeout, usage tracking 8. Ollama uses the native `/api/chat` API rather than the OpenAI-compat `/v1` endpoint. Native API supports `think: false` for thinking-capable models, has more reliable tool calling, and is approximately 15-20% lower latency. Both local and cloud share the same provider; only the apiKey/baseURL differ. `llm.Ollama()` targets `http://localhost:11434` with no Authorization header; `llm.OllamaCloud(key)` targets `https://ollama.com` with `Authorization: Bearer `. + +### DD#9 — foreman integration via thin Foreman() constructor (2026-05-23) +**Context:** foreman is a private queued Ollama endpoint. It speaks native Ollama +on the wire, so no new provider is needed. +**Decision:** `llm.Foreman(baseURL, apiKey)` delegates to `ollamaProvider.New()`. +baseURL is positional and required (no sensible default for a private daemon). +apiKey can be empty for network-trusted deployments. +**Consequence:** Zero new code paths. Streaming, tool use, and think work through +the existing native ollama provider. A dedicated foreman provider (Level 2) is +deferred unless async /jobs or webhook integration is needed at the llm layer.