# openenv.yaml — CodeRescue deployment config (Hugging Face Spaces / Docker) title: CodeRescue API emoji: 🛠️ colorFrom: blue colorTo: purple sdk: docker app_port: 7860 pinned: false # ── Environment Variables ────────────────────────────────────────────────────── # Set secrets via the Space's Settings → Variables and Secrets panel. # Values listed here are safe public defaults only. env: # HuggingFace Inference Router base URL API_BASE_URL: "https://router.huggingface.co/v1" # Model served through the router MODEL_NAME: "Qwen/Qwen2.5-Coder-7B-Instruct" # Comma-separated list of allowed frontend origins (CORS) ALLOWED_ORIGINS: "https://sumit989bishnoi-crypto.github.io" # Server port (must match app_port above) PORT: "7860" # ── Secrets (set in Space Settings, never commit values here) ───────────────── secrets: # Primary API key — checked first - API_KEY # Fallback HuggingFace token — used if API_KEY is not set - HF_TOKEN # ── Routes exposed by app.py ─────────────────────────────────────────────────── # GET / → status check {"name","version","status"} # GET /health → health check {"status":"ok"} # POST /analyze → main endpoint {"code": "..."} # POST /reset → soft reset {"status":"success"} # POST /openenv/reset → alias reset {"status":"success"} # ── OpenEnv Spec ─────────────────────────────────────────────────────────────── environment: name: CodeDebugEnv description: Environment where an AI agent fixes buggy code action_space: type: dict fields: fixed_code: string observation_space: type: dict fields: code: string difficulty: string reward: type: float range: [0.0, 1.0]