Skip to content

refactor(provider)!: remove legacy Go JSON reads - #1031

Open
nrbrd wants to merge 2 commits into
mainfrom
nrbrd/998-current-provider-reads
Open

nrbrd wants to merge 2 commits into
mainfrom
nrbrd/998-current-provider-reads

Conversation

@nrbrd

@nrbrd nrbrd commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Read current LanguageModelV4 provider JSON without the older Go-only system arrays, untagged file data, split prompt tool outputs, raw generated tool inputs, or stream aliases.
  • Preserve canonical writes, empty/false fields, tagged file validation and the distinction between JSON-valued prompt input and string-valued generated/streamed input. Strict Gateway ProviderWire V4 and UI SSE are unchanged.

Validation

  • A temporary probe failed on the base at all ten removed read positions and passed with the cleanup: five now fail ordinary type/variant checks; five no longer populate fields from old stream names. The probe is not shipped.
  • Candidate Go round trips, provider race/vet/lint and Anthropic race tests; actual ai@7.0.183 (0411a13d) generateText/streamText exchanged canonical prompt and result payloads with Go via local mocks, preserving input text and empty/false values.
  • Registered parity checks, including 165 replay cases with unmodified provider recordings and expectations, and ProviderWire V4 contracts with both clients. No live provider traffic.
  • Both initial hosted Go jobs exposed two local Agent Observability fixtures that still supplied generated tool input as an object. Their inputs now use the current string encoding with identical JSON payloads; the module's full normal/race tests and vet pass.

BREAKING CHANGE: The Go provider-domain JSON readers no longer support legacy Go-only encodings. Previously stored payloads may fail decoding or leave fields unset. Current JSON writes and the Gateway and UI protocols are unchanged.

Closes #998

Keep the local provider codecs aligned with current LanguageModelV4 clients, without preserving old Go-only store formats.

BREAKING CHANGE: Older persisted Go-only provider JSON may fail decoding or leave fields unset. Current writes, ProviderWire V4 and UI SSE are unchanged.
@nrbrd nrbrd self-assigned this Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

OpenSpec Status

All changes archived. Ready to merge.

The fixture loader reads provider-domain results. Match the current Go writer without changing the tool arguments or mapper expectations.
@nrbrd
nrbrd marked this pull request as ready for review December 1, 2026 16:51
@nrbrd
nrbrd requested a review from a team as a code owner December 1, 2026 16:51
@nrbrd
nrbrd requested a review from gitdoluquita December 1, 2026 16:52
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.

refactor(provider): remove Go-only legacy JSON read paths

1 participant