on main help sign in
fix(vercel): fix validation of api keys for vercel (#2415)
efb52dbAndrey Nering
internal/config/config.go+6
@@ -593,6 +593,12 @@ func (c *ProviderConfig) TestConnection(resolver VariableResolver) error {
593 return nil
593 return nil
594 }
594 }
595 return errors.New("not a valid bedrock api key")
595 return errors.New("not a valid bedrock api key")
596+ case catwalk.TypeVercel:
597+ // NOTE: Vercel does not validate API keys on the `/models` endpoint.
598+ if strings.HasPrefix(apiKey, "vck_") { // Vercel API keys
599+ return nil
600+ }
601+ return errors.New("not a valid vercel api key")
596 }
602 }
597
603
598 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
604 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)