diff --git a/servers/gcp/cloud-run-soma.tf b/servers/gcp/cloud-run-soma.tf index 976eed1..0937ad5 100644 --- a/servers/gcp/cloud-run-soma.tf +++ b/servers/gcp/cloud-run-soma.tf @@ -153,6 +153,20 @@ resource "google_secret_manager_secret_version" "soma_key_secret" { secret_data = "neuron-soma-key-secret-2026-change-me" } +resource "google_secret_manager_secret" "soma_anthropic_api_key" { + secret_id = "soma-anthropic-api-key" + project = var.project_id + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "soma_anthropic_api_key" { + secret = google_secret_manager_secret.soma_anthropic_api_key.id + secret_data = "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" +} + # ── Cloud Run Service — us-central1 ────────────────────────────────────────── resource "google_cloud_run_v2_service" "soma_us" { @@ -248,6 +262,31 @@ resource "google_cloud_run_v2_service" "soma_us" { value = "https://ai.neurontechnologies.ai" } + env { + # vLLM backend — RunPod pod Neuron-R1 (DeepSeek-R1-Distill-Llama-70B). + # Update to a new pod ID when the RunPod pod is cycled. + name = "LLM_BACKEND_URL" + value = "https://08axh3kk1oatu2-19123.proxy.runpod.net" + } + + env { + # Anthropic API key — when set, soma routes chat completions to Anthropic + # instead of trying to provision a GCE GPU node. + name = "ANTHROPIC_API_KEY" + value_source { + secret_key_ref { + secret = google_secret_manager_secret.soma_anthropic_api_key.secret_id + version = "latest" + } + } + } + + env { + # Anthropic model to use for the "neuron" model alias. + name = "ANTHROPIC_MODEL" + value = "claude-sonnet-4-5" + } + ports { container_port = 8080 name = "http1" @@ -291,6 +330,7 @@ resource "google_cloud_run_v2_service" "soma_us" { google_secret_manager_secret_version.soma_operator_key, google_secret_manager_secret_version.soma_node_secret, google_secret_manager_secret_version.soma_key_secret, + google_secret_manager_secret_version.soma_anthropic_api_key, ] }