10 KB
(apiKey string)
| 7515 | const maxChatProviderAPIKeySize = 10240 // 10 KB |
| 7516 | |
| 7517 | func 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 | |
| 7524 | var ( |
| 7525 | errChatModelConfigNotFound = xerrors.New("chat model config not found") |
no test coverage detected