Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ Automated + human review threads on [PR #825](https://github.com/gunb-ai/gunbc/p

[PR #901](https://github.com/gunb-ai/gunbc/pull/901) landed typed LLM/GitHub inputs and **named** downstream work as searchable **`closure:<identifier>`** strings in `dsl/extdeps/llm/*.dag`. The three triggers the program still tracks as **explicit closure work** (search these tokens in-repo and in issue bodies):

1. **`rest_typed_response_body` — PARTIAL 2026-05-04 (Row 32 residual slice)** — Typed service inputs; REST `response { 200 => Typed… }` is implemented for the OpenAI ChatCompletion and Anthropic Messages 200-body carriers, and the stale typed-projection receipts `structural_coverage_gap_openai_chat_completion_outputs` / `structural_coverage_gap_anthropic_messages_outputs` are retired with regression witnesses. The Row 32 residual slice typed OpenAI ChatCompletion 200 fidelity fields (`service_tier`, `system_fingerprint`, `logprobs`, `refusal` on the text-bearing message slice, `annotations`, `completion_tokens_details`, `prompt_tokens_details`), typed Anthropic Messages 200 fidelity fields (`container`, citation coproduct, cache-token counters, `service_tier`), and migrated OpenAI Responses from `response { 200 => Json }` to a narrow `OpenAiResponses200Body` proof-of-shape. Remaining response-fidelity residuals stay tracked in `structural_coverage_gap_openai_chat_completion_200_residual`, `structural_coverage_gap_anthropic_messages_200_residual`, and `structural_coverage_gap_openai_responses_200_residual`: OpenAI ChatCompletion tool/function/audio/multimodal response variants and refusal-without-content need a response content/tool/audio coproduct, OpenAI Responses `output_text.logprobs` plus refusal/tool/reasoning/error/multimodal output variants need an output item/content coproduct beyond the current required-text projection carrier, Anthropic thinking/tool/web-search/server-tool content blocks need a content-block coproduct, and Anthropic `container` remains presence-preserved as `Json?` until the container-management response surface has a structural consumer. Broader non-LLM `response { 200 => Json }` operations are separate scope.
1. **`rest_typed_response_body` — PARTIAL 2026-05-04 (Row 32 residual slice)** — Typed service inputs; REST `response { 200 => Typed… }` is implemented for the OpenAI ChatCompletion and Anthropic Messages 200-body carriers, and the stale typed-projection receipts `structural_coverage_gap_openai_chat_completion_outputs` / `structural_coverage_gap_anthropic_messages_outputs` are retired with regression witnesses. The Row 32 residual slice typed OpenAI ChatCompletion 200 fidelity fields (`service_tier`, `system_fingerprint`, `logprobs`, `refusal` on the text-bearing message slice, `annotations`, `completion_tokens_details`, `prompt_tokens_details`), typed Anthropic Messages 200 fidelity fields (citation coproduct, content-block coproduct, cache-token counters, typed `service_tier`), and migrated OpenAI Responses from `response { 200 => Json }` to a narrow `OpenAiResponses200Body` proof-of-shape. Remaining response-fidelity residuals stay tracked in `structural_coverage_gap_openai_chat_completion_200_residual`, `structural_coverage_gap_anthropic_messages_200_residual`, and `structural_coverage_gap_openai_responses_200_residual`: OpenAI ChatCompletion tool/function/audio/multimodal response variants and refusal-without-content need a response content/tool/audio coproduct, OpenAI Responses `output_text.logprobs` plus refusal/tool/reasoning/error/multimodal output variants need an output item/content coproduct beyond the current required-text projection carrier, and Anthropic `container` remains presence-preserved as `Json?` until the container-management response surface has a structural consumer while beta/server-tool result payloads remain explicitly tracked. The Anthropic Messages 200 content-block response wire contract remains a separate `rest_request_wire_serde_alignment` residual until a generated response enum serde/emitter ratchet consumes it. Broader non-LLM `response { 200 => Json }` operations are separate scope.

2. **`openai_chat_message_full_coproduct`** — Retired by issue #2605 / PR #2627. `OpenAiChatMessage` is now a role-tagged request coproduct with tool + `tool_call_id`, legacy function rows, and typed text/image content parts. Residual additive content/tool surfaces are tracked by `structural_coverage_gap_openai_chat_message_additive_content_parts` in `dsl/extdeps/llm/openai.dag`.

Expand Down
20 changes: 12 additions & 8 deletions dsl/extdeps/llm/anthropic.dag
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ data anthropic_assistant_content_block_wire_contract: CoproductWireContract = {
encoding: InternallyTaggedObject { tag_field: "type", naming: StripPrefixSuffixAndSnakeCase { prefix: "Assistant", suffix: "Block" } }
}

data anthropic_messages_200_content_block_wire_contract: CoproductWireContract = {
coproduct: "AnthropicMessages200ContentBlock",
encoding: InternallyTaggedObject { tag_field: "type", naming: StripPrefixSuffixAndSnakeCase { prefix: "Messages", suffix: "Block" } }
}

// -- Models --------------------------------------------------------

type AnthropicModel
Expand Down Expand Up @@ -174,12 +169,18 @@ type AnthropicMessages200ContentBlock
// by `server_tool_input_payloads_unmodeled`.
type AnthropicServerToolName = WebSearch | WebFetch | CodeExecution | BashCodeExecution | TextEditorCodeExecution | ToolSearchToolRegex | ToolSearchToolBm25 | Advisor

// 🟢 TERMINAL provider-domain enum for Anthropic Messages 200 `usage.service_tier`.
// Dissolution receipt: the field is a closed API string domain, not free-form
// metadata; fact placement would duplicate the usage field authority, algebraic
// form has no operator surface, and dimensional split has no independent axes.
type AnthropicMessages200ServiceTier = Standard | Priority | Batch

type AnthropicMessages200Usage {
input_tokens: Int
output_tokens: Int
cache_creation_input_tokens: Int?
cache_read_input_tokens: Int?
service_tier: String?
service_tier: AnthropicMessages200ServiceTier?
}

// Anthropic Messages 200 response role. The API currently returns only
Expand Down Expand Up @@ -216,8 +217,7 @@ data structural_coverage_gap_anthropic_messages_200_residual: List<String> = [
"closure:anthropic_messages_200_residual|AnthropicMessages200ContentBlock.MessagesToolUseBlock|residue:client_tool_name_input_and_optional_caller_payloads_not_bound_to_declared_tool_schema|trigger:tool_use response block references declared AnthropicToolDefinition through typed caller carrier and input payload schema",
"closure:anthropic_messages_200_residual|AnthropicMessages200ContentBlock.MessagesServerToolUseBlock|residue:server_tool_input_and_optional_caller_payloads_unmodeled|trigger:fold server_tool_use name and input into a server-tool-use coproduct keyed by AnthropicServerToolName",
"closure:anthropic_messages_200_residual|AnthropicServerToolName|external_spec_watch:server_tool_use_name_set|trigger:Anthropic publishes additional server_tool_use.name values beyond the generated SDK literal set",
"closure:anthropic_messages_200_residual|AnthropicMessages200ContentBlock|variant_pending:web_fetch_tool_result|variant_pending:code_execution_tool_result|variant_pending:bash_code_execution_tool_result|variant_pending:text_editor_code_execution_tool_result|variant_pending:tool_search_tool_result|variant_pending:advisor_tool_result|variant_pending:mcp_tool_use|variant_pending:mcp_tool_result|variant_pending:container_upload|trigger:Anthropic beta/server-tool content-block surface modeled structurally",
"closure:anthropic_messages_200_residual|llm.Anthropic.Messages.output.content|blocked:variant_aware_typed_rest_response_projection|path:content/0/text|requires_arm:AnthropicMessages200ContentBlock.MessagesTextBlock|trigger:structural projection metadata carrier lands"
"closure:anthropic_messages_200_residual|AnthropicMessages200ContentBlock|variant_pending:web_fetch_tool_result|variant_pending:code_execution_tool_result|variant_pending:bash_code_execution_tool_result|variant_pending:text_editor_code_execution_tool_result|variant_pending:tool_search_tool_result|variant_pending:advisor_tool_result|variant_pending:mcp_tool_use|variant_pending:mcp_tool_result|variant_pending:container_upload|trigger:Anthropic beta/server-tool content-block surface modeled structurally"

This comment was marked as resolved.

]

// Request wire: Messages API expects string `role` + flat `content[]` objects
Expand All @@ -236,6 +236,10 @@ data structural_coverage_gap_anthropic_tool_result_content_wire_shape: List<Stri
"closure:rest_request_wire_serde_alignment|llm.Anthropic.Messages|AnthropicUserContentBlock.UserToolResultBlock.content|residue:tool_result_content_must_serialize_scalar_text_or_content_block_array|trigger:emitted serde for AnthropicToolResultContent serializes ToolResultText as scalar string and ToolResultBlocks as content block array"
]

data structural_coverage_gap_anthropic_messages_200_content_block_wire_shape: List<String> = [
"closure:rest_request_wire_serde_alignment|llm.Anthropic.Messages|AnthropicMessages200ContentBlock|residue:messages_200_content_block_internally_tagged_object_unproved|trigger:generated response enum serde/emitter ratchet consumes the type-tagged AnthropicMessages200ContentBlock wire contract"
]

// -- Service: REST transport wiring ------------------------------

service llm.Anthropic {
Expand Down
Loading
Loading