mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix: add kimi-code migration alias and User-Agent test
- Add "kimi-code" to the moonshot provider's providerNames in ConvertProvidersToModelList so configs using agents.defaults.provider: "kimi-code" migrate correctly. - Add TestProviderChat_KimiCodeUserAgent verifying that User-Agent: KimiCLI/0.77 is set when apiBase hostname is api.kimi.com and not set for other hosts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -208,7 +208,7 @@ func ConvertProvidersToModelList(cfg *Config) []ModelConfig {
|
||||
},
|
||||
},
|
||||
{
|
||||
providerNames: []string{"moonshot", "kimi"},
|
||||
providerNames: []string{"moonshot", "kimi", "kimi-code"},
|
||||
protocol: "moonshot",
|
||||
buildConfig: func(p ProvidersConfig) (ModelConfig, bool) {
|
||||
if p.Moonshot.APIKey == "" && p.Moonshot.APIBase == "" {
|
||||
|
||||
Reference in New Issue
Block a user