commit ccc3a2a5625e8b92520f4926d01ac1574c3077ea
Author: Ben Sima <ben@bensima.com>
Date: Wed Dec 31 10:37:07 2025
Remove OpenRouter, use pi default auth (Claude Max)
- pi-code.sh: Remove OpenRouter provider/api-key args
- pi-review.sh: Same
- ava-env.sh: Remove /run/secrets/ava.env sourcing, /usr/local/bin PATH
pi now uses default auth from ~/.pi/ which uses Claude Max subscription
instead of OpenRouter (significantly cheaper).
Task-Id: t-302.3
diff --git a/Omni/Ide/ava-env.sh b/Omni/Ide/ava-env.sh
index 8f6cd835..50dc77b6 100755
--- a/Omni/Ide/ava-env.sh
+++ b/Omni/Ide/ava-env.sh
@@ -5,27 +5,14 @@
# pi-orchestrate.sh, pi-code.sh, and pi-review.sh.
#
# Sets up:
-# - PATH (for node/pi at /usr/local/bin)
-# - API keys from /run/secrets/ava.env
-# - direnv/nix-shell environment (for bild, lint, etc.)
+# - direnv/nix-shell environment (for bild, lint, pi, etc.)
# - CODEROOT (repository root)
# - Git user.name/email for commits
#
# Usage:
# source "$(dirname "${BASH_SOURCE[0]}")/ava-env.sh"
-# Ensure /usr/local/bin is in PATH for node/pi
-export PATH="/usr/local/bin:$PATH"
-
-# Source API keys if available (for Ava service user)
-if [[ -f /run/secrets/ava.env && -r /run/secrets/ava.env ]]; then
- set -a
- # shellcheck source=/dev/null
- source /run/secrets/ava.env
- set +a
-fi
-
-# Load direnv/nix-shell environment for bild, lint, etc.
+# Load direnv/nix-shell environment for bild, lint, pi, etc.
if command -v direnv &> /dev/null; then
eval "$(direnv export bash 2>/dev/null || true)"
fi
diff --git a/Omni/Ide/pi-code.sh b/Omni/Ide/pi-code.sh
index 42dad589..4321d18c 100755
--- a/Omni/Ide/pi-code.sh
+++ b/Omni/Ide/pi-code.sh
@@ -151,12 +151,8 @@ PROMPT="$PROMPT
status "Starting coder agent..."
echo ""
-# Use OpenRouter with Claude if OPENROUTER_API_KEY is set, otherwise default
-if [[ -n "$OPENROUTER_API_KEY" ]]; then
- pi -p "$PROMPT" --provider openrouter --model anthropic/claude-opus-4.5 --api-key "$OPENROUTER_API_KEY"
-else
- pi -p "$PROMPT"
-fi
+# Run pi (uses default auth from ~/.pi/)
+pi -p "$PROMPT"
# Post-coder verification: ensure code compiles
if [ -n "$NAMESPACE" ]; then
diff --git a/Omni/Ide/pi-review.sh b/Omni/Ide/pi-review.sh
index a44affcb..b5b3cf62 100755
--- a/Omni/Ide/pi-review.sh
+++ b/Omni/Ide/pi-review.sh
@@ -278,13 +278,8 @@ If REJECT or REQUEST_CHANGES, explain what's wrong BEFORE the verdict line.
echo "=== Running pi reviewer ==="
-# Run pi and capture output
-# Use OpenRouter with Claude if OPENROUTER_API_KEY is set, otherwise default
-if [[ -n "$OPENROUTER_API_KEY" ]]; then
- REVIEW_OUTPUT=$(pi -p "$PROMPT" --provider openrouter --model anthropic/claude-opus-4.5 --api-key "$OPENROUTER_API_KEY" 2>&1)
-else
- REVIEW_OUTPUT=$(pi -p "$PROMPT" 2>&1)
-fi
+# Run pi and capture output (uses default auth from ~/.pi/)
+REVIEW_OUTPUT=$(pi -p "$PROMPT" 2>&1)
echo "$REVIEW_OUTPUT"