Преглед изворни кода

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<String>`. 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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEH3vxYSQ5SV4N5z61eyGT
renovate/molecule-plugins-26.x
Slavi Pantaleev пре 9 часа
родитељ
комит
5e9a20a3d2
1 измењених фајлова са 3 додато и 1 уклоњено
  1. +3
    -1
      roles/custom/matrix-bot-baibot/defaults/main.yml

+ 3
- 1
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


Loading…
Откажи
Сачувај