on main help sign in
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.

commit54a6978534ced00f11e5ced64205ddee32af8320 authorAndrey Nering <andreynering@users.noreply.github.com> dateFri 6 Feb 2026, 14:23 (8 months ago) parent59887a3
1 file changed+10
internal/config/config.go+10
internal/config/config.go+10
@@ -780,6 +780,16 @@ func (c *ProviderConfig) TestConnection(resolver VariableResolver) error {
780780 apiKey, _ = resolver.ResolveValue(c.APIKey)
781781 )
782782
783+ switch providerID {
784+ case catwalk.InferenceProviderMiniMax:
785+ // NOTE: MiniMax has no good endpoint we can use to validate the API key.
786+ // Let's at least check the pattern.
787+ if !strings.HasPrefix(apiKey, "sk-") {
788+ return fmt.Errorf("invalid API key format for provider %s", c.ID)
789+ }
790+ return nil
791+ }
792+
783793 switch c.Type {
784794 case catwalk.TypeOpenAI, catwalk.TypeOpenAICompat, catwalk.TypeOpenRouter:
785795 baseURL, _ := resolver.ResolveValue(c.BaseURL)