From 54a6978534ced00f11e5ced64205ddee32af8320 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Fri, 6 Feb 2026 14:23:24 -0300 Subject: [PATCH] fix: make it possible to add api key for minimax It has not good endpoint to validate the API key, so for now we're skipping it. --- internal/config/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/config/config.go b/internal/config/config.go index fcca3d0b3aded2b35d1ed069d3ed379faf4b59c3..07608f4ff59abda3347b032673b9bb2c3705c2e5 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -780,6 +780,16 @@ func (c *ProviderConfig) TestConnection(resolver VariableResolver) error { apiKey, _ = resolver.ResolveValue(c.APIKey) ) + switch providerID { + case catwalk.InferenceProviderMiniMax: + // NOTE: MiniMax has no good endpoint we can use to validate the API key. + // Let's at least check the pattern. + if !strings.HasPrefix(apiKey, "sk-") { + return fmt.Errorf("invalid API key format for provider %s", c.ID) + } + return nil + } + switch c.Type { case catwalk.TypeOpenAI, catwalk.TypeOpenAICompat, catwalk.TypeOpenRouter: baseURL, _ := resolver.ResolveValue(c.BaseURL)