Skip to content

Commit 96345fa

Browse files
fix[modules-config](socai): send model on test request to avoid wrong model false positive
1 parent 4d26712 commit 96345fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/modules-config/validations/socai/providers/AbstractProvider.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package providers
22

33
import (
4+
"encoding/json"
45
"fmt"
56
"maps"
67

@@ -48,6 +49,10 @@ func (p *AbstractProvider) PerformTestRequest() (int, error) {
4849
maps.Copy(headers, p.CustomHeaders)
4950
}
5051

51-
_, status, err := utils.DoReq[map[string]any](p.URL, nil, "POST", headers, false)
52+
body,_ := json.Marshal(map[string]any{
53+
"model": p.Model,
54+
})
55+
56+
_, status, err := utils.DoReq[map[string]any](p.URL,body , "POST", headers, false)
5257
return status, err
5358
}

0 commit comments

Comments
 (0)