Migrate from Google Gemini SDK to Vercel AI SDK#2
Open
code-xpertai[bot] wants to merge 1 commit intomainfrom
Open
Migrate from Google Gemini SDK to Vercel AI SDK#2code-xpertai[bot] wants to merge 1 commit intomainfrom
code-xpertai[bot] wants to merge 1 commit intomainfrom
Conversation
- Replace google-genai with vercel-ai-sdk for provider-agnostic support - Support multiple LLM providers via AI Gateway (Anthropic, OpenAI, Google) - Simplify codebase by removing PDF processing, browser-use, arXiv tools - Keep core functionality: file ops, bash commands, Docker sandbox - Update pyproject.toml with minimal dependencies - Update README with new configuration instructions
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
概述
将项目从 Google Gemini SDK 迁移到 Vercel AI SDK,实现多模型支持。
变更摘要
核心更改
google-genai→vercel-ai-sdkconfig.yaml格式 (provider/model)文件变更
src/main.py@ai.tool、ai.run()、ai.stream_loop()src/tools.pysrc/config.yamlpyproject.tomlREADME.md删除的功能
保留的核心工具
read_file- 读取文件list_files- 列出目录edit_file- 编辑文件execute_bash_command- 执行白名单命令run_in_sandbox- Docker 沙箱执行get_current_date_and_time- 获取时间web_search- 网页搜索 (占位)open_url- 获取 URL 内容使用方式
配置示例
代码统计
注意事项
vercel-ai-sdk目前为实验性 SDKAI_GATEWAY_API_KEY或提供商 API Key