continuedev/continue · error · Error

AskSage does not support reranking

Error message

AskSage does not support reranking

What it means

AskSage does not provide a reranking endpoint, so the adapter's rerank method is a stub that always throws. Like FIM and embeddings, reranking is part of the shared LLM API interface but not offered by AskSage, so the method fails fast with an explicit message. Reranking requests must be routed to a provider that implements them.

Source

Thrown at packages/openai-adapters/src/apis/AskSage.ts:493

    _body: CompletionCreateParamsStreaming,
    _signal: AbortSignal,
  ): AsyncGenerator<Completion> {
    throw new Error("AskSage does not support legacy completions API");
  }

  fimStream(
    _body: FimCreateParamsStreaming,
    _signal: AbortSignal,
  ): AsyncGenerator<ChatCompletionChunk> {
    throw new Error("AskSage does not support FIM");
  }

  async embed(_body: EmbeddingCreateParams): Promise<CreateEmbeddingResponse> {
    throw new Error("AskSage does not support embeddings");
  }

  async rerank(_body: RerankCreateParams): Promise<CreateRerankResponse> {
    throw new Error("AskSage does not support reranking");
  }

  async list(): Promise<Model[]> {
    // AskSage has a /get-models endpoint, but it requires authentication
    // For now, return empty array - models are typically configured explicitly
    return [];
  }
}

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Configure a dedicated rerank provider (e.g. cohere, llm7, any rerank-capable adapter) for the rerank role
  2. Disable reranking in the retrieval pipeline when the only provider is AskSage
  3. Fall back to similarity-score ordering without a reranker

Example fix

// before
rerankProvider: { provider: 'asksage', apiKey: '...' }

// after
rerankProvider: { provider: 'cohere', model: 'rerank-v3.5', apiKey: '...' }
Defensive patterns

Strategy: fallback

Validate before calling

const RERANK_CAPABLE = new Set(['cohere', 'llm7', ...]);
if (!RERANK_CAPABLE.has(config.rerankProvider)) {
  console.warn('rerank disabled: provider lacks support');
  config.rerankEnabled = false;
}

Type guard

const supportsRerank = (api: BaseLlmApi): boolean =>
  Object.getPrototypeOf(api).rerank !== AskSageApi.prototype.rerank;

Try / catch

try { return await api.rerank(body); }
catch (e) {
  if (e instanceof Error && e.message.includes('does not support reranking')) {
    return { results: body.documents.map((d, i) => ({ index: i, relevance_score: 0 })) }; // no-op ordering
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling rerank() on an AskSageApi instance, e.g. a retrieval pipeline configured with provider 'asksage' issuing a RerankCreateParams request.

Common situations: Using AskSage as the single provider for an enterprise RAG setup where the rerank step shares the chat config; assuming OpenAI-compatible providers also expose a /rerank endpoint (Cohere/Jina-style).

Related errors


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