Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Deployment Name Bug #1153

Open
JiaCYu opened this issue May 16, 2024 · 11 comments
Open

Azure Deployment Name Bug #1153

JiaCYu opened this issue May 16, 2024 · 11 comments
Assignees
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.

Comments

@JiaCYu
Copy link

JiaCYu commented May 16, 2024

Policy and info

  • Maintainers will close issues that have been stale for 14 days if they contain relevant answers.
  • Adding the label "sweep" will automatically turn the issue into a coded pull request. Works best for mechanical tasks. More info/syntax at: https://docs.sweep.dev/

Expected Behavior

There shouldn't be an error with the model name.

Current Behavior

Deployment name seems to mix with model name.

Everything seems to work perfectly and code is being made:
image

But then an error pops up telling me that the model doesn't exist and it takes my Azure OpenAI deployment name and says it's not a model.
image

Here is the command style I used following these instructions from here: https://gpt-engineer.readthedocs.io/en/latest/open_models.html
image

gpt-engineer --azure [redacted_endpoint_url] ./snake_game/ [redacted_deployment_name]

Additional Failure Information

Using Azure OpenAI with gpt-4-turbo deployed with a different deployment name. Only installed gpt-engineer in a virtual environment.

@JiaCYu JiaCYu added bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. labels May 16, 2024
@JiaCYu
Copy link
Author

JiaCYu commented May 16, 2024

I just reread the instructions and I realized that the Azure Deployment Name should be the model name as well. Which kind of sucks because there are a bunch of projects dependent on that deployment name and a lot refactoring would have to be done.

@viborc
Copy link
Collaborator

viborc commented May 16, 2024

Hey @JiaCYu, we have our community meeting today, and I'll make sure we discuss this topic with the team and get back to you!

@captivus
Copy link
Collaborator

If I understand the issue you're reporting correctly, this is due to the parameters that OpenAI expects for Azure deployments of its model and is not a GPTE-specific issue.

@captivus
Copy link
Collaborator

@viborc I have a meeting conflict with today's dev meeting, but I can speak more about this if the issue isn't resolved during the meeting today.

@viborc
Copy link
Collaborator

viborc commented May 16, 2024

Sounds good @captivus! I might assign you to this one if we don't figure it out during the meeting!

@viborc
Copy link
Collaborator

viborc commented May 16, 2024

We decided to use your very generous offer to help us with this @captivus and @zigabrencic mentioned that he'll add some comments here, too!

@zigabrencic
Copy link
Collaborator

Hey.

As discussed in the meeting today. My proposal would be to to sync the Azur part with same approach we use open models and Open router. For example (from here):

export OPENAI_API_BASE="https://openrouter.ai/api/v1"
export OPENAI_API_KEY="sk-key-from-open-router"
export MODEL_NAME="meta-llama/llama-3-8b-instruct:extended"
gpte <project_dir> $MODEL_NAME --lite --temperature 0.1

Instead of using custom --azure flag.

@captivus what do you think? I don't know their hosting specs so I'm not sure if it's doable.

@captivus
Copy link
Collaborator

Looking at this further, I think the bug may be ours and due to the way that we implement the model version in an opinionated way:

openai_api_version=os.getenv("OPENAI_API_VERSION", "2023-05-15"),

Let's discuss in our dev meeting.

@captivus
Copy link
Collaborator

captivus commented May 23, 2024

More thoughts here. @JiaCYu can you please set the OPENAI_API_VERSION environment variable with your deployment's version and try again? The internals I've linked to above show how we handle environment variable when it is not set, and is consistent with the error messages you've provided. Without knowing more about your specific deployment, it's difficult to advise specifically what this value should be.

This documentation may be helpful. This issue resolution may also prove helpful.

Please try and feedback!

@JiaCYu
Copy link
Author

JiaCYu commented May 29, 2024

@captivus Sorry for the late reply.

I set OPEN_API_VERSION in the environmental variable in powershell, and I still get the same error as I do from the original post:
image

The deployment I have is named gpt-4-[redacted, but there are 4 letters here] and the deployment of the actual model is just gpt-4-turbo ver. 0125-preview:
image

@captivus
Copy link
Collaborator

captivus commented Jun 7, 2024

Can you please try referencing one of the available deployments in your environment, as shown in the output you provided? The error suggests that you are trying to use a model that is unavailable.

image

Also, kindly share text outputs in addition to screenshots if additional debugging is needed.

We will upgrade the default version to use the latest supported model in Azure, which is 2024-05-01-preview per the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.
Projects
None yet
Development

No branches or pull requests

4 participants