Skip to content

chore: upgrade ai sdk to v6#10642

Merged
sestinj merged 4 commits intocontinuedev:mainfrom
uinstinct:ai-sdk-upgrade-2
Feb 26, 2026
Merged

chore: upgrade ai sdk to v6#10642
sestinj merged 4 commits intocontinuedev:mainfrom
uinstinct:ai-sdk-upgrade-2

Conversation

@uinstinct
Copy link
Copy Markdown
Contributor

@uinstinct uinstinct commented Feb 19, 2026

Description

Upgrade aisdk along with corresponding adapters to v6. Also upgrade the functions in packages/openai-adapters to use v6 methods.

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Upgraded adapters to AI SDK v6, updated tools/messages/streaming to the new API, and switched Anthropic to the native provider for consistent behavior across OpenAI and Anthropic.

  • Dependencies

    • ai: ^6.0.86
    • @ai-sdk/openai: ^3.0.29
    • @ai-sdk/anthropic: ^3.0.44
  • Refactors

    • Use createAnthropic; remove provider stubs/flags.
    • Map max_tokens → maxOutputTokens; keep stop/top_p behavior.
    • Tools: use inputSchema; enforce top-level object for function params.
    • Messages: assistant tool calls send input (was args); tool results emit output text.
    • Streaming: adopt v6 events (text-/reasoning-start|delta|end with ids; tool-input-start|delta|end); finish uses totalUsage with inputTokens/outputTokens and cache details; ignore start/finish-step/start/abort/raw; update file/source payloads.
    • Usage/embeddings: map inputTokens/outputTokens to OpenAI usage; coerce embed inputs to strings (single and batch).

Written for commit ffe90db. Summary will update on new commits.

@uinstinct uinstinct requested a review from a team as a code owner February 19, 2026 08:35
@uinstinct uinstinct requested review from sestinj and removed request for a team February 19, 2026 08:35
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 19, 2026
@uinstinct uinstinct marked this pull request as draft February 19, 2026 08:35
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

@sestinj sestinj marked this pull request as ready for review February 24, 2026 04:10
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Feb 24, 2026
@sestinj sestinj merged commit 97ff73e into continuedev:main Feb 26, 2026
51 of 52 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Issues and PRs Feb 26, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 26, 2026
@uinstinct uinstinct deleted the ai-sdk-upgrade-2 branch February 26, 2026 04:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants