diff --git a/pkg/agent/loop_test.go b/pkg/agent/loop_test.go index 4fd916d33..25d20c689 100644 --- a/pkg/agent/loop_test.go +++ b/pkg/agent/loop_test.go @@ -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) diff --git a/pkg/channels/dingtalk/dingtalk_test.go b/pkg/channels/dingtalk/dingtalk_test.go index 3b517aef4..437616456 100644 --- a/pkg/channels/dingtalk/dingtalk_test.go +++ b/pkg/channels/dingtalk/dingtalk_test.go @@ -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()