MCPcopy Index your code
hub / github.com/coder/coder / validateChatProviderAPIKeySize

Function validateChatProviderAPIKeySize

coderd/exp_chats.go:7517–7522  ·  view source on GitHub ↗

10 KB

(apiKey string)

Source from the content-addressed store, hash-verified

7515const maxChatProviderAPIKeySize = 10240 // 10 KB
7516
7517func validateChatProviderAPIKeySize(apiKey string) error {
7518 if len(apiKey) > maxChatProviderAPIKeySize {
7519 return xerrors.Errorf("API key exceeds maximum size of 10 KB (%d bytes)", maxChatProviderAPIKeySize)
7520 }
7521 return nil
7522}
7523
7524var (
7525 errChatModelConfigNotFound = xerrors.New("chat model config not found")

Callers 1

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected