Disable Initial Prompt Task for en and es Locales
diff --git a/.github/workflows/deploy-to-node.yaml b/.github/workflows/deploy-to-node.yaml
index bbb04f7b3a..4a16cffd4c 100644
--- a/.github/workflows/deploy-to-node.yaml
+++ b/.github/workflows/deploy-to-node.yaml
@@ -38,6 +38,7 @@ jobs:
       S3_REGION: ${{ secrets.S3_REGION }}
       AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
       AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
+      INIT_PROMPT_DISABLED_LANGS: ${{ vars.INIT_PROMPT_DISABLED_LANGS }}
       MAX_ACTIVE_TREES: ${{ vars.MAX_ACTIVE_TREES }}
       MAX_INITIAL_PROMPT_REVIEW: ${{ vars.MAX_INITIAL_PROMPT_REVIEW }}
       MAX_TREE_DEPTH: ${{ vars.MAX_TREE_DEPTH }}
diff --git a/ansible/deploy-to-node.yaml b/ansible/deploy-to-node.yaml
index a690aa45e8..7a0c70e956 100644
--- a/ansible/deploy-to-node.yaml
+++ b/ansible/deploy-to-node.yaml
@@ -112,6 +112,9 @@
             "{{ lookup('ansible.builtin.env', 'SKIP_TOXICITY_CALCULATION') |
             default('true', true) }}"
           OFFICIAL_WEB_API_KEY: "{{ web_api_key }}"
+          TREE_MANAGER__INIT_PROMPT_DISABLED_LANGS:
+            "{{ lookup('ansible.builtin.env', 'INIT_PROMPT_DISABLED_LANGS') |
+            default('', true) }}"
           TREE_MANAGER__MAX_ACTIVE_TREES:
             "{{ lookup('ansible.builtin.env', 'MAX_ACTIVE_TREES') |
             default('10', true) }}"
diff --git a/backend/oasst_backend/config.py b/backend/oasst_backend/config.py
index 2edd061601..e3d37c7ba0 100644
--- a/backend/oasst_backend/config.py
+++ b/backend/oasst_backend/config.py
@@ -149,6 +149,12 @@ class TreeManagerConfiguration(BaseModel):
     """Maximum number of prompts in prompt_lottery_waiting state per language. If this value
     is exceeded no new initial prompt tasks for that language are generated."""
 
+    init_prompt_disabled_langs: str = ""
+
+    @property
+    def init_prompt_disabled_langs_list(self) -> list[str]:
+        return self.init_prompt_disabled_langs.split(",")
+
 
 class Settings(BaseSettings):
     PROJECT_NAME: str = "open-assistant backend"
diff --git a/backend/oasst_backend/tree_manager.py b/backend/oasst_backend/tree_manager.py
index 1161240c0e..59ef964b35 100644
--- a/backend/oasst_backend/tree_manager.py
+++ b/backend/oasst_backend/tree_manager.py
@@ -367,8 +367,12 @@ def determine_task_availability(self, lang: str) -> dict[protocol_schema.TaskReq
             lang = "en"
             logger.warning("Task availability request without lang tag received, assuming lang='en'.")
 
+        if lang in self.cfg.init_prompt_disabled_langs_list:
+            num_missing_prompts = 0
+        else:
+            num_missing_prompts = self._prompt_lottery(lang=lang, max_activate=1)
+
         self._auto_moderation(lang=lang)
-        num_missing_prompts = self._prompt_lottery(lang=lang, max_activate=1)
         extendible_parents, _ = self.query_extendible_parents(lang=lang)
         prompts_need_review = self.query_prompts_need_review(lang=lang)
         replies_need_review = self.query_replies_need_review(lang=lang)
@@ -718,7 +722,7 @@ async def handle_interaction(self, interaction: protocol_schema.AnyInteraction)
                     logger.info(
                         f"TreeManager: Inserting new tree state for initial prompt {message.id=} [{message.lang}]"
                     )
-                    self._insert_default_state(message.id, message.lang)
+                    self._insert_default_state(message.id, lang=message.lang)
 
                 if not settings.DEBUG_SKIP_EMBEDDING_COMPUTATION:
                     try:

To help clear the prompt backlog, as per https://github.com/LAION-AI/Open-Assistant/issues/1659, and Andreas's suggestions in https://github.com/LAION-AI/Open-Assistant/pull/1824, this adds the option to disable initial prompts for configured languages.