Spaces:
Sleeping
Sleeping
Commit ·
d255d10
1
Parent(s): 02c2ba4
Fix: use HF_TOKEN or API_KEY for autonomous solver credentials
Browse files
server/config_debug_environment.py
CHANGED
|
@@ -58,12 +58,16 @@ async def generate_fix_async(observation: ConfigDebugObservation, step: int = 1)
|
|
| 58 |
Call LLM agent to generate a fix for the current task.
|
| 59 |
Returns the fixed configuration string.
|
| 60 |
"""
|
| 61 |
-
# Read API credentials
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
print(f"[LLM AGENT] Missing
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
return ""
|
| 68 |
|
| 69 |
# Get model name
|
|
|
|
| 58 |
Call LLM agent to generate a fix for the current task.
|
| 59 |
Returns the fixed configuration string.
|
| 60 |
"""
|
| 61 |
+
# Read API credentials - try multiple env var names for compatibility
|
| 62 |
+
api_key = os.getenv("API_KEY") or os.getenv("HF_TOKEN")
|
| 63 |
+
api_base_url = os.getenv("API_BASE_URL")
|
| 64 |
+
|
| 65 |
+
if not api_key:
|
| 66 |
+
print(f"[LLM AGENT] Missing API_KEY or HF_TOKEN", flush=True)
|
| 67 |
+
return ""
|
| 68 |
+
|
| 69 |
+
if not api_base_url:
|
| 70 |
+
print(f"[LLM AGENT] Missing API_BASE_URL", flush=True)
|
| 71 |
return ""
|
| 72 |
|
| 73 |
# Get model name
|