@@ -44,12 +44,12 @@ func testOpenAICompatThinking(t *testing.T, result *ai.AgentResult) {
4444 }
4545 }
4646 }
47- require .Greater (t , reasoningContentCount , 0 )
47+ require .Greater (t , reasoningContentCount , 0 , "expected reasoning content, got none" )
4848}
4949
5050func builderXAIGrokCodeFast (r * recorder.Recorder ) (ai.LanguageModel , error ) {
5151 provider := openaicompat .New (
52- "https://api.x.ai/v1" ,
52+ openaicompat . WithBaseURL ( "https://api.x.ai/v1" ) ,
5353 openaicompat .WithAPIKey (os .Getenv ("FANTASY_XAI_API_KEY" )),
5454 openaicompat .WithHTTPClient (& http.Client {Transport : r }),
5555 )
@@ -58,7 +58,7 @@ func builderXAIGrokCodeFast(r *recorder.Recorder) (ai.LanguageModel, error) {
5858
5959func builderXAIGrok4Fast (r * recorder.Recorder ) (ai.LanguageModel , error ) {
6060 provider := openaicompat .New (
61- "https://api.x.ai/v1" ,
61+ openaicompat . WithBaseURL ( "https://api.x.ai/v1" ) ,
6262 openaicompat .WithAPIKey (os .Getenv ("FANTASY_XAI_API_KEY" )),
6363 openaicompat .WithHTTPClient (& http.Client {Transport : r }),
6464 )
@@ -67,7 +67,7 @@ func builderXAIGrok4Fast(r *recorder.Recorder) (ai.LanguageModel, error) {
6767
6868func builderXAIGrok3Mini (r * recorder.Recorder ) (ai.LanguageModel , error ) {
6969 provider := openaicompat .New (
70- "https://api.x.ai/v1" ,
70+ openaicompat . WithBaseURL ( "https://api.x.ai/v1" ) ,
7171 openaicompat .WithAPIKey (os .Getenv ("FANTASY_XAI_API_KEY" )),
7272 openaicompat .WithHTTPClient (& http.Client {Transport : r }),
7373 )
@@ -76,7 +76,7 @@ func builderXAIGrok3Mini(r *recorder.Recorder) (ai.LanguageModel, error) {
7676
7777func builderZAIGLM45 (r * recorder.Recorder ) (ai.LanguageModel , error ) {
7878 provider := openaicompat .New (
79- "https://api.z.ai/api/coding/paas/v4" ,
79+ openaicompat . WithBaseURL ( "https://api.z.ai/api/coding/paas/v4" ) ,
8080 openaicompat .WithAPIKey (os .Getenv ("FANTASY_ZAI_API_KEY" )),
8181 openaicompat .WithHTTPClient (& http.Client {Transport : r }),
8282 )
@@ -85,7 +85,7 @@ func builderZAIGLM45(r *recorder.Recorder) (ai.LanguageModel, error) {
8585
8686func builderGroq (r * recorder.Recorder ) (ai.LanguageModel , error ) {
8787 provider := openaicompat .New (
88- "https://api.groq.com/openai/v1" ,
88+ openaicompat . WithBaseURL ( "https://api.groq.com/openai/v1" ) ,
8989 openaicompat .WithAPIKey (os .Getenv ("FANTASY_GROQ_API_KEY" )),
9090 openaicompat .WithHTTPClient (& http.Client {Transport : r }),
9191 )
0 commit comments