Skip to content

fix(ai): preserve response message phases#38777

Open
rekram1-node wants to merge 2 commits into
v2from
openai-phases
Open

fix(ai): preserve response message phases#38777
rekram1-node wants to merge 2 commits into
v2from
openai-phases

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • align Open Responses assistant phase handling with the official OpenAI SDK contract (commentary, final_answer, and explicit null)
  • preserve phase metadata across streamed output ordering variants and replay it on follow-up requests
  • persist assistant text provider state through V2 durable events, projections, history reconstruction, and generated client types
  • retain phase across same-provider model changes and partial failures without leaking metadata across providers

Verification

  • packages/ai: bun test test/provider/openai-responses.test.ts; bun typecheck
  • packages/core: bun test test/session-runner.test.ts; bun test test/session-runner-message.test.ts; bun typecheck
  • packages/schema: bun typecheck; bun test test/event-manifest.test.ts
  • packages/client: bun run generate
  • iterative scoped sub-agent review completed with no findings

Notes

  • Full packages/schema tests have one pre-existing unrelated failure in contract-hygiene.test.ts for agent color validation; it is outside this PR scope.

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.

1 participant