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.13k stars 1.64k forks source link

Azure Open AI: Adding images to prompt no longer works #2830

Open ntaylor-ads opened 1 week ago

ntaylor-ads commented 1 week ago

Before submitting your bug report

Relevant environment info

- OS: Windows
- Continue version: 0.9.225
- IDE version:1.95.1
- Model: gpt-4o
- config.json:

{
      "title": "Azure GPT-4o",
      "provider": "azure",
      "model": "gpt-4o",
      "apiBase": "***",
      "engine": "gpt-4o",
      "apiVersion": "2024-08-01-preview",
      "apiType": "azure",
      "apiKey": "***"
}

Description

I was using an Azure gpt-4o model with "openai" set as the provider. This was working perfectly and allowed me to use images in the prompts. I noticed today that that config now throws a 404 error, generating a bad url like this: https://***/openai/deployments/undefined/chat/completions?api-version=2024-02-15-preview (note the "undefined")

I then changed the model config to use the provider "azure". This fixes the 404 error and I am able to do text based prompts and get responses, but it also removes the ability to add images to the prompt.

To reproduce

No response

Log output

No response

ntaylor-ads commented 1 day ago

I fixed this issue by changing the provider back to "openai" and changing the key "engine" to "deployment", i.e.:

{
      "title": "Azure GPT-4o",
      "provider": "openai",
      "model": "gpt-4o",
      "apiBase": "***",
      "apiVersion": "2024-08-01-preview",
      "apiType": "azure",
      "deployment": "gpt-4o",
      "apiKey": "***"
    }

I guess something changed in how the config should be specified? With the natural follow up: what is the right way to be staying abreast of the current correct way of specifying the config?