Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 49 additions & 13 deletions .devcontainer/pi-config/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
5 changes: 4 additions & 1 deletion .devcontainer/pi-config/settings.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
3 changes: 1 addition & 2 deletions .devcontainer/post-create-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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/*

Expand Down
4 changes: 4 additions & 0 deletions .devcontainer/start-hermes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
intricko marked this conversation as resolved.

# 5.7. Starting keepalive (idempotent) — keeps codespace from idle-shutting-down
if ! pgrep -f "keepalive.sh" > /dev/null; then
echo "[$SCRIPT_NAME] Starting keepalive..."
Expand Down
Loading