diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0b6b63d..d4a5079 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -115,6 +115,7 @@ jobs: - name: Mnemon Integration Test run: | set -euo pipefail + sleep 120 CONTAINER_NAME="hermes-webtop" TEST_NAME="ci-mnemon-$(date +%s)-$$" echo "=== Mnemon Integration Test: $TEST_NAME ===" @@ -129,13 +130,20 @@ jobs: mnemon recall "$TEST_NAME" --limit 5 2>&1 | grep -q "$TEST_NAME" \ || { echo "FAIL: mnemon recall did not find $TEST_NAME"; exit 1; } - echo "[3/3] Claude retrieves via mnemon..." + # echo "[3/3] Claude retrieves via mnemon..." + # CLAUDE_OUTPUT=$(timeout 60 docker exec -u abc "$CONTAINER_NAME" \ + # /config/.local/bin/claude --dangerously-skip-permissions -p \ + # "Use mnemon recall to find my name. Reply with ONLY the name." 2>&1) || true + # echo "Claude: $CLAUDE_OUTPUT" + # echo "$CLAUDE_OUTPUT" | grep -q "$TEST_NAME" \ + # || { echo "FAIL: Claude did not return $TEST_NAME"; } + echo "[3/3] Hermes retrieves via mnemon..." CLAUDE_OUTPUT=$(timeout 60 docker exec -u abc "$CONTAINER_NAME" \ - /config/.local/bin/claude --dangerously-skip-permissions -p \ + hermes chat -q \ "Use mnemon recall to find my name. Reply with ONLY the name." 2>&1) || true - echo "Claude: $CLAUDE_OUTPUT" + echo "Hermes: $CLAUDE_OUTPUT" echo "$CLAUDE_OUTPUT" | grep -q "$TEST_NAME" \ - || { echo "FAIL: Claude did not return $TEST_NAME"; } + || { echo "FAIL: Hermes did not return $TEST_NAME"; } echo "=== ALL MNEMON CHECKS PASSED ===" diff --git a/docker/Dockerfile b/docker/Dockerfile index 1d9de99..9774014 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ ARG HERMES_VERSION="v2026.8.31" ARG OMNIROUTE_VERSION=3.8.49 -ARG MODELRELAY_VERSION=1.18.0 +ARG MODELRELAY_VERSION=1.22.1 ARG OLLAMA_VERSION=0.33.2 ARG NODE_VERSION=26.7.0 ARG CODE_SERVER_VERSION=4.135.0 @@ -63,9 +63,9 @@ RUN curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HE # Install ModelRelay and start automatically in the background ARG MODELRELAY_VERSION -# RUN npm install -g modelrelay@${MODELRELAY_VERSION} && \ -RUN npm install -g github:gitricko/modelrelay && \ +RUN npm install -g modelrelay@${MODELRELAY_VERSION} && \ npm cache clean --force +# RUN npm install -g github:gitricko/modelrelay && \ # Install OmniRoute and start automatically when desktop loads ARG OMNIROUTE_VERSION diff --git a/docker/pi-models.json b/docker/pi-models.json index 03d4d2b..34dcd1d 100644 --- a/docker/pi-models.json +++ b/docker/pi-models.json @@ -3,14 +3,62 @@ "omniroute": { "baseUrl": "http://localhost:20128/v1", "api": "openai-completions", - "apiKey": "***", - "compat": { - "supportsDeveloperRole": false, - "supportsReasoningEffort": false - }, + "apiKey": "no-key-needed", "models": [ - { "id": "auto-fastest" } - ] + { + "id": "auto-fastest", + "name": "Auto Fastest", + "api": "openai-completions", + "provider": "omniroute", + "baseUrl": "http://localhost:20128/v1", + "reasoning": true, + "input": ["text"], + "cost": { + "input": 0, + "output": 0, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 256000, + "maxTokens": 131072 + } + ], + "fallback": { + "chain": ["modelrelay/auto-fastest"], + "timeoutMs": 30000, + "onlyPreFirstToken": true, + "notifyOnSwitch": true + } + }, + "modelrelay": { + "baseUrl": "http://localhost:7352/v1", + "api": "openai-completions", + "apiKey": "no-key-needed", + "models": [ + { + "id": "auto-fastest", + "name": "Auto Fastest", + "api": "openai-completions", + "provider": "modelrelay", + "baseUrl": "http://localhost:7352/v1", + "reasoning": true, + "input": ["text"], + "cost": { + "input": 0, + "output": 0, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 256000, + "maxTokens": 131072 + } + ], + "fallback": { + "chain": ["omniroute/auto-fastest"], + "timeoutMs": 30000, + "onlyPreFirstToken": true, + "notifyOnSwitch": true + } } } -} +} \ No newline at end of file diff --git a/docker/pi-settings.json b/docker/pi-settings.json index 22644bf..5ca75f4 100644 --- a/docker/pi-settings.json +++ b/docker/pi-settings.json @@ -1,4 +1,7 @@ { "defaultProvider": "omniroute", - "defaultModel": "auto-fastest" -} + "defaultModel": "auto-fastest", + "packages": [ + "git:github.com/gitricko/pi-failover@hermes-impl" + ] +} \ No newline at end of file diff --git a/docker/start-pi.sh b/docker/start-pi.sh index 9c97ae3..3266d9b 100755 --- a/docker/start-pi.sh +++ b/docker/start-pi.sh @@ -27,5 +27,9 @@ if [ ! -f "$PI_DIR/settings.json" ]; then chown abc:abc "$PI_DIR/settings.json" fi +# Install Pi-agent hermes like fallback extension +echo "[$SCRIPT_NAME] Installing Pi-agent extension..." +pi install git:github.com/gitricko/pi-failover@hermes-impl + echo "[start-pi] Pi agent ready ($(pi --version 2>/dev/null || echo unknown)). Default model: omniroute/auto-fastest" EOF