Skip to content

feat(opencode): AI SDK v6 Migration - v5 Compat Layer#15997

Open
catrielmuller wants to merge 10 commits intoanomalyco:devfrom
catrielmuller:catrielmuller/update-ai-sdk-dependencies
Open

feat(opencode): AI SDK v6 Migration - v5 Compat Layer#15997
catrielmuller wants to merge 10 commits intoanomalyco:devfrom
catrielmuller:catrielmuller/update-ai-sdk-dependencies

Conversation

@catrielmuller
Copy link

@catrielmuller catrielmuller commented Mar 4, 2026

Issue for this PR

Closes #6300

Related: #13527 @rekram1-node

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • Upgrade AI SDK from v5 to v6
  • Upgrade @ai-sdk/* providers to their latest versions
  • Migrated deprecated @gitlab/gitlab-ai-provider to gitlab-ai-provider (v5)
  • Updated @openrouter/ai-sdk-provider to 2.2.3
  • Remove patch for @openrouter/ai-sdk-provider
  • New Compatibility Shim (packages/opencode/src/provider/shim.ts) that provides a compatibility layer so that older v5-style provider plugins continue to work with the new v6 SDK APIs
  • Adapt to v6 types.

Local Nix Dev Improvements

  • Added playwright drivers
  • Added git env variables on test/preload.ts

How did you verify your code works?

  • bun tun typecheck
  • bun run test
opencode:test:  1273 pass
opencode:test:  5 skip
opencode:test:  0 fail
opencode:test:  2696 expect() calls
opencode:test: Ran 1278 tests across 86 files. [51.31s]

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Hey! Your PR title AI SDK v6 Migration - v5 Compat Layer doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Mar 4, 2026
@catrielmuller catrielmuller changed the title AI SDK v6 Migration - v5 Compat Layer feat(opencode): AI SDK v6 Migration - v5 Compat Layer Mar 4, 2026
@github-actions github-actions bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]: Migration to ai sdk v6

1 participant