Skip to content

fix: preserve Responses reasoning stream lifecycle - #103

Open
chrisnestrud wants to merge 1 commit into
ZhiYi-R:mainfrom
chrisnestrud:fix/responses-reasoning-sse-lifecycle
Open

fix: preserve Responses reasoning stream lifecycle#103
chrisnestrud wants to merge 1 commit into
ZhiYi-R:mainfrom
chrisnestrud:fix/responses-reasoning-sse-lifecycle

Conversation

@chrisnestrud

Copy link
Copy Markdown

Summary

Fixes the Anthropic-to-Responses reasoning stream lifecycle used by Codex before tool-call continuations.

  • Initialize the reasoning summary_text part before emitting deltas.
  • Emit reasoning text/part/item completion events with the provider signature.
  • Carry the Anthropic message ID into the Responses lifecycle.
  • Preserve signature_delta rather than treating it as a generic thinking delta.
  • Add a mocked E2E replay: Anthropic thinking + tool use → Responses output → Anthropic tool-result continuation.

Fixes #102
Refs #63
Refs #101

Validation

CGO_ENABLED=0 go test -p 1 ./...
go test -tags=e2e ./internal/e2e -run "^TestOpenAIResponseAnthropicE2E_ReasoningToolReplay$"

The complete tagged E2E suite has unrelated existing failures tracked in #101.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(responses): initialize reasoning summary lifecycle for Anthropic streams

1 participant