continue icon indicating copy to clipboard operation
continue copied to clipboard

Amazon Bedrock inference (provider: bedrockimport) models don't work

Open cb-fhillenbrand opened this issue 4 months ago • 0 comments

Before submitting your bug report

Relevant environment info

- OS: mint
- Continue version: 1.1.48
- IDE version: 1.101.0
- Model: several
- config:
  
name: Local Assistant
version: 1.0.0
schema: v1
models:
  - name: AWS Bedrock Claude 4 Sonnet
    provider: bedrockimport
    model: eu.anthropic.claude-sonnet-4-20250514-v1:0
    env:
      modelArn: arn:aws:bedrock:eu-south-2:XXXXXXXXXXXX:inference-profile/eu.anthropic.claude-sonnet-4-20250514-v1:0
      region: eu-south-2
      profile: bedrock
    roles:
      - chat
  - name: AWS Bedrock Nova Pro
    provider: bedrockimport
    model: eu.amazon.nova-pro-v1:0
    env:
      modelArn: arn:aws:bedrock:eu-south-2:XXXXXXXXXXXX:inference-profile/eu.amazon.nova-pro-v1:0
      region: eu-south-2
      profile: bedrock
    roles:
      - chat
  - name: AWS Bedrock Deepseek R1
    provider: bedrockimport
    model: us.deepseek.r1-v1:0
    env:
      modelArn: arn:aws:bedrock:us-west-2:XXXXXXXXXXXX:inference-profile/us.deepseek.r1-v1:0
      region: us-west-2
      profile: bedrock
    roles:
      - chat

with XXXXXXXXXXXX as profile arn

Description

While adding regular models from Amazon Bedrock works without issues, adding inference models with a modelArn doesn't seems to work appropriatly. Please check section below for logs.

The documented way of configuring costum imported models doesn't seems to work and throws

Error No value provided for input HTTP label: modelId.

-> the modelArn must be part of env

To reproduce

  • Add config above to your local assistant
  • Replace the XXXXXXXXXXXX with your profile arn
  • enable access of the models in Amazon Bedrock
  • Add your credentials to the ~/.aws/credentials file
  • Execute the test prompt

Results

A prompt of "Say Hi" is leading to different issues: Claude 4 Sonnet

Error You must either implement templateMessages or _streamChat

Image

Nova Pro

Error Malformed input request: #: required key [messages] not found, please reformat your input and try again.

Image

Deepseek R1

Error Malformed JSON received from Bedrock: {"choices":[{"text":"Hi","stop_reason":null}]}

Image

Other prompts are leading to similar issues. Deepseek seems to gerate a cut output. Probably the first line or so. Claude is the only one getting the system prompt. Others get the user prompt only (for unknown reasons).

cb-fhillenbrand avatar Jun 17 '25 10:06 cb-fhillenbrand