diff --git a/.env.example b/.env.example index 697c3a0..0c72f67 100644 --- a/.env.example +++ b/.env.example @@ -205,9 +205,10 @@ CLOUDFLARE_TUNNEL_TOKEN= CLOUDFLARE_DNS_API_TOKEN= # --- Third-party API keys (backend) ------------------------------------------ -# CLAUDE_API_KEY is used by the python service, which makes every Claude call -# in the stack: the rowing photo reader, the job posting reader and the email -# pipeline's classifier. The backend no longer calls Claude itself. +# CLAUDE_API_KEY is used by the python service, which makes the main site's +# Claude calls: the rowing photo reader, the job posting reader and the email +# pipeline's classifier. The backend no longer calls Claude itself. The jobs +# and usaco containers get the same key for their own calls. CLAUDE_API_KEY= # Which model those calls use: claude-haiku-4-5 (cheapest), claude-sonnet-5-5 # (the default when blank) or claude-opus-5-5. Recreate the python service @@ -243,6 +244,11 @@ USACO_GIT_TOKEN= # (http://usaco:8080/usaco/api/hooks/gitea). Blank turns the hook off and # the site only pulls every 10 minutes. Generate with `openssl rand -hex 32`. USACO_WEBHOOK_SECRET= +# Model for the problem explanations (the admin's Explain button), separate +# from CLAUDE_MODEL because those are long, considered answers rather than +# extraction. Blank means claude-opus-5-5. The key is CLAUDE_API_KEY above; +# without it the button is off and the rest of the site works. +USACO_CLAUDE_MODEL= # --- Activity tracker (/tracker/) -------------------------------------------- # An image built and published by the ccp repo's CI. Blank runs :latest; set a diff --git a/docker-compose.yml b/docker-compose.yml index d8cda07..7c5fe0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -555,7 +555,9 @@ services: # It has no database: git is its store. It keeps a clone of adamf/usaco in # ./usaco-data, pulled over the Docker network when Gitea's push webhook # fires (USACO_WEBHOOK_SECRET signs it), and commits the admin's edits - # (status, link, notes) back with USACO_GIT_TOKEN. ./usaco-data holds only + # (status, link, notes, statement, explanations) back with USACO_GIT_TOKEN. + # CLAUDE_API_KEY powers the admin's Explain button (USACO_CLAUDE_MODEL picks + # the model; blank is claude-opus-5-5). ./usaco-data holds only # that clone, so deleting it is safe; the image runs as uid 1000, so the # directory must be owned by it. # @@ -575,6 +577,8 @@ services: - GIT_TOKEN=${USACO_GIT_TOKEN:-} - WEBHOOK_SECRET=${USACO_WEBHOOK_SECRET:-} - AUTH_VALIDATE_URL=http://${BACKEND_HOST}:${BACKEND_PORT}/auth/validate-admin + - CLAUDE_API_KEY=${CLAUDE_API_KEY:-} + - CLAUDE_MODEL=${USACO_CLAUDE_MODEL:-} volumes: - ./usaco-data:/data