From 5e9a20a3d2511006bedcba5a4a34532df92db809 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 27 Aug 2026 21:39:26 +0300 Subject: [PATCH] Correct what the baibot OpenAI API key comment claims It read "The API key is intentionally not required. Some OpenAI-compatible APIs do not require a key", while validate_config.yml fails when the key is empty and the provider is enabled. Enabling the provider against a keyless endpoint stopped with "You need to define a required configuration setting". baibot is the authority here, and it agrees with the validation rather than the comment: `openai::Config` takes `api_key: String`, whereas the provider whose key really is optional is a different one, `openai_compat`, with `api_key: Option`. So the comment described a real baibot feature, just not this provider's. The validation stays as it is; the comment now says what the code does, and points at the provider the keyless case belongs to. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SEH3vxYSQ5SV4N5z61eyGT --- roles/custom/matrix-bot-baibot/defaults/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-bot-baibot/defaults/main.yml b/roles/custom/matrix-bot-baibot/defaults/main.yml index 7db11b811..c22621b85 100644 --- a/roles/custom/matrix-bot-baibot/defaults/main.yml +++ b/roles/custom/matrix-bot-baibot/defaults/main.yml @@ -405,7 +405,9 @@ matrix_bot_baibot_config_agents_static_definitions_openai_config_extension_yaml: matrix_bot_baibot_config_agents_static_definitions_openai_config_base_url: https://api.openai.com/v1 -# The API key is intentionally not required. Some OpenAI-compatible APIs do not require a key. +# Required when this provider is enabled. +# For OpenAI-compatible APIs that need no key, baibot has a separate `openai_compat` provider, +# which this role does not expose. matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key: "" matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_enabled: true