Skip to content

feat: integrate ai-sdk provider#10467

Draft
uinstinct wants to merge 6 commits intocontinuedev:mainfrom
uinstinct:cli-ai-sdk
Draft

feat: integrate ai-sdk provider#10467
uinstinct wants to merge 6 commits intocontinuedev:mainfrom
uinstinct:cli-ai-sdk

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Feb 12, 2026

Description

Adds a separate ai-sdk provider into openai-adapters for usage in the cli.

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

Add a new ai-sdk provider so the CLI can use Vercel AI SDK models (OpenAI and Anthropic) for chat and embeddings. Also convert assistant tool_calls to the AI SDK format to enable tool use.

  • New Features

    • Added AiSdkApi with chat completions (streaming and non-streaming) and embeddings via @ai-sdk/openai and @ai-sdk/anthropic.
    • Accepts model as "provider/model" (e.g., "openai/gpt-4o"); CLI now forwards the model field.
    • Converts assistant tool_calls to Vercel AI SDK messages; supports tools, tool_choice, and streaming back to OpenAI-style chunks.
    • Wired into constructLlmApi and types (AiSdkConfig); legacy completions, FIM, and rerank are not supported.
  • Migration

    • In CLI config, set provider: "ai-sdk" and model: "/" (e.g., "openai/gpt-4o" or "anthropic/claude-3.5-sonnet").
    • Provide the usual apiKey/apiBase and any requestOptions as needed.

Written for commit 1689ac2. Summary will update on new commits.

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant