mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
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:
parent
cd88dde0b9
commit
bf36874ea2
1 changed files with 5 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue