feat: multi-gateway profile support, provider management overhaul, and model settings tab

- Profile-aware proxy: inject API key from profile-specific .env, route requests via X-Hermes-Profile header
- Remove auth.json dependency: built-in providers use .env, custom providers use config.yaml
- Add allProviders field to available-models response with all hardcoded provider catalogs
- Add Models tab in Settings for editing provider API keys (built-in → .env, custom → config.yaml)
- Add PUT /api/config/providers/:poolKey for updating provider credentials
- ProviderFormModal uses backend allProviders for preset dropdown
- Gateway log format support: parse both agent and gateway log formats
- Add webui server.log to log viewer with log rotation at 3MB
- Fix provider delete loading state and OAuth provider cleanup
- Setup script: require Node.js 23+, auto-upgrade if version too low

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-19 20:59:25 +08:00
parent e7e4c386c3
commit 562261d13f
19 changed files with 635 additions and 276 deletions
+22 -2
View File
@@ -14,7 +14,7 @@ err() { echo -e "${RED} ✗${NC} $1"; }
install_node_deb() {
echo ""
warn "Node.js is not installed, installing via NodeSource..."
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - >/dev/null 2>&1
curl -fsSL https://deb.nodesource.com/setup_23.x | sudo -E bash - >/dev/null 2>&1
sudo apt install -y nodejs >/dev/null 2>&1
info "Node.js $(node -v) installed"
}
@@ -30,9 +30,29 @@ install_node_mac() {
info "Node.js $(node -v) installed"
}
MIN_NODE_MAJOR=23
check_node() {
if command -v node &>/dev/null; then
info "Node.js $(node -v) found ($(which node))"
local major
major=$(node -v | sed 's/^v//' | cut -d. -f1)
if [ "$major" -lt "$MIN_NODE_MAJOR" ] 2>/dev/null; then
warn "Node.js $(node -v) found but v${MIN_NODE_MAJOR}+ is required, upgrading..."
# Auto-upgrade based on OS
if grep -qi microsoft /proc/version 2>/dev/null; then
install_node_deb
elif command -v apt &>/dev/null; then
install_node_deb
elif command -v brew &>/dev/null || [[ "$OSTYPE" == "darwin"* ]]; then
install_node_mac
else
err "Node.js upgrade not supported on this system"
echo " Install manually: https://nodejs.org/"
return 1
fi
else
info "Node.js $(node -v) found ($(which node))"
fi
return 0
fi