File size: 785 Bytes
2adc8b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
import sys
import json

# Add backend to path
_BACKEND = os.path.join(os.getcwd(), "backend")
if _BACKEND not in sys.path:
    sys.path.insert(0, _BACKEND)

print("--- OpenEnv Debug ---")
print(f"API_BASE_URL: {os.getenv('API_BASE_URL')}")
print(f"API_KEY: {'[PRESENT]' if os.getenv('API_KEY') else '[MISSING]'}")
print(f"HF_TOKEN: {'[PRESENT]' if os.getenv('HF_TOKEN') else '[MISSING]'}")
print(f"MODEL_NAME: {os.getenv('MODEL_NAME')}")

try:
    from llm_proxy import get_llm_client
    client = get_llm_client()
    print(f"LLM Mode: {client.mode}")
    if client.mode == "proxy":
        print(f"Proxy URL: {client.api_base_url}")
        print(f"Model: {client.model_name}")
except Exception as e:
    print(f"Error initializing proxy: {e}")

print("--- End Debug ---")