hello , you are trying to use deepseek api keys with openai url ?
I didnāt find a way to change the url in the fork. But the original component now has it, so Iām using that
Thatās it, it should work now.
For some reason home assistant developers keep rejecting any PRs trying to add an easier option to switch the OpenAI endpoint in the official integration
- Install hass-environmental-variable
- Add this to your configuration.yaml:environment_variable: OPENAI_BASE_URL: āhttps://api.deepseek.com/v1ā
- Restart your system and add the OpenAI Conversation integration, when asked for the API key use the one you crated for DeepSeek
- Open the integration and uncheck āRecommended model settingsā
- Set āmodelā to ādeepseek-chatā and increase maximum tokens to 1024, then reload the integration
taken from reddit
You may also host the DeepSeek-R1 model free at your Azure AI Foundry account and connect it using the Azure OpenAI Conversation github custom component from HACS store.
Important Configuration:
- The base URL must include the api version (You can check this by navigating to your model + endpoint section and select your deployed model) e.g. https://ai-xxx.services.ai.azure.com/models/chat/completions?api-version=2024-05-01-preview
- After finish setup the service, you must click the
CONFIGUREbutton and uncheck therecommended model settings. Clicksubmitand configure again you will be able to change the model name to your deployed DeepSeek model (e.g. DeepSeek-R1-home) . - Then, go to
Settings>Voice assistants. You can then add a new assistant and select theAzure OpenAI Conversationat the Conversation Agent dropdown. This is the default name, you can change it at its integration section. - Happy chatting

Ideally would be a distilled version that runs locally
I saw this today and somehow managed to get it working by adapting code from here:
Itās not perfect yet, but itās working for now ![]()
Just add this to your custom repositories in HACS and configure it:
Maybe a good starting point for further development!
Iām getting api_error when entered my API key.
Do I need to top up my account to use it, or is there free tier for testing?
edit: yes, I topped up with $2 and it works now. Very slow however.
Since DeepSeek is open-source, many large internet companies have deployed DeepSeek services externally. Therefore, I hope the DeepSeek integration can be more open, allowing users to set different URLs and tokens themselves. In comparison, the previously mentioned OpenAI integration is somewhat lacking and appears rather closed
In the newest release I made the Base URL and the Chat Model configurable.
Greetings ![]()
