SIGN IN SIGN UP

feat(provider): prove Go legacy byte-parity and non-Go zero-leak with shared-layer parity tests (issue #55)

Go traffic stays byte-for-byte on the pre-51 /alpha/generate wire format:
a golden captured from the 6df7653 baseline (normalized volatile fields)
is asserted verbatim for doStream and doGenerate, and the legacy tests are
untouched. Non-Go sessions are proven to emit zero /alpha/generate requests
via a whole-session fetch spy.

Per-stream stateful parsers (createOpenAIStreamParser /
createAnthropicStreamParser) complete tool calls whose arguments arrive in
multiple SSE events — the stateless mappers dropped the final tool-call part
(Anthropic) or mis-idded fragment deltas (OpenAI) — so tool-call args/results
behave identically to the legacy transport.

tests/provider-parity.test.ts drives the LanguageModel seam with fetch spies
on both transports for tool/image/system/max_tokens/reasoning/cost parity,
redaction parity (leaked API key redacted identically), and
retry/timeout/abort parity (429+Retry-After retries on all three endpoints,
400 not retried, timeout and mid-stream abort surface on both).
R
Rashid Razak committed
d52fca457d63cb25f862e52cb8d55d20ca0ae176
Parent: a5aae15