diff --git a/OKF_Nuxt/decisions/pr-agent.md b/OKF_Nuxt/decisions/pr-agent.md index 3cb9232..542ba4b 100644 --- a/OKF_Nuxt/decisions/pr-agent.md +++ b/OKF_Nuxt/decisions/pr-agent.md @@ -52,6 +52,10 @@ api base https://opencode.ai/inference/go/openai/v1 model table does not know; PR-Agent's default `config.max_model_tokens` still caps the review budget at 32000. +OpenCode Go requires an `x-opencode-session` header. PR-Agent sends the +stable id `pr-agent` through `LITELLM__EXTRA_HEADERS`; without it the +provider rejects the request before it reaches the model. + # Why * One container replaces a per-PR CLI install, binary cache and prompt diff --git a/deploy/pr-agent/.env.example b/deploy/pr-agent/.env.example index 7d2318b..559d328 100644 --- a/deploy/pr-agent/.env.example +++ b/deploy/pr-agent/.env.example @@ -23,3 +23,6 @@ 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"} diff --git a/deploy/pr-agent/README.md b/deploy/pr-agent/README.md index 71f3b4e..19b4029 100644 --- a/deploy/pr-agent/README.md +++ b/deploy/pr-agent/README.md @@ -70,6 +70,9 @@ api base https://opencode.ai/inference/go/openai/v1 the model is not in its token table. The effective review budget is still capped by PR-Agent's default `config.max_model_tokens` of 32000. +OpenCode Go requires an `x-opencode-session` header; PR-Agent sends the +stable id `pr-agent` through `LITELLM__EXTRA_HEADERS`. + The transfer file used during installation was empty, so set the key as root and redeploy: