From f026bb81ae68f516910d0eb4f23c9344dd36b62b Mon Sep 17 00:00:00 2001 From: T Date: Mon, 25 May 2026 21:50:43 -0600 Subject: phase 2 done --- docs/phase-2.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/phase-2.md b/docs/phase-2.md index af45546..4cb7ed9 100644 --- a/docs/phase-2.md +++ b/docs/phase-2.md @@ -1,5 +1,7 @@ # Phase 2: Anthropic Provider +**Status: complete.** Anthropic Messages API streams end-to-end alongside the phase-1 OpenAI provider; the Receiver callback sequence is identical across both; system prompts extract to the top-level field; thinking blocks round-trip via captured `signature` deltas. Refinements that diverged from the original plan: file/type names use the explicit dialect (`provider_anthropic_messages`, `AnthropicMessagesConfig`) to leave room for `openai_responses` and future Anthropic shapes; `Config` is a tagged union keyed by `APIStyle` rather than separate types at call sites; concrete provider types are internal — callers construct via `provider.Provider.init(allocator, io, config)`. Wire-level gotchas worth remembering: both providers send `accept-encoding: identity` because gzip buffers small SSE frames and defeats streaming; the read loop uses `readVec` rather than `readSliceShort` because the latter fills its buffer before returning, which also defeats streaming. Tool use / tool result blocks remain stubbed for phase 3+. + ## Goal Add Anthropic as a second provider, validating that the Provider abstraction and internal conversation model are genuinely provider-agnostic — not just OpenAI in disguise. -- cgit v1.3