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.31k stars 1.67k forks source link

Edit mode using Azure OpenAI broken by `prediction` option on 0.8.57/0.9.231 #2981

Open jason-nance opened 18 hours ago

jason-nance commented 18 hours ago

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version: v0.8.57 (v0.9.231 also affected)
- IDE version: VS Code 1.95.2 (Universal)
- Model: gpt-4o (via Azure OpenAI
- config.json: (relevant parts)

{
  "models": [
    {
      "apiKey": "redacted",
      "engine": "gpt-4o (version:2024-08-06)",
      "apiBase": "redacted",
      "apiType": "azure",
      "apiVersion": "2024-10-21",
      "deployment": "gpt-4o",
      "model": "gpt-4o",
      "title": "gpt-4o",
      "systemMessage": "You are an expert software developer. You give helpful and concise responses.",
      "provider": "azure"
  ],
...

Description

Edit mode is broken for gpt-4o on Azure OpenAI since the changes to add Predicted Output support for OpenAI models (https://github.com/continuedev/continue/pull/2837). Trying to use it results in the following error:

Unrecognized request argument supplied: prediction

I believe the Azure LLM just needs to override supportsPrediction to return false until Azure OpenAI supports the parameter.

To reproduce

  1. Configure gpt-4o via Azure OpenAI as the chat model
  2. Trigger any edit command (Cmd+i)

Log output

Error streaming diff: Error: HTTP 400 model_error from <redacted>/openai/deployments/gpt-4o/chat/completions?api-version=2024-10-21  {   "error": {     "message": "Unrecognized request argument supplied: prediction",     "type": "invalid_request_error",     "param": null,     "code": null   } }
ntaylor-ads commented 15 hours ago

Facing the same issue