Allow custom base url for OpenAI compatible endpoints (other providers) #981
Describe the featureI would like to use other providers that have a OpenAI compatible endpoint. Changing the base url would suffice (I believe) Use casesWith this I could test other providers for LLMs with better privacy, throughput or latency Anything else?No response |
Replies: 5 comments 1 reply
|
There are many custom components that allow you to use third-party endpoints. However, maintaining functionality can be problematic, as providers may have differences in request formats. The AI_task functionality adds additional complexity. |
|
Here is community discussion on forum about this problem: https://community.home-assistant.io/t/wth-there-is-not-a-conversation-integration-that-let-you-use-any-openai-compatible-api/803855/7 |
|
I can modestly promote my fork of the fork. I made it for myself to work with Mistral, but I also tested it on all popular providers. So far, it works without any problems, tool calls and streaming responses are supported. Everything runs on the OpenAI system library. It is also worth paying attention to https://github.com/michelle-avery/custom-conversation |
|
I hear the feedback, but would still disagree. Being able to change the base url is a feature the official open python package supports. I did forked the openAI component myself, added the parameter, but that's not sustainable, as I do not wish to follow up on every new development. |
|
I agree with other folks here: the OpenAI API format has become the defacto industry standard. Home Assistant is one of the first things I've run into recently that doesn't support custom OpenAI endpoints. It's A Standard (Evidence)Some examples of common tools that allow you to change the API endpoint (with links to the specific documentation of the feature):
Also, tools like [Speaches.ai(https://speaches.ai/) (3k) and the widely usedLiteLLM (36k GH Stars) are themselves proxies that implement the OpenAI Standard, to allow broader interoperability for clients that only support the OpenAI standard (but that do support custom URLs.) It might not have been as clear in mid/late 2025 that the OpenAI API standard was going to be implemented as widely as it has been, but it's pretty clear now; there's an entire ecosystem of stuff using this. (It's akin to many things that support "Cloud Storage" letting you use "Amazon S3 but with a custom URL.") Compatibility ConcernsThere's a risk of compatibility issues, but they're ultimately the responsibility of the API being called, or the person going out of their way to add a custom endpoint. And, the risk of opt-in compatibility issues seemed worth it for the companies above and many more. OpenAI actively publishes details of the standard, notifying developers in advance of changes - relevant for both people using the API as a client, and also for those reimplementing on their own LLM platform. |
There are many custom components that allow you to use third-party endpoints. However, maintaining functionality can be problematic, as providers may have differences in request formats. The AI_task functionality adds additional complexity.
The best option is to create specialized integrations (such as openrouter) that strictly follow the documentation.