From c56fb4616b5938045fb8fddaf787de50196129f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Sj=C3=B6green?= Date: Fri, 8 Aug 2025 16:42:19 +0200 Subject: [PATCH 1/2] feat(tandoor): Support configuring LLMs --- tandoor_recipes/DOCS.md | 5 ++++- tandoor_recipes/README.md | 5 +++++ tandoor_recipes/config.json | 3 +++ tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tandoor_recipes/DOCS.md b/tandoor_recipes/DOCS.md index ebb727a19..9fe774519 100644 --- a/tandoor_recipes/DOCS.md +++ b/tandoor_recipes/DOCS.md @@ -14,6 +14,9 @@ Optional : "POSTGRES_USER": "str?", # Needed for postgresql_external "POSTGRES_PASSWORD": "str?", # Needed for postgresql_external "POSTGRES_DB": "str?" # Needed for postgresql_external + "AI_MODEL_NAME": "str?", # Used when configuring llm integration + "AI_API_KEY": "str?", # Used when configuring llm integration + "AI_RATELIMIT": "int?", # Used when configuring llm integration "externalfiles_folder": "str?" # a folder that you want to map in to tandoor. Not needed as /share/ and /media/ are mapped. This folder will be created if it doesn't already exist. ``` This add-on now uses Tandoor's integrated Nginx server and exposes port 80 (mapped to 9928 by default). @@ -23,7 +26,7 @@ Mariadb is a popular addon in the home assistant community, however it is not su ### Debug mode This is the "Environment" setting. -0 is normal mode +0 is normal mode 1 is debug mode. ### Authentication diff --git a/tandoor_recipes/README.md b/tandoor_recipes/README.md index c806fa3c5..a6d569ad8 100644 --- a/tandoor_recipes/README.md +++ b/tandoor_recipes/README.md @@ -46,6 +46,9 @@ Complete documentation: https://docs.tandoor.dev/install/docker/ | `POSTGRES_USER` | str | | PostgreSQL username (required for postgresql_external) | | `POSTGRES_PASSWORD` | str | | PostgreSQL password (required for postgresql_external) | | `POSTGRES_DB` | str | | PostgreSQL database name (required for postgresql_external) | +| `AI_MODEL_NAME` | str | | Used for configuring LLMs, supported providers can be found [here](https://docs.litellm.ai/docs/providers/) | +| `AI_API_KEY` | str | | API key for accessing LLMs | +| `AI_RATELIMIT` | int | | Ratelimit for LLM access | ### Example Configuration @@ -61,6 +64,8 @@ externalfiles_folder: "/config/addons_config/tandoor_recipes/externalfiles" # POSTGRES_USER: "tandoor" # POSTGRES_PASSWORD: "secure_password" # POSTGRES_DB: "tandoor_recipes" +# AI_MODEL_NAME: "anthropic/claude-4" +# AI_API_KEY: "SECRET KEY" ``` ## Installation diff --git a/tandoor_recipes/config.json b/tandoor_recipes/config.json index 5679dfb5e..6bf16345c 100644 --- a/tandoor_recipes/config.json +++ b/tandoor_recipes/config.json @@ -107,6 +107,9 @@ "POSTGRES_PORT": "str?", "POSTGRES_USER": "str?", "SECRET_KEY": "str", + "AI_MODEL_NAME": "str?", + "AI_API_KEY": "str?", + "AI_RATELIMIT": "int?", "externalfiles_folder": "str?" }, "services": [ diff --git a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh index 3617b6c74..92612c6c9 100755 --- a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh +++ b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh @@ -10,6 +10,9 @@ set -e export ALLOWED_HOSTS=$(bashio::config 'ALLOWED_HOSTS') && bashio::log.blue "ALLOWED_HOSTS=$ALLOWED_HOSTS" export SECRET_KEY=$(bashio::config 'SECRET_KEY') && bashio::log.blue "SECRET_KEY=$SECRET_KEY" export DEBUG=$(bashio::config 'DEBUG') && bashio::log.blue "DEBUG=$DEBUG" +export AI_MODEL_NAME=$(bashio::config 'AI_MODEL_NAME') && bashio::log.blue "AI_MODEL_NAME=$AI_MODEL_NAME" +export AI_API_KEY=$(bashio::config 'AI_API_KEY') && bashio::log.blue "AI_API_KEY=$AI_API_KEY" +export AI_RATELIMIT=$(bashio::config 'AI_RATELIMIT') && bashio::log.blue "AI_RATELIMIT=$AI_RATELIMIT" CSRF_TRUSTED_ORIGINS="http://localhost" for element in ${ALLOWED_HOSTS//,/ }; do # Separate comma separated values From 0bf6a436d52dd508b691f00c842f34d544762ba0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:18:59 +0200 Subject: [PATCH 2/2] Update config.json --- tandoor_recipes/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tandoor_recipes/config.json b/tandoor_recipes/config.json index 6bf16345c..7aadd316b 100644 --- a/tandoor_recipes/config.json +++ b/tandoor_recipes/config.json @@ -118,6 +118,6 @@ "slug": "tandoor_recipes", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "2.0.1", + "version": "2.0.1-2", "webui": "http://[HOST]:[PORT:80]" }