Skip to content

Commit 60fce5a

Browse files
author
echoVic
committed
feat: 重构聊天服务以支持无状态设计和AI SDK集成
- 添加对AI SDK(@ai-sdk/*)的依赖支持 - 重构Agent和SubagentExecutor以支持无状态设计,systemPrompt通过ChatContext动态传入 - 移除旧版OpenAI/Anthropic/Gemini/Azure服务实现,统一使用VercelAIChatService - 在ModelConfig中添加providerId字段以支持多提供商配置 - 添加自定义OpenAI兼容提供商支持 - 优化系统提示构建逻辑,支持按需构建和缓存控制 - 更新相关类型定义和测试用例 - 调整package.json依赖项以支持新功能
1 parent af8f7c2 commit 60fce5a

21 files changed

Lines changed: 805 additions & 3358 deletions

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,19 @@
107107
},
108108
"dependencies": {
109109
"@agentclientprotocol/sdk": "^0.12.0",
110+
"@ai-sdk/anthropic": "^3.0.7",
111+
"@ai-sdk/azure": "^3.0.5",
112+
"@ai-sdk/deepseek": "^2.0.4",
113+
"@ai-sdk/google": "^3.0.4",
114+
"@ai-sdk/openai": "^3.0.5",
115+
"@ai-sdk/openai-compatible": "^2.0.4",
110116
"@anthropic-ai/sdk": "^0.71.2",
111117
"@azure/identity": "^4.13.0",
112118
"@google/genai": "^1.34.0",
113119
"@inkjs/ui": "^2.0.0",
114120
"@modelcontextprotocol/sdk": "^1.17.4",
115121
"ahooks": "^3.9.5",
122+
"ai": "^6.0.39",
116123
"ansi-escapes": "^7.2.0",
117124
"async-mutex": "^0.5.0",
118125
"axios": "^1.12.2",

pnpm-lock.yaml

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)