Skip to content

HTTP 400 Bad Request from https://api.anthropic.com/v1/messages #2006

Description

@Kiril-Stoilov919

Before submitting your bug report

Relevant environment info

- OS: macOS Sonoma 14.6.1
- Continue: 0.0.56
- IDE: IntelliJ Ultimate 2024.2.0.1
- Model: Claude 3.5 Sonnet
- config.json:
  {
  "models": [
    {
      "title": "Llama 3",
      "provider": "ollama",
      "model": "llama3"
    },
    {
      "title": "Mistral",
      "provider": "ollama",
      "model": "mistral:latest",
      "apiBase": "http://localhost:11434/"
    },
    {
      "title": "Ollama",
      "provider": "ollama",
      "model": "AUTODETECT"
    },
    {
      "title": "Claude 3.5 Sonnet",
      "provider": "anthropic",
      "model": "claude-3-5-sonnet-20240620",
      "apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "completionOptions": {}
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Claude 3.5 Sonnet",
    "provider": "anthropic",
    "model": "claude-3-5-sonnet-20240620",
    "apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "allowAnonymousTelemetry": true,
  "embeddingsProvider": {
    "provider": "free-trial"
  },
  "reranker": {
    "name": "free-trial"
  }
}


### Description

After the latest updates I receive:

HTTP 400 Bad Request from https://api.anthropic.com/v1/messages
{"type":"error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"}}


I've got enough credit in my Anthropic account, apparently Continue is not creating proper requests (see above)

### To reproduce

Try prompting Claude 3.5 Sonnet with latest updates in IntelliJ

### Log output

```Shell
{"type":"error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationRelates to configuration optionside:jetbrainsRelates specifically to JetBrains extensionkind:bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions