diff --git a/apps/gittensory-ui/src/routes/docs.self-hosting-ai-providers.tsx b/apps/gittensory-ui/src/routes/docs.self-hosting-ai-providers.tsx index fb694c42f6..8711602164 100644 --- a/apps/gittensory-ui/src/routes/docs.self-hosting-ai-providers.tsx +++ b/apps/gittensory-ui/src/routes/docs.self-hosting-ai-providers.tsx @@ -166,6 +166,74 @@ AI_ON_MERGE=either`} ]} /> +

Claude Code (subscription)

+

+ No API key — claude-code runs your existing Claude subscription through the{" "} + claude CLI. Generate a long-lived token once with{" "} + claude setup-token and store it as CLAUDE_CODE_OAUTH_TOKEN. +

+ +CLAUDE_AI_EFFORT=medium`} + /> +

+ Rotating it: when the subscription's usage limit resets or the token needs + replacing, run claude setup-token again and paste the new value into{" "} + .env. CLAUDE_CODE_OAUTH_TOKEN is baked into the container at + creation time, so a plain restart keeps serving the old value — recreate the service + instead: +

+ + +

Codex (subscription)

+

+ Codex has no equivalent of claude setup-token. Instead of an environment + variable, it stores an OAuth credential file, auth.json. Authenticate against + the running container so the file lands on the volume the image expects ( + /data/codex, mounted at ~/.codex): +

+ +

+ This also needs the explicit opt-in shown in the fallback example above ( + GITTENSORY_ENABLE_UNSAFE_CODEX_REVIEWER=1) — see the Subscription CLI safety + note below for why it defaults to off. +

+ + Codex reads auth.json fresh on every review — each review spawns a new{" "} + codex subprocess. Once codex auth succeeds, the very next review + authenticates correctly; there is no service to recreate and no env var to change. + + +

Recognizing a stale or missing credential

+

+ Both subscription CLIs fail loudly in the self-host logs instead of silently degrading the + review: +

+ +

Subscription CLI safety

Subscription CLIs store credentials on disk. Do not mount a writable or prompt-readable CLI