From ffc01395be4727044da825d849472c7128fe480e Mon Sep 17 00:00:00 2001 From: intricko <37886057+intricko@users.noreply.github.com> Date: Sun, 23 Aug 2026 05:07:12 +0000 Subject: [PATCH 1/2] feat: enhance pi-agent configuration with detailed model settings and fallback options --- .devcontainer/pi-config/models.json | 62 +++++++++++++++++++++------ .devcontainer/pi-config/settings.json | 3 +- .devcontainer/post-create-cmd.sh | 3 +- .devcontainer/start-hermes.sh | 4 ++ 4 files changed, 55 insertions(+), 17 deletions(-) diff --git a/.devcontainer/pi-config/models.json b/.devcontainer/pi-config/models.json index 2aed60d..34dcd1d 100644 --- a/.devcontainer/pi-config/models.json +++ b/.devcontainer/pi-config/models.json @@ -3,26 +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", - "compat": { - "supportsDeveloperRole": false, - "supportsReasoningEffort": false - }, "models": [ - { "id": "auto-fastest" } - ] + { + "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/.devcontainer/pi-config/settings.json b/.devcontainer/pi-config/settings.json index 4a8d19c..0daf646 100644 --- a/.devcontainer/pi-config/settings.json +++ b/.devcontainer/pi-config/settings.json @@ -1,5 +1,4 @@ { "defaultProvider": "omniroute", - "defaultModel": "auto-fastest", - "lastChangelogVersion": "0.84.2" + "defaultModel": "auto-fastest" } \ No newline at end of file diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index e1ad5e8..e51ba17 100755 --- a/.devcontainer/post-create-cmd.sh +++ b/.devcontainer/post-create-cmd.sh @@ -239,7 +239,7 @@ if command -v omniroute &>/dev/null; then echo "[$SCRIPT_NAME] omniroute is already running, skipping" else echo "[$SCRIPT_NAME] Starting omniroute in the background..." - setsid /usr/local/bin/omniroute >> /tmp/omniroute.log 2>&1 & + setsid /usr/local/bin/omniroute --no-open >> /tmp/omniroute.log 2>&1 & fi else echo "[$SCRIPT_NAME] omniroute not found, skipping start" @@ -255,7 +255,6 @@ else echo "[$SCRIPT_NAME] pi-agent installed" fi - # Install TailScale sudo mkdir -p /var/run/tailscale /var/lib/tailscale && sudo curl -fsSL https://tailscale.com/install.sh | sh && sudo rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/start-hermes.sh b/.devcontainer/start-hermes.sh index b51dc5e..0eb798a 100755 --- a/.devcontainer/start-hermes.sh +++ b/.devcontainer/start-hermes.sh @@ -175,6 +175,10 @@ if [ -d "$PI_CONF_TRACKED" ]; then done 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 + # 5.7. Starting keepalive (idempotent) — keeps codespace from idle-shutting-down if ! pgrep -f "keepalive.sh" > /dev/null; then echo "[$SCRIPT_NAME] Starting keepalive..." From 03b3f2cebdb32727454fea1edbc16e366ad50822 Mon Sep 17 00:00:00 2001 From: intricko <37886057+intricko@users.noreply.github.com> Date: Sun, 23 Aug 2026 05:16:52 +0000 Subject: [PATCH 2/2] feat: update pi-agent settings with changelog version and package configuration --- .devcontainer/pi-config/settings.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.devcontainer/pi-config/settings.json b/.devcontainer/pi-config/settings.json index 0daf646..f9e88a3 100644 --- a/.devcontainer/pi-config/settings.json +++ b/.devcontainer/pi-config/settings.json @@ -1,4 +1,8 @@ { "defaultProvider": "omniroute", - "defaultModel": "auto-fastest" + "defaultModel": "auto-fastest", + "lastChangelogVersion": "0.84.2", + "packages": [ + "git:github.com/gitricko/pi-failover@hermes-impl" + ] } \ No newline at end of file