Spaces:
Running
Running
File size: 6,288 Bytes
d70e0e0 c392bff 0d2c8bb 79832d5 d910631 0d2c8bb c392bff d70e0e0 d0d3829 8e617b8 d8101d2 8e617b8 d0d3829 14efcb3 | 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | # =============================================================================
# OpenCodeReview β Environment Variables
# =============================================================================
#
# Copy this file to .env and fill in your values:
# cp .env.example .env
#
# Docker Compose automatically loads from .env. For direct CLI usage,
# export vars manually or use a tool like direnv / dotenv.
#
# Required vars are marked [REQUIRED]; all others are optional.
# =============================================================================
# βββ AI Providers ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Optional Cloudflare Workers AI default. Set both account ID and API token.
# CLOUDFLARE_ACCOUNT_ID=your_account_id
# CLOUDFLARE_API_TOKEN=your_workers_ai_token
# CLOUDFLARE_GATEWAY_ID=default # optional Cloudflare AI Gateway route
# CLOUDFLARE_GATEWAY_TOKEN=your_ai_gateway_run_token # optional separate gateway auth token
# CLOUDFLARE_MODEL=@cf/zai-org/glm-4.7-flash
# CLOUDFLARE_DAILY_REQUEST_LIMIT=50
# [REQUIRED - at least one] LLM API key for the AI reviewers.
#
# Primary: Google Gemini API (generous free tier ~1 500 req/day).
# Get one at: https://aistudio.google.com/apikey
GEMINI_API_KEY=AIza_your_key_here
#
# Fallback: Groq API (used when Gemini key is not set).
# Get one at: https://console.groq.com
GROQ_API_KEY=gsk_your_key_here
# βββ GitHub API ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# [REQUIRED] GitHub personal access token with "repo" scope.
# Used for:
# - Fetching PR diffs and changed files
# - Posting review comments
# - Fetching evaluation data (eval_data/fetcher.py)
# - Building vector-store indexes from repo file trees
#
# Create one at: https://github.com/settings/tokens
GITHUB_TOKEN=ghp_your_token_here
# βββ GitHub OAuth (Device Flow) ββββββββββββββββββββββββββββββββββββββββββββββ
# [Optional] OAuth App client ID for interactive login via:
# opencodereview auth login
#
# Register a new OAuth App at https://github.com/settings/developers
# and enable Device Flow in the app settings.
# GITHUB_OAUTH_CLIENT_ID=Iv23li_your_client_id_here
# βββ Observability: LangSmith (Tracing) ββββββββββββββββββββββββββββββββββββββ
# [Optional] LangSmith enables full run tracing via LangChain/LangGraph.
# Get a key at: https://smith.langchain.com
# LANGCHAIN_API_KEY=lsv2_your_key_here
#
# [Optional] LangSmith project name (default: "opencodereview")
# LANGCHAIN_PROJECT=opencodereview
# βββ Observability: Langfuse (Tracing) ββββββββββββββββββββββββββββββββββββββ
# [Optional] Langfuse provides an alternative tracing backend.
# Both public and secret keys are required to enable it.
# Sign up at: https://cloud.langfuse.com
# LANGFUSE_PUBLIC_KEY=pk_your_public_key_here
# LANGFUSE_SECRET_KEY=sk_your_secret_key_here
#
# [Optional] Langfuse host URL (default: https://cloud.langfuse.com)
# For self-hosted: http://localhost:3000
# LANGFUSE_HOST=https://cloud.langfuse.com
# βββ Fallback AI Provider ββββββββββββββββββββββββββββββββββββββββββββββββββββ
# [Optional] Anthropic API key (used as fallback via config.py/Settings).
# OPENCODEREVIEW_ANTHROPIC_KEY=sk-ant_your_key_here
# βββ Alerting Webhooks βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# [Optional] Webhook URLs for the smoke-test alerting monitor
# (scripts/alert.py). Set at least one to receive notifications when the
# smoke-test score deviates significantly from baseline.
#
# Create a Discord webhook at: Server Settings β Integrations β Webhooks
# DISCORD_WEBHOOK=https://discord.com/api/webhooks/your_webhook_id
#
# Create a Slack webhook at: https://api.slack.com/messaging/webhooks
# SLACK_WEBHOOK=https://hooks.slack.com/services/your_webhook
# βββ Hugging Face Spaces (Deployment) βββββββββββββββββββββββββββββββββββββββ
# [Optional] Used by .github/workflows/deploy-hf.yml to sync to HF Spaces.
# Get a token at: https://huggingface.co/settings/tokens
# HF_TOKEN=hf_your_token_here
# βββ Server ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# [Optional] Port for the Gradio web UI (default: 7860).
# HF Spaces sets this automatically.
# PORT=7860
# Durable job/checkpoint path. Point this at a mounted persistent volume in a
# hosted deployment; the default local file is ephemeral on most containers.
# OPENCODEREVIEW_DB_PATH=/data/opencodereview/checkpoints.db
# Optional Supabase Postgres URL for the durable review-jobs store.
# SUPABASE_DB_URL=postgresql://postgres:<password>@db.<project-ref>.supabase.co:5432/postgres
# βββ API security βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# [Recommended for any public deployment] Require X-API-Key on React/API
# requests. Set both values in the deployment secret configuration.
# OCR_REQUIRE_AUTH=true
# OCR_API_KEY=replace_with_a_long_random_value
#
# [Recommended] Comma-separated browser origins allowed to call the API.
# OCR_ALLOWED_ORIGINS=https://your-frontend.example.com
# Reviewer wall-clock budgets, including any response-format repair.
# Fast mode reduces input/output size; it does not impose a hidden 45s cap.
# OCR_REVIEWER_TIMEOUT_SECONDS=90
# OCR_FAST_REVIEWER_TIMEOUT_SECONDS=90
|