Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportChanges will decrease total bundle size by 792.93kB (-3.1%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: marimo-esmAssets Changed:
Files in
|
There was a problem hiding this comment.
Pull request overview
Upgrades the frontend Vercel AI SDK dependencies to v6 (and @ai-sdk/react v3) and adjusts code to compile and handle newly introduced stream chunk types, aligning marimo’s chat/AI tooling with the new SDK event schema.
Changes:
- Bumped frontend dependencies
aito^6.0.129and@ai-sdk/reactto^3.0.131(plus lockfile updates). - Updated backend constant to emit Vercel AI SDK v6-compatible stream chunks (
AI_SDK_VERSION = 6). - Updated frontend types/logging to accommodate new stream chunk types and updated SDK type exports.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pnpm-lock.yaml |
Lockfile updates reflecting the AI SDK major version upgrade and transitive dependency changes. |
marimo/_plugins/ui/_impl/chat/chat.py |
Switches backend stream encoding to AI SDK schema version 6. |
frontend/src/core/ai/staged-cells.ts |
Handles additional AI SDK v6 stream chunk types in the staged-cells stream switch. |
frontend/src/components/chat/chat-utils.ts |
Updates SDK type usage for tool output plumbing (ChatAddToolOutputFunction). |
frontend/package.json |
Upgrades ai and @ai-sdk/react dependency versions. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
frontend/src/components/chat/chat-utils.ts:131
toolCall.inputis typed asRecord<string, never>, but frontend tools (e.g.edit_notebook_tool) have non-empty argument schemas. This type forces unsafe casts at call sites and can hide real mismatches. Consider changing the type tounknown(and validating/narrowing before sending) orRecord<string, unknown>so tool args are accurately represented.
invokeAiTool: (request: InvokeAiToolRequest) => Promise<InvokeAiToolResponse>;
addToolOutput: ChatAddToolOutputFunction<UIMessage>;
toolCall: {
toolName: string;
toolCallId: string;
input: Record<string, never>;
};
| "dependencies": { | ||
| "@ai-sdk/react": "^2.0.125", | ||
| "@ai-sdk/react": "^3.0.131", | ||
| "@anywidget/types": "^0.2.0", |
There was a problem hiding this comment.
PR checklist/description states that tests were added, but this PR only shows dependency/version updates and type fixes (no test file changes). If no tests were actually added, please update the checklist/description; otherwise, point to the new/updated tests.
| "ruff>=0.14.0,<0.15.2", # TODO: remove upper bound once we fix the ruff issues | ||
| # For AI | ||
| "pydantic-ai-slim[openai]>=1.52.0", | ||
| "pydantic-ai-slim[openai]>=1.71.0", |
There was a problem hiding this comment.
is this required? does this mean if a user has an old pydantic-ai-slim that the frontend could break?
There was a problem hiding this comment.
I've only upgraded the test deps in this change.
But I think we should recommend upgrading pydantic-ai-slim with maybe 1.64.0, I can test it. 1.52.0
There was a problem hiding this comment.
It does break with the older example notebook in this repo
There was a problem hiding this comment.
so should we hold off on this if it could break old notebooks?
marimo/_server/ai/providers.py
Outdated
| ) | ||
|
|
||
| DependencyManager.pydantic_ai.require_at_version( | ||
| "for Vercel AI SDK support", min_version="1.52.0" |
There was a problem hiding this comment.
something to call out in changelog
📝 Summary
We aren't using any of the newer features, so it's pretty straightforward
Upgraded recommended dep to 1.52.0 as that is when v6 support was properly implemented in pydantic-ai. Not doing so would break the validation
🔍 Description of Changes
📋 Checklist