Azure OpenAI "Resource not found Error" when using baseURL in YAML config #2802
Replies: 1 comment 4 replies
-
Please see the documentation on this: The If you are using the standard Azure OpenAI domain, you should not set You can omit it altogether to resolve your issue. You can use it, however, with dynamic placeholders or without them. baseURL: "https://${INSTANCE_NAME}.openai.azure.com/openai/deployments/${DEPLOYMENT_NAME}"
# or
baseURL: "https://librechat.openai.azure.com/openai/deployments/gpt-35-turbo"
# or, since we are using the standard domain, we omit the field completely Both the examples work for me in this config: endpoints:
azureOpenAI:
groups:
- group: "region"
apiKey: "${REGION_API_KEY}"
instanceName: "librechat"
version: "2024-03-01-preview"
baseURL: "https://${INSTANCE_NAME}.openai.azure.com/openai/deployments/${DEPLOYMENT_NAME}"
models:
gpt-3.5-turbo:
deploymentName: "gpt-35-turbo"
gpt-3.5-turbo-1106:
deploymentName: "gpt-35-turbo-1106"
gpt-4:
deploymentName: "gpt-4" Using the dynamic placeholders makes it so that you can keep the model/region switching behavior, which is the chief reason for the azure config via
This is not arbitrary, it's used to construct the baseURL if placeholders are included, or the standard baseURL if no field for it is included. Arbitrary in the documentation means to say it's whatever value you defined, in this case, whatever you named the deployment on Azure.
Not sure where in the pipeline this is happening, probably from the legacy config, but it wouldn't happen if your baseURL is configured correctly. TL;DRWhen configuring |
Beta Was this translation helpful? Give feedback.
-
What happened?
I have custom librechat.yaml to use Azure OpenAI, but get 404 error when requesting.
2024-05-16T10:15:41.388Z warn: [OpenAIClient.chatCompletion][stream] API error
2024-05-16T10:15:41.390Z error: [handleAbortError] AI response error; aborting request: 404 Resource not found
2024-05-16T10:15:41.400Z debug: [AskController] Request closed
Steps to Reproduce
I have custom librechat.yaml
It gives 404 error, logs as below.
As you can see, the model name was concatnated into url, but Azure requires DeploymentName there
Ref:https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2024-02-01
Ref:https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/azure_openai
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions