Files
hermes-ice/homelab/entities/hermes-gateway.md
Hermes Agent e4d91aadf9 Initial commit: homelab infrastructure wiki
- Full Obsidian vault content
- Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte)
- Media stack documentation
- Traefik HA setup
- Automation scripts
- Bachelor party planning
2026-05-24 16:08:40 -07:00

2.4 KiB

title, created, updated, type, tags, sources
title created updated type tags sources
hermes-gateway 2026-04-28 2026-04-29 entity
services
ai
gateway
watchdog

hermes-gateway

Role: AI gateway — routes LLM requests across multiple providers Hosts: ice (primary), grizzley (secondary) Runs on: ice as systemd user service (hermes-gateway.service)

Overview

hermes-gateway is the AI gateway that routes LLM requests (DeepSeek V4, OpenAI, Anthropic, OpenRouter, etc.) across multiple providers. It has a watchdog pattern deployed via system cron on both ice and grizzley.

Providers

Provider Model Endpoint Notes
DeepSeek V4 https://api.deepseek.com/anthropic Anthropic format, 1M input / 384K output
OpenAI various https://api.openai.com
Anthropic various https://api.anthropic.com
OpenRouter various https://openrouter.ai/api

Watchdog Pattern

A shell script (/home/bear/hermes-gateway-watchdog.sh) runs via system cron on both ice and grizzley:

  1. Checks if hermes-gateway is responsive
  2. On failure: direct restart → tmux+OpenCode rescue if still down
  3. Sends Telegram notification on failure to topic 1033 "Cron Jobs" in AigentZeroHermes (-1003820156994)

Telegram alert details:

  • Bot token: 836803270:AAH-Ac5Y
  • Chat ID: -1003820156994 (AigentZeroHermes channel)
  • Topic ID: 1033 ("Cron Jobs")

Critical note: On grizzley, the systemd override for the watchdog is deployed directly to /etc/systemd/system/ (not tracked in the homelab repo — it's a system unit).

DeepSeek V4 Provider

Configured as: https://api.deepseek.com/anthropic (Anthropic format, not OpenAI). Context window: 1M input / 384K output. ⚠️ Known bug: thinking mode passes reasoning_content back incorrectly — pass it back in multi-turn.

Access

hermes-gateway runs as a user service. To check status:

# On ice (primary)
ssh bear@192.168.50.197 "systemctl --user status hermes-gateway"
journalctl --user -u hermes-gateway -f

# On grizzley (secondary)
ssh bear@192.168.50.84 "systemctl --user status hermes-gateway"

Watchdog logs (check cron output in syslog):

ssh bear@192.168.50.197 "grep hermes-gateway-watchdog /var/log/syslog"
  • ice — Primary host
  • grizzley — Secondary host with watchdog
  • authentik — SSO for gateway access (if applicable)