• Will Chen's avatar
    Upgrade to AI SDK v6 (#2102) · 54b7a22d
    Will Chen 提交于
    <!-- CURSOR_SUMMARY -->
    > [!NOTE]
    > Modernizes AI integration across the app.
    > 
    > - Upgrade `ai` to v6 and all `@ai-sdk/*` providers to v3/v4; add
    `@ai-sdk/mcp`, remove `@openrouter/ai-sdk-provider`
    > - Migrate from `LanguageModelV2` to `LanguageModel`/`LanguageModelV3`;
    refactor fallback model to v3 streaming API
    > - Switch OpenRouter to `createOpenAICompatible`
    (`https://openrouter.ai/api/v1`)
    > - Replace experimental MCP with `@ai-sdk/mcp` (`createMCPClient`);
    update tool execution to `ToolExecutionOptions` and sanitize tool keys
    > - Update AI message envelope to `ai@v6` and types
    (`AiMessagesJsonV6`); adjust DB schema and parsing utilities
    > - Update chat/local-agent handlers to v6 stream parts (reasoning/tool
    parts), persist `aiMessagesJson`, and wire MCP tools into `ToolSet`
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    fc966595cbd9c6ff7d261497f00bfe79d0fff9e3. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Upgrade the app to AI SDK v6 to modernize model integrations, MCP
    tooling, and streaming. This improves stability, unifies types on v3,
    and removes the OpenRouter provider in favor of an OpenAI-compatible
    setup.
    
    - **Dependencies**
      - Upgraded ai to 6.0.14 and all @ai-sdk providers to v3/v4.
      - Added @ai-sdk/mcp; removed @openrouter/ai-sdk-provider.
      - Pinned @ai-sdk/provider to 3.0.2.
    - Updated transitive deps (e.g., google-auth-library, gaxios) for Node
    >=18.
    
    - **Refactors**
    - Moved from LanguageModelV2 to v3 and standardized on ai’s
    LanguageModel.
      - Rebuilt fallback model to v3 spec with safer stream retries.
    - Switched MCP client to createMCPClient and updated tool execution to
    ToolExecutionOptions.
    - Replaced OpenRouter integration with createOpenAICompatible (baseURL
    https://openrouter.ai/api/v1).
    - Updated AI messages envelope to "ai@v6"; older "ai@v5" envelopes are
    ignored.
    
    <sup>Written for commit fc966595cbd9c6ff7d261497f00bfe79d0fff9e3.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    54b7a22d
名称
最后提交
最后更新
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...