Skip to content

refactor: remove openai-php/client dependency and dead AI service classes#320

Closed
yushine wants to merge 2 commits into
masterfrom
refactor/remove-openai-php-client
Closed

refactor: remove openai-php/client dependency and dead AI service classes#320
yushine wants to merge 2 commits into
masterfrom
refactor/remove-openai-php-client

Conversation

@yushine

@yushine yushine commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 移除 openai-php/client 依赖,项目已全面使用 laravel/ai SDK
  • 删除不再使用的旧 AI 服务类:OpenAIService.phpGlmService.phpMinimaxService.php
  • 更新 AIServiceManager::getAvailableModels() 引用,统一指向 LaravelAIService

背景

所有 AI 调用已通过 Laravel AI SDK (LaravelAIService) 处理,GLM/Minimax 也已在 AppServiceProvider 中通过 \Laravel\Ai\Ai::extend() 注册。旧的三个 Service 类不再被实例化,仅 getAvailableModels() 中有静态引用。

改动文件

  • 删除 innopacks/common/src/Services/AI/OpenAIService.php
  • 删除 innopacks/common/src/Services/AI/GlmService.php
  • 删除 innopacks/common/src/Services/AI/MinimaxService.php
  • 修改 innopacks/common/src/Services/AI/AIServiceManager.php
  • 修改 composer.json (移除 openai-php/client)

Test plan

  • 确认后台 AI 设置页面正常加载
  • 测试各 AI 模型(OpenAI/DeepSeek/GLM/Minimax 等)生成内容功能
  • 运行 composer install 确认无依赖冲突

🤖 Generated with Claude Code

@yushine yushine closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant