Commit c723cf43 authored by Your Name's avatar Your Name

Fix litellm to generate fake API key if none provided

- Don't check environment for OPENAI_API_KEY
- Use fake key directly in LiteLLMBackend if no key passed
parent eb9e8d6a
...@@ -77,7 +77,9 @@ class LiteLLMBackend: ...@@ -77,7 +77,9 @@ class LiteLLMBackend:
model_manager: Reference to MultiModelManager for resolving aliases model_manager: Reference to MultiModelManager for resolving aliases
""" """
self.model = model self.model = model
self.api_key = api_key or os.environ.get("OPENAI_API_KEY") # Use provided API key, or generate a fake one if not provided
# This allows litellm to proceed without requiring an API key
self.api_key = api_key if api_key else "fake-key-for-local-testing"
self.base_url = base_url self.base_url = base_url
self.context_window = context_window self.context_window = context_window
self.model_manager = model_manager self.model_manager = model_manager
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment