mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-20 23:57:11 -04:00
[PR #189] [MERGED] test: add unit tests for DeepSeek, GLM, Kimi, and Qwen providers #222
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/189
Author: @mason5052
Created: 3/10/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @asdek
Base:
feature/next_release← Head:test/cn-provider-config-tests📝 Commits (1)
afef83ftest: add unit tests for DeepSeek, GLM, Kimi, and Qwen providers📊 Changes
4 files changed (+808 additions, -0 deletions)
View changed files
➕
backend/pkg/providers/deepseek/deepseek_test.go(+202 -0)➕
backend/pkg/providers/glm/glm_test.go(+202 -0)➕
backend/pkg/providers/kimi/kimi_test.go(+202 -0)➕
backend/pkg/providers/qwen/qwen_test.go(+202 -0)📄 Description
Description of the Change
Problem
The four Chinese LLM providers (DeepSeek, GLM/Zhipu AI, Kimi/Moonshot AI, Qwen/Tongyi Qianwen) expanded in PR #185 had zero test coverage. Other providers like Anthropic, Bedrock, Gemini, and OpenAI all have comprehensive test suites.
Solution
Add unit tests for all four providers following the established test patterns (consistent with
anthropic_test.go,openai_test.go, etc.):prefix/model-name)GLM tests use
< 0(non-negative) price assertions instead of<= 0(positive) to accommodate free-tier models (glm-4.7-flash,glm-4.5-flash) with zero pricing.Type of Change
Areas Affected
Testing and Verification
Test Configuration
Test Results
All 28 tests pass (7 per provider x 4 providers):
Checklist
go fmtandgo vet🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.