worktree-citti-arkiver-tur #7

Merged
hjess merged 2 commits from worktree-citti-arkiver-tur into main 2026-10-30 12:28:48 +01:00
Showing only changes of commit c5e4a326e0 - Show all commits

View File

@@ -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 = <<EOT
{{ if keyExists "citti/anthropic_api_key" -}}
ANTHROPIC_API_KEY={{ key "citti/anthropic_api_key" }}
{{- else -}}
ANTHROPIC_AUTH_TOKEN={{ keyOrDefault "citti/claude_oauth_token" "" }}
{{- end }}
EOT
destination = "secrets/app.env"
env = true