From bf36874ea2fa5c52b78fd0edf4cde43dfd7bff57 Mon Sep 17 00:00:00 2001 From: bahtya Date: Thu, 9 Apr 2026 02:47:13 +0800 Subject: [PATCH] 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 --- litellm/llms/lemonade/chat/transformation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litellm/llms/lemonade/chat/transformation.py b/litellm/llms/lemonade/chat/transformation.py index 168d51a16d8..95f39a5d55b 100644 --- a/litellm/llms/lemonade/chat/transformation.py +++ b/litellm/llms/lemonade/chat/transformation.py @@ -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(