continuedev/continue · error · Error

Unsupported model: ${body.model}

Error message

Unsupported model: ${body.model}

What it means

The embed method dispatches by model family: only known Bedrock embedding models (e.g. Amazon Titan / Cohere embed models the adapter recognizes) are handled; any other model string falls into the else branch and throws `Unsupported model: <model>`. It is a whitelist-based capability gate, not an AWS-side rejection.

Source

Thrown at packages/openai-adapters/src/apis/Bedrock.ts:654

        truncate: "END",
      };
      const output = await this.getInvokeModelResponseBody(body.model, payload);
      embeddings = [output.embedding];
    } else if (body.model.startsWith("amazon.titan-embed")) {
      embeddings = await Promise.all(
        texts.map(async (text) => {
          const payload = {
            inputText: text,
          };
          const output = await this.getInvokeModelResponseBody(
            body.model,
            payload,
          );
          return output.embeddings || [];
        }),
      );
    } else {
      throw new Error(`Unsupported model: ${body.model}`);
    }

    return embedding({
      data: embeddings,
      model: body.model,
      usage: {
        prompt_tokens: 0,
        total_tokens: 0,
      },
    });
  }

  async rerank(body: RerankCreateParams): Promise<CreateRerankResponse> {
    if (!body.query || !body.documents.length) {
      throw new Error("Query and chunks must not be empty");
    }

    // Base payload for both models

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Check the supported embedding model list for your adapter version and use one of those exact ids (e.g. amazon.titan-embed-text-v2:0).
  2. Upgrade the openai-adapters package — new Bedrock embedding models get added over time.
  3. Verify the model string isn't accidentally an OpenAI name or a chat model; strip provider prefixes the adapter doesn't expect.

Example fix

// before
await api.embed({ model: 'text-embedding-3-small', input: ['hi'] });

// after
await api.embed({ model: 'bedrock/amazon.titan-embed-text-v2:0', input: ['hi'] });
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_BEDROCK_EMBED_MODELS = [/^amazon\.titan-embed/, /^cohere\.embed/];
const isSupportedEmbedModel = (m: string) => SUPPORTED_BEDROCK_EMBED_MODELS.some(r => r.test(m));
if (!isSupportedEmbedModel(body.model)) throw new Error(`Unsupported embedding model: ${body.model}`);

Try / catch

try {
  await api.embed(body);
} catch (e) {
  if (e instanceof Error && e.message.startsWith('Unsupported model:')) {
    // switch to a supported embedding model or another provider
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling embed with a chat model id (e.g. 'anthropic.claude-3-sonnet') or an embedding model id not in the adapter's recognized list; using a newer Bedrock embedding model released after the adapter version in use; passing an OpenAI model name like 'text-embedding-3-small' unmodified.

Common situations: Multi-provider configs reusing OpenAI model names; new Bedrock embedding models not yet supported by the installed adapter version; typos in model identifiers.

Related errors


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