From c5e4a326e0d36a79d672d05ab1408cb8a002be4e Mon Sep 17 00:00:00 2001 From: Henrik Jess Nielsen Date: Fri, 30 Oct 2026 12:19:45 +0100 Subject: [PATCH] chore(deploy): prefer a dedicated API key over the shared OAuth token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OAuth token shares one rate budget across everything on the subscription (incl. interactive Claude Code sessions), so citti's translation is almost always throttled while coding — hence the page staying German. Template now emits ANTHROPIC_API_KEY from citti/anthropic_api_key when set (its own rate budget, no contention), else the OAuth token. Only one var is written so an empty key can't shadow the token. --- citti.nomad | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/citti.nomad b/citti.nomad index c0214ac..e6ac13e 100644 --- a/citti.nomad +++ b/citti.nomad @@ -97,15 +97,21 @@ job "citti" { HOST = "0.0.0.0" } - # Claude OAuth token for DA translation + AI offer matching. Set as - # ANTHROPIC_AUTH_TOKEN (the SDK reads it as a Bearer token); the app adds - # the required anthropic-beta: oauth-2025-04-20 header. We deliberately do - # NOT set ANTHROPIC_API_KEY — even an empty value would shadow the token. - # keyOrDefault keeps it empty (not a deploy failure) if the KV is unset — - # offers then stay German with heuristic matching. + # Claude credential for DA translation + AI offer matching. + # Prefer a dedicated API key (citti/anthropic_api_key) — its own rate + # budget, so citti doesn't compete with interactive Claude Code sessions + # on the same subscription. Else fall back to the OAuth token, set as + # ANTHROPIC_AUTH_TOKEN (the app adds the oauth-2025-04-20 beta header). + # Only ONE var is written: an empty ANTHROPIC_API_KEY would shadow the + # token, so we never emit it unless the key actually exists. If neither + # is set the token var is empty and offers stay German (heuristic match). template { data = <