Skip to content

chore(core): drop unreachable AI SDK provider packages - #40504

Merged
rekram1-node merged 1 commit into
v2from
drop-dead-aisdk
Aug 4, 2026
Merged

chore(core): drop unreachable AI SDK provider packages#40504
rekram1-node merged 1 commit into
v2from
drop-dead-aisdk

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

Removes AI SDK packages that can never execute on the v2 model resolution path, plus dead deps in unrelated packages.

Model resolution (model-resolver.ts fromCatalogModel) intercepts these packages before loadAISDK can ever fire their plugin sdk hooks:

  • @ai-sdk/openai → native OpenAIResponses route; had zero import sites in core
  • @ai-sdk/anthropic / @ai-sdk/openai-compatiblekept (still reachable via Copilot Claude models and providers without a baseURL)
  • @ai-sdk/googleAISDKNative.map always maps to @opencode-ai/ai/providers/google; sdk hook was the whole plugin, so GooglePlugin is deleted
  • @ai-sdk/xai → always mapped to @opencode-ai/ai/providers/xai; sdk/language hooks removed, OAuth integration kept. The promptCacheKey patch (patches/@ai-sdk%2Fxai@3.0.102.patch) is superseded by the native mapping, so the patch entry and file are removed
  • @openrouter/ai-sdk-provider → always mapped via mapOpenRouter; sdk hook removed, catalog transform (referer headers, gpt-5-chat alias filtering) kept

Also removes declared-but-never-imported AI deps:

  • packages/console/function: openai, @ai-sdk/anthropic, @ai-sdk/openai, @ai-sdk/openai-compatible, ai
  • packages/web: ai

Notes:

  • @ai-sdk/google remains in the tree transitively via @ai-sdk/google-vertex, so its root patch entry stays.
  • @ai-sdk/amazon-bedrock is intentionally not touched: its dead sdk hook contains Bedrock-domain behavior not yet ported natively (cross-region inference-profile model-ID prefixing via resolveModelID, and AWS default credential chain via fromNodeProviderChain for profile/SSO/instance-role auth). Follow-up will port those before removal.

Checks

  • bun typecheck (packages/core)
  • bun test test/plugin/ (packages/core) — 208 pass
  • bun install lockfile updated

Requested by: Aiden Cline (rekram1-node)

@rekram1-node
rekram1-node merged commit b9c118e into v2 Aug 4, 2026
9 of 10 checks passed
@rekram1-node
rekram1-node deleted the drop-dead-aisdk branch August 4, 2026 19:37
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Aug 5, 2026
* upstream/v2: (28 commits)
  refactor(app): gate unsupported v2 capabilities (anomalyco#40381)
  fix(app): show active search details (anomalyco#40597)
  refactor(app): migrate supported v2 APIs (anomalyco#40378)
  fix(app): reconcile v2 session projections (anomalyco#40376)
  refactor(app): own rendering contracts (anomalyco#40375)
  fix(core): make xAI OAuth device-only (anomalyco#40538)
  test(app): migrate e2e fixtures to v2 (anomalyco#40374)
  fix(core): report missing shell workdir (anomalyco#40542)
  fix(ai): restore Responses tool input semantics (anomalyco#40553)
  fix(ai): classify malformed Responses tool calls (anomalyco#40549)
  feat(tui): streamline tab navigation shortcuts (anomalyco#40551)
  fix(ai): preserve Gemini tool finish semantics (anomalyco#40546)
  fix: retry empty incomplete streams (anomalyco#40535)
  fix(app): finish tool call ID rename (anomalyco#40539)
  refactor: rename tool call ID fields
  fix(client): wait for live service contenders (anomalyco#40515)
  chore(core): drop unreachable AI SDK provider packages (anomalyco#40504)
  fix(tui): update tab titles immediately (anomalyco#40318)
  fix(tui): show branch beside directory (anomalyco#40500)
  feat(vcs): publish branch updates (anomalyco#40371)
  ...
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.

1 participant