Skip to content

refactor(v2): centralize provider client contracts#2355

Open
jxnl-oai wants to merge 6 commits into
mainfrom
codex/v2-provider-owned-clients
Open

refactor(v2): centralize provider client contracts#2355
jxnl-oai wants to merge 6 commits into
mainfrom
codex/v2-provider-owned-clients

Conversation

@jxnl-oai

@jxnl-oai jxnl-oai commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace provider-local client construction with declarative ProviderSpec and ClientSpec contracts
  • centralize sync/async selection, mode validation, streaming method resolution, retries, hooks, and error propagation
  • preserve provider-specific SDK behavior through thin adapters and explicit compatibility exceptions

Stack

  1. Core architecture (this PR)
  2. Documentation and parity inventory (targets this branch)
  3. Shared behavioral contract tests (targets this branch)

The documentation and tests PRs are independent siblings and can be reviewed in parallel after this PR.

Verification

  • ruff check instructor examples/v2-model-mode-benchmark/run.py
  • ruff format --check instructor examples/v2-model-mode-benchmark/run.py
  • ty check --python .venv
  • Full deterministic parity is supplied by the sibling tests PR.

Supersedes #2315.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 7, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
instructor b3c4409 Commit Preview URL

Branch Preview URL
Jun 08 2026, 12:39 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants