Files
CV_Site_Nuxt/deploy/pr-agent/.env.example
T
Noel Sabia a43134ad83
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Lint + typecheck (pull_request) Successful in 1m8s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 7s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / Dockerfile lint (droast) (pull_request) Successful in 5s
fix(ci): repair PR-Agent model routing
OpenCode Go rejects requests without x-opencode-session, and LiteLLM needs the openai/ prefix on the fallback model. Supply the header through LITELLM__EXTRA_HEADERS, keep the prefixed fallback, and stop auto-running /improve so a PR gets one review plus /describe.
2026-10-30 21:14:15 +01:00

33 lines
1.2 KiB
Bash

# Copy to .env on server0 and fill in; never commit .env.
# chmod 600 .env
CONFIG__GIT_PROVIDER=gitea
# The API is reached over the Docker network; links in comments use the
# public URL instead.
GITEA__URL=http://gitea:3000
GITEA__WEB_URL=https://git.noelsabia.dev
# Bot user pr-agent, scoped token (read:repository, write:issue, read:user).
# Not the admin account and not a workflow secret.
GITEA__PERSONAL_ACCESS_TOKEN=
# Secret configured on the Gitea webhook. Required: the server rejects
# unsigned webhooks with HTTP 403.
GITEA__WEBHOOK_SECRET=
# OpenCode Go exposes an OpenAI-compatible chat-completions endpoint, so
# PR-Agent reaches it through its openai provider with a custom base URL.
CONFIG__MODEL=openai/glm-5.3-flash
CONFIG__FALLBACK_MODELS=["openai/glm-5.3"]
CONFIG__CUSTOM_MODEL_MAX_TOKENS=128000
OPENAI__API_BASE=https://opencode.ai/inference/go/openai/v1
OPENAI__KEY=
# OpenCode Go requires a session id header; a stable id is enough here.
LITELLM__EXTRA_HEADERS={"x-opencode-session":"pr-agent"}
# Auto commands on PR open. /improve remains available as a comment command;
# leaving it in the auto list adds a second model call to every PR.
GITEA__PR_COMMANDS=["/describe","/review"]