fix(provider): rename test for clarity and update model version in test case

This commit is contained in:
tong3jie 2026-03-23 16:46:37 +08:00
parent 8911b44a27
commit 8c9f6c5a6c

View file

@ -18,7 +18,7 @@ import (
"github.com/sipeed/picoclaw/pkg/providers/protocoltypes" "github.com/sipeed/picoclaw/pkg/providers/protocoltypes"
) )
func TestProviderChat_MaxTokensFieldNull(t *testing.T) { func TestProviderChat_EmptyMaxTokensFieldUsesDefault(t *testing.T) {
var requestBody map[string]any var requestBody map[string]any
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@ -48,7 +48,7 @@ func TestProviderChat_MaxTokensFieldNull(t *testing.T) {
t.Context(), t.Context(),
[]Message{{Role: "user", Content: "hi"}}, []Message{{Role: "user", Content: "hi"}},
nil, nil,
"glm-4.7", "gemini-3.0",
map[string]any{"max_tokens": 1234}, map[string]any{"max_tokens": 1234},
) )
if err != nil { if err != nil {