{"record":{"id":"7d3930514cdfd024","repo":"nexu-io/open-design","slug":"parallel-api-key-is-required-when-web-backend-par","errorCode":null,"errorMessage":"PARALLEL_API_KEY is required when web_backend='parallel'","messagePattern":"PARALLEL_API_KEY is required when web_backend='parallel'","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"design-templates/last30days/scripts/lib/grounding.py","lineNumber":226,"sourceCode":"    if backend == \"brave\":\n        key = config.get(\"BRAVE_API_KEY\")\n        if not key:\n            raise RuntimeError(\"BRAVE_API_KEY is required when web_backend='brave'\")\n        return brave_search(query, date_range, key)\n    if backend == \"exa\":\n        key = config.get(\"EXA_API_KEY\")\n        if not key:\n            raise RuntimeError(\"EXA_API_KEY is required when web_backend='exa'\")\n        return exa_search(query, date_range, key)\n    if backend == \"serper\":\n        key = config.get(\"SERPER_API_KEY\")\n        if not key:\n            raise RuntimeError(\"SERPER_API_KEY is required when web_backend='serper'\")\n        return serper_search(query, date_range, key)\n    if backend == \"parallel\":\n        key = config.get(\"PARALLEL_API_KEY\")\n        if not key:\n            raise RuntimeError(\"PARALLEL_API_KEY is required when web_backend='parallel'\")\n        return parallel_search(query, date_range, key)\n    if backend != \"none\":\n        raise ValueError(f\"Unsupported web backend: {backend!r}\")\n    return [], {}\n\n\n# ---------------------------------------------------------------------------\n# Helpers\n# ---------------------------------------------------------------------------\n\ndef _normalize_date(value: object) -> str | None:\n    if value is None:\n        return None\n    parsed = dates.parse_date(str(value).strip())\n    if not parsed:\n        return None\n    return parsed.date().isoformat()\n","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/design-templates/last30days/scripts/lib/grounding.py#L208-L244","documentation":"Same dispatcher guard for the 'parallel' branch: backend is 'parallel' but config.get('PARALLEL_API_KEY') is empty/missing. RuntimeError(\"PARALLEL_API_KEY is required when web_backend='parallel'\"). The parallel backend uses Parallel AI's web search; without the key the call cannot proceed.","triggerScenarios":"`--web-backend parallel` with PARALLEL_API_KEY unset/empty.","commonSituations":"Forcing parallel without the key; secret absent in CI; env var misnamed.","solutions":["Export PARALLEL_API_KEY.","Use `--web-backend auto`, another backend you have a key for, or `--web-backend none`."],"exampleFix":"# before\npython3.12 last30days.py --topic x --web-backend parallel   # PARALLEL_API_KEY unset\n# after\nexport PARALLEL_API_KEY=...\npython3.12 last30days.py --topic x --web-backend parallel","handlingStrategy":"validation","validationCode":"if web_backend == 'parallel' and not config.get('PARALLEL_API_KEY'):\n    raise RuntimeError(\"PARALLEL_API_KEY is required when web_backend='parallel'\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer `--web-backend auto`.","Double-check the exact env var name (PARALLEL_API_KEY)."],"tags":["config","api-key","python","web-search","grounding"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}