fix(lemonade): use configured api_key instead of hardcoded value

The Lemonade provider ignores the api_key parameter and always uses
the hardcoded string 'lemonade'. This prevents authentication when
Lemonade Server is configured with a custom API key via LEMONADE_API_KEY.

Fixes #25363

Signed-off-by: bahtya <bahtyar153@qq.com>
This commit is contained in:
bahtya 2026-04-09 02:47:13 +08:00 • committed by Bahtya
parent cd88dde0b9
commit bf36874ea2

View file

@ -111,7 +111,11 @@ class LemonadeChatConfig(OpenAILikeChatConfig):
or "http://localhost:8000/api/v1"
) # type: ignore
# Lemonade doesn't check the key
key = "lemonade"
key = (
api_key
or get_secret_str("LEMONADE_API_KEY")
or "lemonade"
)
return api_base, key
def transform_response(