-
Notifications
You must be signed in to change notification settings - Fork 664
feat: upgrade to ai sdk 5 #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
The-Best-Codes
wants to merge
27
commits into
lingodotdev:main
Choose a base branch
from
The-Best-Codes:best/aisdk-provider-upgrades
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
fa47c77
chore: upgrade to ai sdk 5 to resolve security vulns
The-Best-Codes 9ed9658
chore: changeset
The-Best-Codes 61a405c
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 8258291
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes dbcc6d7
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 9076098
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes c7641ff
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 1328537
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 26ae8f2
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 69dd05d
feat: upgrade to zod 4
The-Best-Codes 4bc1c3d
chore: remove zod-to-json-schema from the codebase
The-Best-Codes 1a35674
fix: use "Z" not "z"
The-Best-Codes afb46d3
fix: use error.issues
The-Best-Codes f30815a
fix: perform more zod 4 migrations
The-Best-Codes 780ccc5
fix: resolve type errors in mcp.ts (used any, might manually verify
The-Best-Codes b637930
fix: remove defaults from optional fields in zod 4 (fixes failing tests)
The-Best-Codes 7e504b5
chore: fmt
The-Best-Codes 08bd9b7
Merge branch 'main' into best/aisdk-provider-upgrades
maxprilutskiy 0317dde
Merge branch 'main' into best/aisdk-provider-upgrades
maxprilutskiy 583331b
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes d99721f
chore: remove unused zod-to-json-schema dep
The-Best-Codes ddc7a8b
fix: use prefault
The-Best-Codes 785b526
fix: revert
The-Best-Codes f3257cb
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 4fde09a
fix: upgrade new deps
The-Best-Codes ac8d6ac
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes 166e6e1
Merge branch 'main' into best/aisdk-provider-upgrades
The-Best-Codes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@lingo.dev/_compiler": minor | ||
| "lingo.dev": minor | ||
| --- | ||
|
|
||
| Upgrade Compiler and CLI to AI SDK v5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,8 +48,8 @@ export default new Command() | |
| "translate", | ||
| "Detect language and translate text with Lingo.dev.", | ||
| { | ||
| text: Z.string(), | ||
| targetLocale: Z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/), | ||
| text: Z.string() as any, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to manually test the MCP server |
||
| targetLocale: Z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/) as any, | ||
The-Best-Codes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| async ({ text, targetLocale }) => { | ||
| const sourceLocale = await replexicaEngine.recognizeLocale(text); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,30 +45,32 @@ | |
| "vitest": "^2.1.4" | ||
| }, | ||
| "dependencies": { | ||
| "@ai-sdk/anthropic": "^1.0.11", | ||
| "@ai-sdk/google": "^1.2.19", | ||
| "@ai-sdk/groq": "^1.2.3", | ||
| "@ai-sdk/mistral": "^1.2.8", | ||
| "@ai-sdk/openai": "^1.3.22", | ||
| "@ai-sdk/anthropic": "^2.0.45", | ||
| "@ai-sdk/google": "^2.0.29", | ||
| "@ai-sdk/groq": "^2.0.28", | ||
| "@ai-sdk/mistral": "^2.0.23", | ||
| "@ai-sdk/openai": "^2.0.68", | ||
| "@babel/generator": "^7.26.5", | ||
| "@babel/parser": "^7.26.7", | ||
| "@babel/traverse": "^7.27.4", | ||
| "@babel/types": "^7.26.7", | ||
| "@lingo.dev/_sdk": "workspace:*", | ||
| "@lingo.dev/_spec": "workspace:*", | ||
| "@openrouter/ai-sdk-provider": "^0.7.1", | ||
| "ai": "^4.2.10", | ||
| "@openrouter/ai-sdk-provider": "^1.2.1", | ||
| "@prettier/sync": "^0.6.1", | ||
| "ai": "^5.0.89", | ||
| "dedent": "^1.6.0", | ||
| "dotenv": "^16.4.5", | ||
| "fast-xml-parser": "^5.0.8", | ||
| "ini": "^5.0.0", | ||
| "lodash": "^4.17.21", | ||
| "node-machine-id": "^1.1.12", | ||
| "object-hash": "^3.0.0", | ||
| "ollama-ai-provider": "^1.2.0", | ||
| "unplugin": "^2.1.2", | ||
| "zod": "^3.25.76", | ||
| "ollama-ai-provider-v2": "^1.5.3", | ||
| "posthog-node": "^5.5.1", | ||
| "node-machine-id": "^1.1.12" | ||
| "prettier": "^3.4.2", | ||
| "unplugin": "^2.1.2", | ||
| "zod": "^4.1.12" | ||
| }, | ||
| "packageManager": "[email protected]" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.