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..f9e88a3 100644 --- a/.devcontainer/pi-config/settings.json +++ b/.devcontainer/pi-config/settings.json @@ -1,5 +1,8 @@ { "defaultProvider": "omniroute", "defaultModel": "auto-fastest", - "lastChangelogVersion": "0.84.2" + "lastChangelogVersion": "0.84.2", + "packages": [ + "git:github.com/gitricko/pi-failover@hermes-impl" + ] } \ 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..."