mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix: resolve typecheck errors in loop_test.go and dingtalk_test.go (#2122)
- loop_test.go: replace undefined WithSecurity/SecurityConfig/ModelSecurityEntry with direct APIKeys field using SimpleSecureStrings() - dingtalk_test.go: use ClientSecret.String() and ClientSecret.Set() instead of non-existent ClientSecret() and SetClientSecret() methods Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1783,20 +1783,16 @@ func TestProcessMessage_ModelRoutingUsesLightProvider(t *testing.T) {
|
||||
ModelName: "gemini-main",
|
||||
Model: "gemini/gemini-2.5-flash",
|
||||
APIBase: heavyServer.URL,
|
||||
APIKeys: config.SimpleSecureStrings("heavy-key"),
|
||||
},
|
||||
{
|
||||
ModelName: "qwen-light",
|
||||
Model: "ollama/qwen2.5:0.5b",
|
||||
APIBase: lightServer.URL,
|
||||
APIKeys: config.SimpleSecureStrings("light-key"),
|
||||
},
|
||||
},
|
||||
}
|
||||
cfg.WithSecurity(&config.SecurityConfig{
|
||||
ModelList: map[string]config.ModelSecurityEntry{
|
||||
"gemini-main": {APIKeys: []string{"heavy-key"}},
|
||||
"qwen-light": {APIKeys: []string{"light-key"}},
|
||||
},
|
||||
})
|
||||
|
||||
msgBus := bus.NewMessageBus()
|
||||
provider, _, err := providers.CreateProvider(cfg)
|
||||
|
||||
@@ -17,8 +17,8 @@ func newTestDingTalkChannel(t *testing.T, cfg config.DingTalkConfig) (*DingTalkC
|
||||
if cfg.ClientID == "" {
|
||||
cfg.ClientID = "test-client-id"
|
||||
}
|
||||
if cfg.ClientSecret() == "" {
|
||||
cfg.SetClientSecret("test-client-secret")
|
||||
if cfg.ClientSecret.String() == "" {
|
||||
cfg.ClientSecret.Set("test-client-secret")
|
||||
}
|
||||
|
||||
msgBus := bus.NewMessageBus()
|
||||
|
||||
Reference in New Issue
Block a user