{"record":{"id":"0ca5647f66777bcb","repo":"continuedev/continue","slug":"greptile-token-not-found","errorCode":null,"errorMessage":"Greptile token not found.","messagePattern":"Greptile token not found\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/context/providers/GreptileContextProvider.ts","lineNumber":30,"sourceCode":"class GreptileContextProvider extends BaseContextProvider {\n  static description: ContextProviderDescription = {\n    title: \"greptile\",\n    displayTitle: \"Greptile\",\n    description: \"Insert query to Greptile\",\n    type: \"query\",\n  };\n\n  get deprecationMessage() {\n    return \"The Greptile context provider is now deprecated and will be removed in a later version. Please consider viewing their docs at greptile.com/docs/code-review-bot/auto-resolve-with-mcp for resolving greptile queries.\";\n  }\n\n  async getContextItems(\n    query: string,\n    extras: ContextProviderExtras,\n  ): Promise<ContextItem[]> {\n    const greptileToken = this.getGreptileToken();\n    if (!greptileToken) {\n      throw new Error(\"Greptile token not found.\");\n    }\n\n    const githubToken = this.getGithubToken();\n    if (!githubToken) {\n      throw new Error(\"GitHub token not found.\");\n    }\n\n    let absPath = await this.getWorkspaceDir(extras);\n    if (!absPath) {\n      throw new Error(\"Failed to determine the workspace directory.\");\n    }\n\n    var remoteUrl = getRemoteUrl(absPath);\n    remoteUrl = getRemoteUrl(absPath);\n    const repoName = extractRepoName(remoteUrl);\n    const branch = getCurrentBranch(absPath);\n    const remoteType = getRemoteType(remoteUrl);\n","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/context/providers/GreptileContextProvider.ts#L12-L48","documentation":"GreptileContextProvider.getContextItems throws immediately when no Greptile API token is resolvable. The token comes from provider options (GreptileToken) or the GREPTILE_AUTH_TOKEN environment variable; if both are absent the provider refuses to run.","triggerScenarios":"Invoking the greptile context provider without a GreptileToken option and without GREPTILE_AUTH_TOKEN in the environment of the Continue process.","commonSituations":"User added the greptile provider to config.yaml but never set the token; token was set in a shell that isn't the parent of the IDE; option key typo (GreptileToken).","solutions":["Set GREPTILE_AUTH_TOKEN in the environment where the IDE/extension launches","Or pass GreptileToken in the provider's options in config.yaml","Restart the IDE after setting the env var so the backend picks it up"],"exampleFix":"// config.yaml\n# before\nname: greptile\nparams: {}\n# after\nname: greptile\nparams:\n  GreptileToken: gtp_xxx\n","handlingStrategy":"validation","validationCode":"const token = params.GreptileToken ?? process.env.GREPTILE_AUTH_TOKEN;\nif (!token) {\n  // skip provider instead of letting it throw\n  disableProvider('greptile');\n}","typeGuard":null,"tryCatchPattern":"catch (e) { if (/Greptile token/.test(e.message)) promptForToken('GREPTILE_AUTH_TOKEN'); }","preventionTips":["Set required tokens via env before launching the IDE","Add a config lint step that checks provider params against required option lists"],"tags":["greptile","auth","missing-token","env-var"],"backgroundTag":"missing-api-key","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}