continuedev/continue · error · Error

AskSage does not support embeddings

Error message

AskSage does not support embeddings

What it means

AskSage's API has no embeddings endpoint, so the adapter's embed method is a stub that always throws. The adapter implements the shared BaseLlmApi interface, which includes embeddings, so unsupported methods throw explicit errors instead of silently failing. Any attempt to generate embeddings through an AskSage-configured model will hit this immediately.

Source

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

    throw new Error("AskSage does not support legacy completions API");
  }

  completionStream(
    _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 embeddings provider (e.g. openai, voyage, ollama) for the embeddings role and keep AskSage for chat only
  2. Disable features that require embeddings (codebase indexing, semantic search, embeddings-based memory) when using AskSage
  3. Verify the provider's capability matrix before assigning it to a non-chat role

Example fix

// before
embeddingsProvider: { provider: 'asksage', model: 'gpt-4o', apiKey: '...' }

// after
embeddingsProvider: { provider: 'openai', model: 'text-embedding-3-small', apiKey: '...' }
chatProvider: { provider: 'asksage', model: '...', apiKey: '...' }
Defensive patterns

Strategy: fallback

Validate before calling

const EMBED_CAPABLE = new Set(['openai', 'ollama', 'voyage', ...]);
if (!EMBED_CAPABLE.has(config.embedProvider)) throw new Error('configure an embeddings-capable provider');

Type guard

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

Try / catch

try { return await api.embed(body); }
catch (e) {
  if (e instanceof Error && e.message.includes('does not support embeddings')) {
    return fallbackEmbedApi.embed(body);
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling embed() on an AskSageApi instance, e.g. an indexing/reranking pipeline or @code-index/embeddings client configured with provider 'asksage' and an EmbeddingCreateParams body.

Common situations: Setting AskSage as the default provider for all model roles (chat + embeddings + rerank) in a config UI, then running codebase indexing which calls embeddings; assuming an OpenAI-compatible endpoint also serves /v1/embeddings.

Related errors


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