{"record":{"id":"cad47c04fcc9eab4","repo":"can1357/oh-my-pi","slug":"coreweave-serverless-inference-requires-openai-pro","errorCode":null,"errorMessage":"CoreWeave Serverless Inference requires OpenAI-Project. Set COREWEAVE_PROJECT=<team>/<project> before running /login coreweave. To persist it, ${PROJECT_PERSIST_INSTRUCTIONS}.","messagePattern":"CoreWeave Serverless Inference requires OpenAI-Project\\. Set COREWEAVE_PROJECT=<team>/<project> before running /login coreweave\\. To persist it, (.+?)\\.","errorType":"exception","errorClass":"AIError.ConfigurationError","httpStatus":null,"severity":"error","filePath":"packages/ai/src/registry/coreweave.ts","lineNumber":15,"sourceCode":"import { coreWeaveProjectHeaders } from \"@oh-my-pi/pi-catalog/wire/coreweave\";\nimport { $env } from \"@oh-my-pi/pi-utils\";\nimport * as AIError from \"../error\";\nimport { createApiKeyLogin } from \"./api-key-login\";\nimport type { OAuthLoginCallbacks } from \"./oauth/types\";\nimport type { ProviderDefinition } from \"./types\";\n\nconst PROJECT_PERSIST_INSTRUCTIONS =\n\t\"add export COREWEAVE_PROJECT=<team>/<project> to your shell startup file (for example ~/.zshrc, ~/.bashrc, or your shell's profile/rc file)\";\nconst PROJECT_SETUP_INSTRUCTIONS = `Create or select a CoreWeave Serverless Inference project, ${PROJECT_PERSIST_INSTRUCTIONS} for the OpenAI-Project header, then copy your API key from account settings`;\n\nfunction requireCoreWeaveProjectHeaders(): Record<string, string> {\n\tconst headers = coreWeaveProjectHeaders($env);\n\tif (!headers) {\n\t\tthrow new AIError.ConfigurationError(\n\t\t\t`CoreWeave Serverless Inference requires OpenAI-Project. Set COREWEAVE_PROJECT=<team>/<project> before running /login coreweave. To persist it, ${PROJECT_PERSIST_INSTRUCTIONS}.`,\n\t\t);\n\t}\n\treturn headers;\n}\n\nexport const loginCoreWeave = createApiKeyLogin({\n\tproviderLabel: \"CoreWeave Serverless Inference\",\n\tauthUrl: \"https://wandb.ai/settings\",\n\tinstructions: PROJECT_SETUP_INSTRUCTIONS,\n\tpromptMessage: \"Paste your CoreWeave Serverless Inference API key\",\n\tplaceholder: \"api-key\",\n\tvalidation: {\n\t\tkind: \"models-endpoint\",\n\t\tprovider: \"CoreWeave Serverless Inference\",\n\t\tmodelsUrl: \"https://api.inference.wandb.ai/v1/models\",\n\t\theaders: requireCoreWeaveProjectHeaders,\n\t},","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/ai/src/registry/coreweave.ts#L1-L33","documentation":"CoreWeave Serverless Inference requires an OpenAI-Project header identifying the <team>/<project> the request targets. requireCoreWeaveProjectHeaders() reads COREWEAVE_PROJECT (via coreWeaveProjectHeaders($env)) and, when absent, throws this ConfigurationError telling the user to set the variable before running /login coreweave. The library refuses to authenticate or call CoreWeave without it because the OpenAI-Project header is mandatory on CoreWeave's OpenAI-compatible endpoint.","triggerScenarios":"Calling any CoreWeave login/credential path (requireCoreWeaveProjectHeaders) when COREWEAVE_PROJECT is not set to a non-empty <team>/<project> value in the environment.","commonSituations":"New CoreWeave users who created an API key but never selected a Serverless Inference project; CI environments where the variable was set in an interactive shell but not in the CI env; users copying only COREWEAVE_API_KEY from docs; team/project renamed so the old value no longer matches the expected format.","solutions":["Create or select a project in CoreWeave Serverless Inference, then export COREWEAVE_PROJECT=<team>/<project> (e.g. export COREWEAVE_PROJECT=my-team/my-proj).","Persist the variable by adding `export COREWEAVE_PROJECT=<team>/<project>` to ~/.zshrc, ~/.bashrc, or your shell profile/rc file.","Re-run /login coreweave after setting the variable so the OpenAI-Project header is attached.","Verify the value uses the team/project slash format — a bare project name is insufficient."],"exampleFix":"// before (shell)\n$ omp /login coreweave\n// Error: CoreWeave Serverless Inference requires OpenAI-Project...\n// after (shell)\n$ export COREWEAVE_PROJECT=acme-team/prod-inference\n$ omp /login coreweave","handlingStrategy":"validation","validationCode":"// before invoking CoreWeave login/requests\nconst v = process.env.COREWEAVE_PROJECT;\nif (!v || !/^[^/]+\\/[^/]+$/.test(v)) {\n  throw new Error('Set COREWEAVE_PROJECT=<team>/<project> (e.g. my-team/my-proj) before /login coreweave');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await coreWeaveLogin();\n} catch (err) {\n  if (err instanceof AIError.ConfigurationError && err.message.includes(\"OpenAI-Project\")) {\n    console.error(\"Set COREWEAVE_PROJECT=<team>/<project> and retry\");\n  } else throw err;\n}","preventionTips":["Export COREWEAVE_PROJECT in your shell rc file, not just the current session.","Keep COREWEAVE_API_KEY and COREWEAVE_PROJECT set together — CoreWeave always needs both.","Validate the team/project slash format at startup.","Mirror the variable into CI secrets so pipelines don't fail."],"tags":["configuration","coreweave","missing-env-var","authentication"],"backgroundTag":"missing-env-var","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}