Why: acceptance clause 1 requires the anthropic preset to complete a tool-call round against recorded HTTP fixtures; audit N4 root cause was an offline body builder the real client never used, with no tool_use/thinking on the wire.
What:
runtime/llm/anthropic.go: native client — POST {base}/messages with x-api-key + anthropic-version, shared anthropicBody (BuildBody and the live client use one pack function), SSE parser for message_start/content_block_*/message_delta incl. thinking_delta/signature_delta/input_json_delta, stop_reason mapping.
Message.Thinking blocks (signature + redacted) round-trip on requests; system and last tool carry cache_control.
anthropic preset switches to ProtocolAnthropic (compat shim stays available via models.json); ClientFor implements the branch; audit N4 closes.
Recorded fixtures in runtime/llm/testdata/anthropic/ — no real keys, no network.
Evidence: GOWORK=off go vet + go test -count=1 ./... green; TestAnthropicPresetToolRound (acceptance ①) drives preset → tools request → tool_use → tool_result → final text with signature round-trip; OpenAI path untouched (Client.Protocol zero value, all direct constructions unaffected).
Impact: preset semantic change is intentional and recorded in the N2 card; no product code consumes Presets/Lookup (verified by grep).
Refs: Agent-System-Documents#42 (N2 plan WP2), audit N4
Why: acceptance clause 1 requires the anthropic preset to complete a tool-call round against recorded HTTP fixtures; audit N4 root cause was an offline body builder the real client never used, with no tool_use/thinking on the wire.
What:
- runtime/llm/anthropic.go: native client — POST {base}/messages with x-api-key + anthropic-version, shared anthropicBody (BuildBody and the live client use one pack function), SSE parser for message_start/content_block_*/message_delta incl. thinking_delta/signature_delta/input_json_delta, stop_reason mapping.
- Message.Thinking blocks (signature + redacted) round-trip on requests; system and last tool carry cache_control.
- anthropic preset switches to ProtocolAnthropic (compat shim stays available via models.json); ClientFor implements the branch; audit N4 closes.
- Recorded fixtures in runtime/llm/testdata/anthropic/ — no real keys, no network.
Evidence: GOWORK=off go vet + go test -count=1 ./... green; TestAnthropicPresetToolRound (acceptance ①) drives preset → tools request → tool_use → tool_result → final text with signature round-trip; OpenAI path untouched (Client.Protocol zero value, all direct constructions unaffected).
Impact: preset semantic change is intentional and recorded in the N2 card; no product code consumes Presets/Lookup (verified by grep).
Refs: Agent-System-Documents#42 (N2 plan WP2), audit N4
Why: acceptance clause 1 requires the anthropic preset to complete a
tool-call round against recorded HTTP fixtures; audit N4's root cause
was an offline body builder the real client never used, with no
tool_use/thinking support on the wire.
Evidence: GOWORK=off go vet + go test -count=1 ./... green;
TestAnthropicPresetToolRound drives the preset through tools request →
tool_use → tool_result → final text with thinking-signature round-trip
against byte-recorded SSE fixtures; TestAnthropicBodyShape pins block
forms and cache_control; legacy OpenAI path untouched (Client.Protocol
zero value).
Impact: the anthropic preset now means the native Messages API (the
compat shim remains reachable via models.json custom providers); audit
N4 closes. BuildBody shares anthropicBody with the live client.
Refs: Agent-System-Documents#42 (N2 plan WP2), audit N4
weichen
merged commit d6053baf4c into main2026-10-07 13:22:41 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why: acceptance clause 1 requires the anthropic preset to complete a tool-call round against recorded HTTP fixtures; audit N4 root cause was an offline body builder the real client never used, with no tool_use/thinking on the wire.
What:
Evidence: GOWORK=off go vet + go test -count=1 ./... green; TestAnthropicPresetToolRound (acceptance ①) drives preset → tools request → tool_use → tool_result → final text with signature round-trip; OpenAI path untouched (Client.Protocol zero value, all direct constructions unaffected).
Impact: preset semantic change is intentional and recorded in the N2 card; no product code consumes Presets/Lookup (verified by grep).
Refs: Agent-System-Documents#42 (N2 plan WP2), audit N4