Skip to content

[v4/p8-public-json] refactor!: public JSON equals the AI SDK JSON - #242

Closed
cunninghamcard-bit wants to merge 1 commit into
v4/7-remaining-upstream-model-kindsfrom
v4/p8-public-json
Closed

cunninghamcard-bit wants to merge 1 commit into
v4/7-remaining-upstream-model-kindsfrom
v4/p8-public-json

Conversation

@cunninghamcard-bit

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

Copy link
Copy Markdown
Contributor

Requested by li

Summary

Before: the public JSON of results, stream parts, errors, recordings and options uses aimux's own snake_case shapes, and errors are tagged aimux's way.

After: it is the AI SDK's JSON: camelCase fields, type-tagged unions, and errors tagged by the AI SDK error name (AI_APICallError, ...). The call-layer tool result carries upstream's structured output, and Size and AspectRatio serialize as upstream's template strings. The seven bindings follow.

The by-name provider entries (aimux_register_providers and the binding calls to it) stay until the bindings migrate to the new C ABI.

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

- The public JSON of results, stream parts, errors, recordings and options
  is the AI SDK's JSON: camelCase fields and type-tagged unions. Errors are
  tagged by the AI SDK error name (AI_APICallError, ...).
- The call-layer tool result carries upstream's structured output.
- Size and AspectRatio serialize as upstream's template strings.
- The seven bindings follow the AI SDK JSON and the reduced C ABI; their
  decision and recording tests read the camelCase wire JSON, and a missing
  decision usage count is absent from the JSON.
- The NoSuchProvider message suggests close names.

The by-name provider entries stay until the bindings migrate.

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 8/8] refactor!: public JSON equals the AI SDK JSON [v4/p8-public-json] refactor!: public JSON equals the AI SDK JSON Oct 12, 2026
@cunninghamcard-bit
cunninghamcard-bit deleted the v4/p8-public-json 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