Skip to content

Commit a966489

Browse files
committed
print the endpoint if different from default
1 parent b548c88 commit a966489

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

pkg/aiusechat/openai/openai-convertmessage.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ func debugPrintReq(req *OpenAIRequest, endpoint string) {
145145
if !wavebase.IsDevMode() {
146146
return
147147
}
148+
if endpoint != uctypes.DefaultAIEndpoint {
149+
log.Printf("endpoint: %s\n", endpoint)
150+
}
148151
var toolNames []string
149152
for _, tool := range req.Tools {
150153
toolNames = append(toolNames, tool.Name)

pkg/aiusechat/uctypes/usechat-types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"strings"
1010
)
1111

12+
const DefaultAIEndpoint = "https://cfapi.waveterm.dev/api/waveai"
1213
const DefaultAnthropicModel = "claude-sonnet-4-5"
1314
const DefaultOpenAIModel = "gpt-5-mini"
1415
const PremiumOpenAIModel = "gpt-5"

pkg/aiusechat/usechat.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const (
3939
)
4040

4141
const DefaultAPI = APIType_OpenAI
42-
const DefaultAIEndpoint = "https://cfapi.waveterm.dev/api/waveai"
4342
const DefaultMaxTokens = 4 * 1024
4443
const BuilderMaxTokens = 24 * 1024
4544

@@ -98,7 +97,7 @@ var SystemPromptText_OpenAI = strings.Join([]string{
9897
}, " ")
9998

10099
func getWaveAISettings(premium bool, builderMode bool, rtInfo *waveobj.ObjRTInfo) (*uctypes.AIOptsType, error) {
101-
baseUrl := DefaultAIEndpoint
100+
baseUrl := uctypes.DefaultAIEndpoint
102101
if os.Getenv("WAVETERM_WAVEAI_ENDPOINT") != "" {
103102
baseUrl = os.Getenv("WAVETERM_WAVEAI_ENDPOINT")
104103
}

0 commit comments

Comments
 (0)