feat: add models for gitee.ai
Checklist:
[!IMPORTANT]
Please review the checklist below before submitting your pull request.
- [X] Please open an issue before creating a PR or link to an existing issue
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I ran
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods
Description
This pull request introduces support for Gitee AI as a new model provider.
Close https://github.com/langgenius/dify/issues/9243
Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update, included: Dify Document
- [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
- [ ] Dependency upgrade
Testing Instructions
The changes were tested using manually filled credentials.
validate_credentials has been implemented and self-tested.
validate_credentials has been implemented and self-tested.
I mean you need to add tests here like this one https://github.com/langgenius/dify/blob/7c0b159a81f099c5089c96ba77b32d592e5787b8/api/tests/integration_tests/model_runtime/openai/test_llm.py
Added tests,because they use the real Gitee AI service, which requires a correctly filled access_token to run successfully. Therefore, the test command was not added to pytest_model_runtime.sh @crazywoola
@crazywoola you can sign up Gitee AI, and use the free token(100 requests limit per day) to run the tests: https://ai.gitee.com/dashboard/settings/tokens