continuedev/continue · error · Error

No reranker set up

Error message

No reranker set up

What it means

RerankerRetrievalPipeline._rerank requires a model selected for the 'rerank' role in config; if selectedModelByRole.rerank is unset this throws before any reranking call. It happens during run(), i.e. while producing codebase retrieval results.

Source

Thrown at core/context/retrieval/pipelines/RerankerRetrievalPipeline.ts:90

    }

    if (filterDirectory) {
      // Backup if the individual retrieval methods don't listen
      retrievalResults = retrievalResults.filter(
        (chunk) =>
          !!findUriInDirs(chunk.filepath, [filterDirectory]).foundInDir,
      );
    }

    const deduplicatedRetrievalResults: Chunk[] =
      deduplicateChunks(retrievalResults);

    return deduplicatedRetrievalResults;
  }

  private async _rerank(input: string, chunks: Chunk[]): Promise<Chunk[]> {
    if (!this.options.config.selectedModelByRole.rerank) {
      throw new Error("No reranker set up");
    }

    // remove empty chunks -- some APIs fail on that
    chunks = chunks.filter((chunk) => chunk.content);

    try {
      let scores: number[] =
        await this.options.config.selectedModelByRole.rerank.rerank(
          input,
          chunks,
        );

      // Filter out low-scoring results
      let results = chunks;
      // let results = chunks.filter(
      //   (_, i) => scores[i] >= RETRIEVAL_PARAMS.rerankThreshold,
      // );
      // scores = scores.filter(

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Add a reranker model to config (e.g. a Cohere rerank model with roles: [rerank])
  2. Or remove/disable reranking in the retrieval pipeline settings so _rerank is skipped
  3. Validate config with `continue config validate` or reload and check for role warnings

Example fix

# config.yaml
# before
name: My Reranker
roles: []
# after
name: My Reranker
provider: cohere
model: rerank-v3.5
apiKey: ...
roles: [rerank]
Defensive patterns

Strategy: validation

Validate before calling

const rerankModel = config.selectedModelByRole.rerank;
if (!rerankModel) pipelineOptions.disableReranking = true;

Type guard

function hasReranker(config: Config): boolean {
  return !!config.selectedModelByRole.rerank;
}

Prevention

When it happens

Trigger: A retrieval pipeline with reranking enabled (e.g. context retrieval with reranker) but no model assigned the rerank role — no reranker entry in config models/roles and no default available.

Common situations: User enables reranking flags or copies a config that expects Cohere/LLM reranker but never defines the reranker model; model role names changed between versions.

Related errors


AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27). Data as JSON: /api/errors/7a3d9b5faaebd4b2. Report an issue: GitHub.