fix: only send auth header when API key is set, show agent panel by default with localStorage persistence
This commit is contained in:
@@ -80,8 +80,9 @@ Only propose actions you can actually execute. Be specific and actionable."""
|
||||
temperature = self.config.get("temperature", 0.7)
|
||||
|
||||
try:
|
||||
headers = {}
|
||||
if self.litellm_api_key:
|
||||
headers = {"Content-Type": "application/json"}
|
||||
# Only add auth header if API key is set and not empty
|
||||
if self.litellm_api_key and self.litellm_api_key.strip():
|
||||
headers["Authorization"] = f"Bearer {self.litellm_api_key}"
|
||||
|
||||
async with httpx.AsyncClient(timeout=60.0) as client:
|
||||
|
||||
Reference in New Issue
Block a user