feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+13 -5
View File
@@ -19,18 +19,26 @@ func FetchCodexChannelModels(channel *model.Channel) ([]string, error) {
return nil, fmt.Errorf("codex channel does not support multi-key model discovery")
}
client, err := NewProxyHttpClient(channel.GetSetting().Proxy)
if err != nil {
return nil, err
}
setting := channel.GetSetting()
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
clientVersion, err := GetLatestCodexClientVersion(ctx, client)
// The GitHub release lookup is not an upstream request; it always verifies
// certificates, whatever the channel's TLS setting says.
releaseClient, err := GetHttpClientWithProxy(setting.Proxy)
if err != nil {
return nil, err
}
clientVersion, err := GetLatestCodexClientVersion(ctx, releaseClient)
if err != nil {
return nil, fmt.Errorf("failed to get Codex client version: %w", err)
}
client, err := GetHttpClientWithProxySettings(setting.Proxy, setting)
if err != nil {
return nil, err
}
baseURL := channel.GetBaseURL()
if baseURL == "" {
baseURL = constant.GetChannelBaseURL(constant.ChannelTypeCodex)