Spaces:
Sleeping
Sleeping
| 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 ---") | |