{"record":{"id":"d77df63d192f0d67","repo":"continuedev/continue","slug":"asksage-does-not-support-embeddings","errorCode":null,"errorMessage":"AskSage does not support embeddings","messagePattern":"AskSage does not support embeddings","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/openai-adapters/src/apis/AskSage.ts","lineNumber":489,"sourceCode":"    throw new Error(\"AskSage does not support legacy completions API\");\n  }\n\n  completionStream(\n    _body: CompletionCreateParamsStreaming,\n    _signal: AbortSignal,\n  ): AsyncGenerator<Completion> {\n    throw new Error(\"AskSage does not support legacy completions API\");\n  }\n\n  fimStream(\n    _body: FimCreateParamsStreaming,\n    _signal: AbortSignal,\n  ): AsyncGenerator<ChatCompletionChunk> {\n    throw new Error(\"AskSage does not support FIM\");\n  }\n\n  async embed(_body: EmbeddingCreateParams): Promise<CreateEmbeddingResponse> {\n    throw new Error(\"AskSage does not support embeddings\");\n  }\n\n  async rerank(_body: RerankCreateParams): Promise<CreateRerankResponse> {\n    throw new Error(\"AskSage does not support reranking\");\n  }\n\n  async list(): Promise<Model[]> {\n    // AskSage has a /get-models endpoint, but it requires authentication\n    // For now, return empty array - models are typically configured explicitly\n    return [];\n  }\n}\n","sourceCodeStart":471,"sourceCodeEnd":502,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/openai-adapters/src/apis/AskSage.ts#L471-L502","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Configure a dedicated embeddings provider (e.g. openai, voyage, ollama) for the embeddings role and keep AskSage for chat only","Disable features that require embeddings (codebase indexing, semantic search, embeddings-based memory) when using AskSage","Verify the provider's capability matrix before assigning it to a non-chat role"],"exampleFix":"// before\nembeddingsProvider: { provider: 'asksage', model: 'gpt-4o', apiKey: '...' }\n\n// after\nembeddingsProvider: { provider: 'openai', model: 'text-embedding-3-small', apiKey: '...' }\nchatProvider: { provider: 'asksage', model: '...', apiKey: '...' }","handlingStrategy":"fallback","validationCode":"const EMBED_CAPABLE = new Set(['openai', 'ollama', 'voyage', ...]);\nif (!EMBED_CAPABLE.has(config.embedProvider)) throw new Error('configure an embeddings-capable provider');","typeGuard":"const supportsEmbed = (api: BaseLlmApi): boolean =>\n  Object.getPrototypeOf(api).embed !== AskSageApi.prototype.embed;","tryCatchPattern":"try { return await api.embed(body); }\ncatch (e) {\n  if (e instanceof Error && e.message.includes('does not support embeddings')) {\n    return fallbackEmbedApi.embed(body);\n  }\n  throw e;\n}","preventionTips":["Assign embeddings to a dedicated provider in config; never inherit the chat provider's credentials blindly","Smoke-test embed/rerank calls at startup when configuring a new provider"],"tags":["asksage","embeddings","unsupported-feature"],"backgroundTag":"unsupported-capability","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}