Closed mjp0 closed 8 months ago
You're right! So what should be the default for custom provider? Is it working if you send the request without a model ID?
I think it should default to empty because that will throw an error when executing. I think we can safely assume that if someone is playing with custom provider, they probably know they need to specify the model as well. Only time when models would be same as OpenAI's selection would be when the user uses Azure OpenAI.
Right now, I can't actually use it because if I leave the model id empty, it will default to gpt-3.5-turbo. That also happens if I put anything else in the field. I'm guessing it validates the model id against OpenAI's model list endpoint, so it makes sense. In case you want to replicate what I tried, I tried with Together's OpenAI compatible endpoint and Qwen/Qwen1.5-72B-Chat
model id.
Ok, I thought that compatible endpoints would also have the "list models" API endpoint but it seems Together does not.
AFAIK, none of them (Together, DeepInfra, OpenRouter, etc.) do, so definitely shouldn't rely on that existing :)
After diving a bit into this. I think that would be preferrable to deprecate the "Custom provider" option and implement a block for each service since the other services also don't have Assistant-related endpoints or Speech-related endpoints etc.. It impacts the UX.
So you need Together AI? Or should I focus on something else first?
Sure, you can implement block for each one but you will end up writing one for Together and then copy/pasting it over and over again for others. Together is nice and fast, OpenRouter has more edge case models and DeepInfra is the cheapest ;)
The OpenAI block seems to default to "gpt-3.5-turbo" even when using a custom provider.
The block should probably skip validating the model if base URL has been changed because then it's probable that user may be using OpenAI compatible API endpoint to access other models.