Skip to content

[v4/p6-vendors] fix(providers): vendor behaviour follows the upstream packages - #240

Closed
cunninghamcard-bit wants to merge 1 commit into
v4/5-providers-are-ai-sdk-factoriesfrom
v4/p6-vendors
Closed

cunninghamcard-bit wants to merge 1 commit into
v4/5-providers-are-ai-sdk-factoriesfrom
v4/p6-vendors

Conversation

@cunninghamcard-bit

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

Copy link
Copy Markdown
Contributor

Requested by li

Summary

Before: after the move to factories, a number of vendor behaviours still differ from the pinned upstream packages, some upstream vendor features are missing, and several upstream-ported tests were deleted.

After: factories, request settings, base URLs, empty keys and provider names follow upstream; vendor option schemas live in each package; the missing vendor features are ported. Stream error events become error parts, API requests follow cross-origin redirects without credentials, and the upstream-ported model tests are kept.

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

Closes the vendor differences left after the move to factories, checked
against each pinned upstream package:
- Factories, request settings, base URLs, empty keys and provider names
  follow upstream; vendor option schemas live in each package and vendor
  namespaces are spelled through the package constants.
- Vendor features upstream has and aimux lacked are ported, including the
  image-model middleware.
- Stream error events become error parts; Cohere and Mistral detect media
  types as upstream does; Bedrock converter errors and Anthropic ids follow
  upstream; the Azure user-agent uses the package namespace.
- The OpenAI and OpenAI-compatible chat models drive the tool-call tracker
  with their package's options and flush pending tool calls through it.
- API requests follow cross-origin redirects and drop credentials on the
  way. A local runtime's optional key has its own credential kind.
- create_provider lists every built-in name when a name misses.
- Decision providers follow call-level retries and identity-only replay;
  the migrated recording fixtures are marked schema 3.

Tests: the upstream-ported model tests (sixteen files, plus the Bedrock and
Anthropic remaining cases) are kept, AI SDK protocol samples are recorded
under a mocked fetch, the DeepSeek cassette replay is kept, and the
hand-written tests the factories replace are deleted. An ignored live
SigV4 test checks against STS, Bedrock and Polly.

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 6/8] fix(providers): vendor behaviour follows the upstream packages [v4/p6-vendors] fix(providers): vendor behaviour follows the upstream packages Oct 12, 2026
@cunninghamcard-bit
cunninghamcard-bit deleted the v4/p6-vendors 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