MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / isModelSupportErrorMessage

Function isModelSupportErrorMessage

sdk/cliproxy/auth/conductor.go:3934–3957  ·  view source on GitHub ↗
(message string)

Source from the content-addressed store, hash-verified

3932}
3933
3934func isModelSupportErrorMessage(message string) bool {
3935 lower := strings.ToLower(strings.TrimSpace(message))
3936 if lower == "" {
3937 return false
3938 }
3939 patterns := [...]string{
3940 "model_not_supported",
3941 "requested model is not supported",
3942 "requested model is unsupported",
3943 "requested model is unavailable",
3944 "model is not supported",
3945 "model not supported",
3946 "unsupported model",
3947 "model unavailable",
3948 "not available for your plan",
3949 "not available for your account",
3950 }
3951 for _, pattern := range patterns {
3952 if strings.Contains(lower, pattern) {
3953 return true
3954 }
3955 }
3956 return false
3957}
3958
3959func isModelSupportError(err error) bool {
3960 if err == nil {

Callers 2

isModelSupportErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected