continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.43k stars 1.69k forks source link

Extra inputs not permitted error from several providers #3012

Open RomneyDa opened 1 day ago

RomneyDa commented 1 day ago

Before submitting your bug report

Relevant environment info

OS: Ubuntu 24.10
Version: v0.8.56
IDE: VS Code
Model: Codestral 

OS: Linux EndeavourOS
Continue version: v 0.8.52
IDE : VS Codium 
Model : Codestral

OS: Ubuntu 23.10
VSCode: 1.95.2
Model: Codestral

MBP, Sequoia, vscode 1.95.3, using Continue v0.8.57.

Description

No response

To reproduce

Use configs above

Log output

Error handling webview message: {
  "msg": {
    "messageId": "c43fc231-0fde-4da3-b0f6-597b456a73cd",
    "messageType": "llm/streamChat",
    "data": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "test"
            }
          ]
        },
        {
          "role": "assistant",
          "content": [
            {
              "type": "text",
              "text": "I'm an assistant designed to help with various tasks, answer questions, provide explanations, and even have simple conversations when the context allows. However, it seems like you're just testing my presence. If you have a specific question or task in mind, feel free to share it and I'll do my best to assist you. If not, I'm here to chat about a variety of topics. What would you like to know or discuss?"
            }
          ]
        },
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "retest"
            }
          ]
        }
      ],
      "title": "Codestral",
      "completionOptions": {}
    }
  }
}

Error: HTTP 422 Unprocessable Entity from https://codestral.mistral.ai/v1/chat/completions

{"object":"error","message":{"detail":[{"type":"extra_forbidden","loc":["body","messages",1,"assistant","references"],"msg":"Extra inputs are not permitted","input":null}]},"type":"invalid_request_error","param":null,"code":null}

*************************************

console.ts:137 [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "64543bfb-ed56-4f30-a9c6-3fbb9fc796a6",
    "messageType": "llm/streamChat",
    "data": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "test 1"
            }
          ]
        },
        {
          "role": "assistant",
          "content": [
            {
              "type": "text",
              "text": "Of course, I'd be happy to help with that! Could you please specify the subject or topic of the test? It could be anything from math, science, history, English, coding, or any other subject. I'm here to provide explanations, help solve problems, or even provide practice questions, depending on what you need."
            }
          ]
        },
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "test 2"
            }
          ]
        }
      ],
      "title": "Codestral",
      "completionOptions": {}
    }
  }
}

Error: HTTP 422 Unprocessable Entity from https://codestral.mistral.ai/v1/chat/completions

{"object":"error","message":{"detail":[{"type":"extra_forbidden","loc":["body","messages",1,"assistant","references"],"msg":"Extra inputs are not permitted","input":null}]},"type":"invalid_request_error","param":null,"code":null}
saidshamkhali commented 1 day ago

Same issue happening to me. I will paste here my logs and config.json if it helps:

Log Output

[Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "f4f6092f-33ff-462b-b1ca-343aa95ae1be",
    "messageType": "llm/streamChat",
    "data": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "please help me with my first golang project"
            }
          ]
        },
        {
          "role": "assistant",
          "content": [
            {
              "type": "text",
              "text": "Of course, I'd be happy to help you..."
            }
          ]
        },
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "hi"
            }
          ]
        }
      ],
      "title": "Codestral",
      "completionOptions": {}
    }
  }
}

Error: HTTP 422 Unprocessable Entity from https://codestral.mistral.ai/v1/chat/completions

{"object":"error","message":{"detail":[{"type":"extra_forbidden","loc":["body","messages",1,"assistant","references"],"msg":"Extra inputs are not permitted","input":null}]},"type":"invalid_request_error","param":null,"code":null}

Config.json

{
  "models": [
    {
      "title": "Codestral",
      "provider": "mistral",
      "model": "codestral-latest",
      "apiKey": "[API_KEY]",
      "apiBase": "https://codestral.mistral.ai/v1/"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Codestral",
    "provider": "mistral",
    "model": "codestral-latest",
    "apiKey": "[API_KEY]",
    "apiBase": "https://codestral.mistral.ai/v1/"
  }
}