Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/bansalbhunesh_parth.json
T

1 line
6.0 KiB
JSON

{"repo": "bansalbhunesh/parth", "files": {"render.yaml": {"1837eb96c94c291016fad578fbc486dae2afe1e8": {"t": 1785674400.5382593, "n": 5814, "h": "2f04117d9f36862d", "c": "services:\n - type: web\n name: pramaan-backend\n # Docker runtime (was: runtime: python). The native Python buildpack cannot\n # apt-install system packages, so scanned-PDF / image OCR (which needs the\n # `tesseract` binary) was a silent no-op on the hosted demo. Dockerfile.backend\n # apt-installs tesseract-ocr, so building from it makes OCR actually work here.\n # NOTE (deploy): after merging this, redeploy and confirm the live URL still\n # serves (GET /health, and GET /ocr-check should report \"status\":\"ready\").\n runtime: docker\n dockerfilePath: ./Dockerfile.backend\n dockerContext: .\n plan: free\n envVars:\n # --- LLM via Google's native Gemini API (free tier) ---\n # The ONLY thing to set by hand in the Render dashboard is GEMINI_API_KEY\n # (an AI Studio key). gemini-2.5-flash is on the free tier; gemini-2.0-flash\n # may return 429 on free keys, so we pin 2.5-flash. After the key is set,\n # verify with GET /llm-check (it makes one real call and reports errors).\n # PRAMAAN_LLM_TIMEOUT caps the wait before the rule-based fallback kicks in.\n - key: PRAMAAN_LLM\n value: gemini\n - key: GEMINI_MODEL\n value: gemini-2.5-flash\n - key: PRAMAAN_LLM_TIMEOUT\n value: \"60\"\n # Per-provider wall-clock budget INSIDE the request budget above. A slow\n # (not erroring) free-tier leg used to eat the whole 60s so failover\n # never fired (observed live 2026-07-18); with a 30s leg budget the worst\n # case is one slow leg (30s) + the funded gateway leg (~24s measured)\n # still inside the request budget. \"0\" disables the per-leg bound.\n # Dashboard-managed like everything here — set it there too, then\n # Manual Deploy.\n - key: PRAMAAN_LLM_LEG_TIMEOUT\n value: \"30\"\n # Explicit, deterministic failover order for the hosted demo. Ollama is a\n # LOCAL leg (needs a local daemon), so it is intentionally NOT listed here\n # — hosted Render has no Ollama, and it stays filtered out regardless.\n # The env keys below use the older OPENAI_*/GROQ_* names; the code also\n # accepts the canonical QWEN_GATEWAY_*/CLAUDE_* names (see .env.example).\n # Gateway leg FUNDED via aicredits.in (2026-07-06, key verified live) and\n # pinned to google/gemini-3.1-flash-lite — the exact benchmark-featured\n # model — so the order gemini,qwen,groq puts the featured configuration (the\n # first failover lands on the featured configuration). Claude is deliberately\n # NOT in the order — no key exists; re-add it here AND in the dashboard\n # only when a CLAUDE_API_KEY is actually set. The paid leg\n # is spend-guarded by OPENAI_BUDGET_PER_HOUR below. NOTE: the live\n # service's env is dashboard-managed - edits here do NOT auto-apply;\n # change values in the Render dashboard as well, then Manual Deploy and\n # confirm with /llm-check?probe_all=1.\n - key: PRAMAAN_LLM_PROVIDER_ORDER\n value: gemini,qwen,groq\n - key: GEMINI_API_KEY\n sync: false # set this secret in the Render dashboard\n # --- Automatic failover leg: OpenAI-compatible gateway (aicredits.in) ---\n # Gemini stays PRIMARY (PRAMAAN_LLM=gemini above). If Gemini quota/429s,\n # times out, or returns unparseable JSON, the chain fails over here, then\n # to Groq, then the rule-engine floor. Only active once OPENAI_API_KEY is\n # set — until then the leg is filtered out and behaviour is unchanged.\n - key: OPENAI_BASE_URL\n value: https://aicredits.in/v1\n - key: OPENAI_MODEL\n value: google/gemini-3.1-flash-lite # the benchmark-featured model\n - key: OPENAI_JSON_MODE\n value: \"1\"\n - key: OPENAI_MAX_TOKENS\n value: \"4000\" # gateways default low and truncate multi-finding JSON\n # Spend guard for the PAID leg: at most this many gateway calls per hour\n # (process-local sliding window). Exhausted budget == leg failure -> the\n # chain walks on to Groq / the free rule floor; the demo never breaks,\n # the bill stays capped (~Rs 0.3 per reconcile-sized call at current\n # aicredits pricing => worst case a few rupees/hour).\n - key: OPENAI_BUDGET_PER_HOUR\n value: \"30\"\n - key: OPENAI_API_KEY\n sync: false # set the aicredits key (sk-live-...) in the Render dashboard\n # --- Second failover leg: Groq (free tier, its own quota) for full\n # insurance. Chain: gemini -> qwen gateway -> groq -> rule floor. Groq\n # has good recall but a mild over-flag tendency, so it sits behind the\n # cleaner Qwen. Inert until GROQ_API_KEY is set. ---\n - key: GROQ_MODEL\n value: llama-3.3-70b-versatile\n - key: GROQ_API_KEY\n sync: false # set the Groq key (gsk_...) in the Render dashboard\n # --- Public-demo security hardening (Phase 5) ---\n # Rate limiting ON with generous per-hour caps (process-local; single\n # instance). Demo token auth OFF by default so judges get an open demo —\n # flip DEMO_AUTH_ENABLED=true and set DEMO_AUTH_TOKEN (as a synced secret)\n # only if the demo starts getting abused. See docs/SECURITY_DEMO_RUNBOOK.md.\n - key: PRAMAAN_RATE_LIMIT_ENABLED\n value: \"true\"\n - key: PRAMAAN_TRUST_PROXY_HEADERS\n value: \"true\"\n - key: PRAMAAN_CORS_ORIGINS\n value: \"https://parth-tan.vercel.app\"\n - key: PRAMAAN_ANALYSIS_LIMIT_PER_HOUR\n value: \"20\"\n - key: PRAMAAN_UPLOAD_LIMIT_PER_HOUR\n value: \"10\"\n - key: PRAMAAN_DEEP_PROBE_LIMIT_PER_HOUR\n value: \"3\"\n - key: PRAMAAN_MAX_UPLOAD_MB\n value: \"20\"\n - key: DEMO_AUTH_ENABLED\n value: \"false\"\n # - key: DEMO_AUTH_TOKEN\n # sync: false # set only if DEMO_AUTH_ENABLED is flipped to true\n"}}}}