Unable to configure custom OpenAI API provider

We have our own AI model marketplace in our company that is compatible with the OpenAI API. However, when I tried to configure a few of our models in LINQPad I got a "not found" error. I must be doing something wrong, but I do not know what.

To be sure that this is not a problem with our company's API I wrote a snippet to test it (using NuGet package OpenAI), and it works as expected:

C# snippet using custom OpenAI API

I have configured a custom provider in LINQPad using the same endpoint, authorization and model ID as above (the dialog title has a misspelling):

Custom OpenAI provider configuration

However, when I tested it, I got the following "not found" error:

Not found dialog box error message

I have tried to provide an invalid API key, but I still get the error, so it must be a problem with the API request URL being wrong. The unchecked built-in OpenAI model IDs always present in the configuration do not exist on our internal API so to be sure that I am testing my specific model ID I have also tried to start a chat where I select our own model ID and this still results in a "not found" error. I have also tried to update the custom endpoint by removing "v1" or adding a trailing slash to no avail.

Given that my simple C# script works how can I configure LINQPad to use the same model?

Answers