continuedev/continue · error · Error

AskSage does not support FIM

Error message

AskSage does not support FIM

What it means

AskSage's API does not expose a fill-in-the-middle (FIM / code-completion) endpoint, so the AskSage adapter's fimStream method is a stub that always throws. This mirrors the OpenAI-compatible LLM API interface used across the openai-adapters package, where every provider must declare which capabilities it supports. Calling FIM on a provider that lacks it fails fast with an explicit message rather than an opaque upstream 404.

Source

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

  completionNonStream(
    _body: CompletionCreateParamsNonStreaming,
    _signal: AbortSignal,
  ): Promise<Completion> {
    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. Switch the FIM/autocomplete model to a provider that supports code completion (e.g. codestral, openai, ollama, deepseek) and keep AskSage only for chat roles
  2. Disable tab-autocomplete / FIM features when the chat provider is AskSage
  3. Request or await native FIM support in AskSage before routing such requests there

Example fix

// before
const provider = new AskSageApi(config);
for await (const c of provider.fimStream(fimBody, signal)) { ... }

// after
const provider = new CodestralApi(config); // FIM-capable provider
for await (const c of provider.fimStream(fimBody, signal)) { ... }
Defensive patterns

Strategy: fallback

Validate before calling

const supportsFim = (p) => typeof p.fimStream === 'function' && p.constructor.name !== 'AskSageApi';
// better: consult your provider registry's capabilities table before routing FIM

Type guard

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

Try / catch

try {
  for await (const c of api.fimStream(body, signal)) { yield c; }
} catch (e) {
  if (e instanceof Error && e.message.includes('does not support FIM')) {
    // degrade: disable autocomplete or switch provider
  } else throw e;
}

Prevention

When it happens

Trigger: Calling fimStream() (or a client library that routes code-completion requests to it) on a model configured with the AskSage provider, e.g. config.provider === 'asksage' with any FimCreateParamsStreaming body.

Common situations: Copying a configuration from another provider (e.g. Continue's tab-autocomplete setup tuned for a FIM-capable provider) and only swapping the base URL/apiKey to AskSage; enabling code autocomplete in an editor plugin backed by AskSage.

Related errors


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