Skip to content

[v4/p4-results] refactor(core)!: results, stream parts and the call pipeline follow the AI SDK - #238

Closed
cunninghamcard-bit wants to merge 1 commit into
v4/3-messages-and-content-follow-the-ai-sdkfrom
v4/p4-results
Closed

cunninghamcard-bit wants to merge 1 commit into
v4/3-messages-and-content-follow-the-ai-sdkfrom
v4/p4-results

Conversation

@cunninghamcard-bit

@cunninghamcard-bit cunninghamcard-bit commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Requested by li

Summary

Before: provider results do not carry request and response information, response metadata arrives as its own stream part, and applying a tool-call repair to a result leaves the result's content unchanged.

After: provider generate and stream results carry request and response as the upstream V4 result types do, and raw is the provider result itself. Response metadata is absorbed into the finish step and carried onto the call-layer results. A tool-call repair also updates the result's content.

This PR also takes the largest block of new work in the series (see below).

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • New provider
  • New / updated binding
  • Docs / RFC

Checklist

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes (cassette playback — no network/keys)
  • Added or updated cassette tests / contract fixtures for behavior changes
  • Updated relevant docs (README.md, docs/, rfc/, bindings/README.md)
  • Commit messages follow Conventional Commits

Notes for reviewers

Status: Draft, opened early so the series layout can be reviewed. The items under "Planned in follow-up pushes" land on this branch before it is marked ready. cargo test --workspace has not been run on this branch yet.


🤖 Generated with Claude Code

https://claude.ai/code/session_01A3WxDBWBA4ituJjXsHaEAa

…ion as upstream does

- Provider generate and stream results carry request and response
  information, as the upstream V4 result types do; raw is the provider
  result itself.
- The response metadata stream part is absorbed into the finish step, and
  request and response are carried onto the call-layer results.
- A tool-call repair applied to a result also updates the result's content.

CHANGELOG records the result fields as breaking; the migration notes
describe tool-call metadata on StreamingToolCallDelta.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3WxDBWBA4ituJjXsHaEAa
@cunninghamcard-bit cunninghamcard-bit self-assigned this Oct 12, 2026
@cunninghamcard-bit cunninghamcard-bit changed the title [V4 4/8] refactor(core)!: results, stream parts and the call pipeline follow the AI SDK [v4/p4-results] refactor(core)!: results, stream parts and the call pipeline follow the AI SDK Oct 12, 2026
@cunninghamcard-bit
cunninghamcard-bit deleted the v4/p4-results branch October 12, 2026 10:43
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.

2 participants