{"record":{"id":"ff57b004567539a1","repo":"Mintplex-Labs/anything-llm","slug":"fireworksai-api-key-must-be-provided-to-use-agents","errorCode":null,"errorMessage":"FireworksAI API Key must be provided to use agents.","messagePattern":"FireworksAI API Key must be provided to use agents\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/agents/index.js","lineNumber":199,"sourceCode":"        if (!process.env.GENERIC_OPEN_AI_BASE_PATH)\n          throw new Error(\"API base path must be provided to use agents.\");\n        break;\n      case \"perplexity\":\n        if (!process.env.PERPLEXITY_API_KEY)\n          throw new Error(\"Perplexity API key must be provided to use agents.\");\n        break;\n      case \"textgenwebui\":\n        if (!process.env.TEXT_GEN_WEB_UI_BASE_PATH)\n          throw new Error(\n            \"TextWebGenUI API base path must be provided to use agents.\"\n          );\n        break;\n      case \"bedrock\":\n        // No validations since there are many possible authentication methods\n        break;\n      case \"fireworksai\":\n        if (!process.env.FIREWORKS_AI_LLM_API_KEY)\n          throw new Error(\n            \"FireworksAI API Key must be provided to use agents.\"\n          );\n        break;\n      case \"deepseek\":\n        if (!process.env.DEEPSEEK_API_KEY)\n          throw new Error(\"DeepSeek API Key must be provided to use agents.\");\n        break;\n      case \"litellm\":\n        if (!process.env.LITE_LLM_BASE_PATH)\n          throw new Error(\n            \"LiteLLM API base path and key must be provided to use agents.\"\n          );\n        break;\n      case \"apipie\":\n        if (!process.env.APIPIE_LLM_API_KEY)\n          throw new Error(\"ApiPie API Key must be provided to use agents.\");\n        break;\n      case \"xai\":","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/server/utils/agents/index.js#L181-L217","documentation":"Thrown by AgentHandler.checkSetup() (server/utils/agents/index.js:198) when the workspace agent provider is 'fireworksai' but FIREWORKS_AI_LLM_API_KEY is unset/empty. Fireworks AI serves hosted open-source models behind this key, which is the only credential the guard validates.","triggerScenarios":"An agent invocation runs with workspace.agentProvider === 'fireworksai' while FIREWORKS_AI_LLM_API_KEY is absent from process.env. Path: #providerSetupAndCheck() -> checkSetup() at index.js:476.","commonSituations":"Fireworks AI selected in System > LLM Preference without a key; key created at fireworks.ai but never added to .env; .env edited on disk but the Node process still holds the old env; key rotated/revoked.","solutions":["Create a key at https://fireworks.ai/account/api-keys and set FIREWORKS_AI_LLM_API_KEY in .env.","Restart AnythingLLM to reload process.env.","Validate with curl -H 'Authorization: Bearer $FIREWORKS_AI_LLM_API_KEY' https://api.fireworks.ai/inference/v1/models.","Confirm the workspace agent model is a valid Fireworks model id."],"exampleFix":"// before (.env)\n// FIREWORKS_AI_LLM_API_KEY=\n\n// after (.env)\nFIREWORKS_AI_LLM_API_KEY=fw_...your-key","handlingStrategy":"validation","validationCode":"const key = process.env.FIREWORKS_AI_LLM_API_KEY;\nif (!key) {\n  throw new Error(\n    'Cannot start FireworksAI agent: set FIREWORKS_AI_LLM_API_KEY (from fireworks.ai/account/api-keys) in .env.'\n  );\n}","typeGuard":null,"tryCatchPattern":"try {\n  await agentHandler.start();\n} catch (e) {\n  if (/FireworksAI API Key must be provided/.test(e.message)) {\n    return respondConfigError('fireworksai', ['FIREWORKS_AI_LLM_API_KEY']);\n  }\n  throw e;\n}","preventionTips":["Create the key at fireworks.ai and paste it into .env in one step.","Restart AnythingLLM to load the new env.","Add a startup assertion that maps provider -> required env var.","Rotate keys and keep .env out of git."],"tags":["agents","llm-provider","fireworksai","api-key","environment-variables","config"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}