{"record":{"id":"f31ad9a1a7a042f2","repo":"affaan-m/ECC","slug":"host-provider-must-be-anthropic-openai-or-unkn","errorCode":null,"errorMessage":"--host-provider must be anthropic, openai, or unknown","messagePattern":"--host-provider must be anthropic, openai, or unknown","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skills/council-multi-model/scripts/review-with-codex.js","lineNumber":83,"sourceCode":"      const seconds = Number(argv[index + 1]);\n      if (!Number.isInteger(seconds) || seconds < 10 || seconds > 120) {\n        throw new Error('--timeout-seconds must be an integer from 10 to 120');\n      }\n      options.timeoutMs = seconds * 1000;\n      index += 1;\n    } else if (arg === '--help' || arg === '-h') {\n      options.help = true;\n    } else {\n      throw new Error(`unknown argument: ${arg}`);\n    }\n  }\n\n  if (options.help) return options;\n  if (!options.consent) {\n    throw new Error('explicit --consent-to-openai is required');\n  }\n  if (!HOST_PROVIDERS.has(options.hostProvider)) {\n    throw new Error('--host-provider must be anthropic, openai, or unknown');\n  }\n  return options;\n}\n\nfunction providerLabel(hostProvider) {\n  if (hostProvider === 'anthropic') return 'cross-provider external critique';\n  if (hostProvider === 'openai') return 'same-provider external critique';\n  return 'provider relationship unverified';\n}\n\nfunction buildCodexArgs(tempDir, outputFile) {\n  return [\n    '--ask-for-approval', 'never',\n    ...REQUIRED_TOOLLESS_FEATURES.flatMap((feature) => ['--disable', feature]),\n    'exec',\n    '--ephemeral',\n    '--ignore-user-config',\n    '--ignore-rules',","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/council-multi-model/scripts/review-with-codex.js#L65-L101","documentation":"After the consent check, parseArgs validates --host-provider against the HOST_PROVIDERS set (anthropic, openai, unknown). It throws this error when the supplied value is not one of those three strings, since providerLabel and the probe logic branch on those exact values.","triggerScenarios":"Passing `--host-provider claude`, `--host-provider gpt`, an empty string (`--host-provider \"\"`), or omitting the value so the next token (or undefined) is taken as the provider and fails the set check.","commonSituations":"User guesses a provider name instead of using the three supported values; a wrapper interpolates an unset variable producing an empty string; a typo like `anthropic-ai`.","solutions":["Use exactly one of: --host-provider anthropic, --host-provider openai, or --host-provider unknown.","Fix typos so the value matches the allowlist case-sensitively (all lowercase).","If you don't know the host provider, pass `unknown` rather than a guessed name.","Ensure the flag is followed by its value so it doesn't consume the next argument."],"exampleFix":"// before\nnode review-with-codex.js --host-provider claude --consent-to-openai\n// Error: --host-provider must be anthropic, openai, or unknown\n\n// after\nnode review-with-codex.js --host-provider anthropic --consent-to-openai","handlingStrategy":"validation","validationCode":"const PROVIDERS = new Set(['anthropic','openai','unknown']);\nif (!PROVIDERS.has(provider)) {\n  throw new Error(`provider must be anthropic|openai|unknown, got: ${provider}`);\n}","typeGuard":"const isHostProvider = (v) => v === 'anthropic' || v === 'openai' || v === 'unknown';","tryCatchPattern":"try {\n  run(['--host-provider', provider]);\n} catch (e) {\n  if (String(e.message).includes('--host-provider must be')) {\n    console.error('Use exactly: anthropic, openai, or unknown.');\n  }\n}","preventionTips":["Default to 'unknown' when the host provider is not confidently known.","Validate interpolated env vars are non-empty before passing as the provider.","Use lowercase exact strings; matching is case-sensitive set membership."],"tags":["cli","validation","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}