diff --git a/vm/ai-env/ai.env b/vm/ai-env/ai.env index 8f9818e..e81cb07 100644 --- a/vm/ai-env/ai.env +++ b/vm/ai-env/ai.env @@ -8,6 +8,8 @@ DISCORD_APPROVER_ROLE_ID= # Discord message language of the hitl bot: en or ja (runbooks and prompt free text are written in Japanese) HITL_LANG=ja # experiment design 11.1: candidates gpt-6-astra / gpt-6.1-sol / gpt-6-luna (OpenAI model page 2026-10-08). luna for the first live checks and campaign (budget), compare with sol afterwards +# default when a campaign does not name a model. Since apps 53ff243 the harness passes the campaign's model on every /diagnose +# (console "model" field); ids starting with claude- go to the Claude Messages API (secret selfheal-anthropic-api-key). OPENAI_MODEL=gpt-6.1-sol EMBED_MODEL=text-embedding-3-small HARNESS_URL=http://10.20.0.11:8080 diff --git a/vm/ai-env/apply.sh b/vm/ai-env/apply.sh index 80494a4..7342e43 100755 --- a/vm/ai-env/apply.sh +++ b/vm/ai-env/apply.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # AI VM (10.20.0.12), experiment design 6. Idempotent: first boot (startup script) and `make vm-sync` / `make ai-sync`. # Secrets come from Secret Manager through the VM service account (Terraform design 6.11): -# selfheal-openai-api-key, selfheal-discord-bot-token (registered by the operator), selfheal-k8s-ai-token, selfheal-k8s-ca-cert (make token) +# selfheal-openai-api-key, selfheal-anthropic-api-key, selfheal-discord-bot-token (registered by the operator), selfheal-k8s-ai-token, selfheal-k8s-ca-cert (make token) # The two operator secrets may not exist yet: the services then start degraded (agent /diagnose 503, hitl without # gateway) and this script still succeeds, so the VM can be verified before the keys arrive. # Non-secret settings (Discord IDs, model) are in ai.env (committed); AWS role ARN comes from instance metadata. @@ -20,12 +20,13 @@ SEC=/opt/selfheal/ai/secrets mkdir -p "$SEC"; chmod 700 /opt/selfheal/ai "$SEC" umask 077 secret selfheal-openai-api-key > "$SEC/openai-api-key" +secret selfheal-anthropic-api-key > "$SEC/anthropic-api-key" # Claude Messages API (claude-* model ids); optional until registered secret selfheal-typesafe-api-key > "$SEC/typesafe-api-key" secret selfheal-discord-bot-token > "$SEC/discord-bot-token" secret selfheal-k8s-ai-token > "$SEC/k8s-token" secret selfheal-k8s-ca-cert > "$SEC/k8s-ca.crt" unset TOKEN -for f in openai-api-key discord-bot-token typesafe-api-key; do [ -s "$SEC/$f" ] || echo "note: secret $f is empty (not registered yet); service runs degraded" >&2; done +for f in openai-api-key discord-bot-token typesafe-api-key anthropic-api-key; do [ -s "$SEC/$f" ] || echo "note: secret $f is empty (not registered yet); service runs degraded" >&2; done for f in k8s-token k8s-ca.crt; do [ -s "$SEC/$f" ] || echo "note: $f is empty (run make token on the operator host)" >&2; done chown -R 10002:10002 "$SEC"; chmod 600 "$SEC"/* # agent/hitl run as uid 10002 diff --git a/vm/ai-env/compose.yaml b/vm/ai-env/compose.yaml index 61efec9..81f8127 100644 --- a/vm/ai-env/compose.yaml +++ b/vm/ai-env/compose.yaml @@ -10,6 +10,7 @@ services: RAG_DSN: "postgres://ai:${RAG_DB_PASSWORD}@rag-db:5432/ai?sslmode=disable" HITL_URL: http://hitl:8081 OPENAI_KEY_FILE: /run/secrets/openai-api-key + ANTHROPIC_KEY_FILE: /run/secrets/anthropic-api-key JEV_KEY_FILE: /run/secrets/typesafe-api-key K8S_TOKEN_FILE: /run/secrets/k8s-token K8S_CA_FILE: /run/secrets/k8s-ca.crt diff --git a/vm/ai-env/image.tag b/vm/ai-env/image.tag index 61579d3..e894199 100644 --- a/vm/ai-env/image.tag +++ b/vm/ai-env/image.tag @@ -1 +1 @@ -fa9c08c +53ff243 diff --git a/vm/harness/image.tag b/vm/harness/image.tag index 40703f6..e894199 100644 --- a/vm/harness/image.tag +++ b/vm/harness/image.tag @@ -1 +1 @@ -f8e0aa9 +53ff243