{"record":{"id":"18a8385ce20a0b8e","repo":"router-for-me/CLIProxyAPI","slug":"claude-api-key-d-weight-w","errorCode":null,"errorMessage":"claude-api-key[%d].weight: %w","messagePattern":"claude-api-key\\[(.+?)\\]\\.weight: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/config/weight.go","lineNumber":126,"sourceCode":"\n// ValidateCredentialWeights validates weights for every API-key family.\nfunc (cfg *Config) ValidateCredentialWeights() error {\n\tif cfg == nil {\n\t\treturn nil\n\t}\n\tfor index := range cfg.GeminiKey {\n\t\tif errValidate := ValidateCredentialWeight(cfg.GeminiKey[index].Weight); errValidate != nil {\n\t\t\treturn fmt.Errorf(\"gemini-api-key[%d].weight: %w\", index, errValidate)\n\t\t}\n\t}\n\tfor index := range cfg.InteractionsKey {\n\t\tif errValidate := ValidateCredentialWeight(cfg.InteractionsKey[index].Weight); errValidate != nil {\n\t\t\treturn fmt.Errorf(\"interactions-api-key[%d].weight: %w\", index, errValidate)\n\t\t}\n\t}\n\tfor index := range cfg.ClaudeKey {\n\t\tif errValidate := ValidateCredentialWeight(cfg.ClaudeKey[index].Weight); errValidate != nil {\n\t\t\treturn fmt.Errorf(\"claude-api-key[%d].weight: %w\", index, errValidate)\n\t\t}\n\t}\n\tfor index := range cfg.VertexCompatAPIKey {\n\t\tif errValidate := ValidateCredentialWeight(cfg.VertexCompatAPIKey[index].Weight); errValidate != nil {\n\t\t\treturn fmt.Errorf(\"vertex-api-key[%d].weight: %w\", index, errValidate)\n\t\t}\n\t}\n\tfor index := range cfg.CodexKey {\n\t\tif errValidate := ValidateCredentialWeight(cfg.CodexKey[index].Weight); errValidate != nil {\n\t\t\treturn fmt.Errorf(\"codex-api-key[%d].weight: %w\", index, errValidate)\n\t\t}\n\t}\n\tfor index := range cfg.XAIKey {\n\t\tif errValidate := ValidateCredentialWeight(cfg.XAIKey[index].Weight); errValidate != nil {\n\t\t\treturn fmt.Errorf(\"xai-api-key[%d].weight: %w\", index, errValidate)\n\t\t}\n\t}\n\tfor providerIndex := range cfg.OpenAICompatibility {","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/config/weight.go#L108-L144","documentation":"Error \"claude-api-key[%d].weight: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/config/weight.go:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the weight of the reported claude-api-key entry to a valid integer within bounds.","Check the wrapped error for the exact validation failure."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}