Skip to content

v1.0.0 - Initial Release: Hermes Hybrid Auto-Switch

Choose a tag to compare

@rhishi99 rhishi99 released this 18 Aug 03:58
· 15 commits to master since this release

v1.0.0 - Initial Release: Hermes Hybrid Auto-Switch

Always have at least one working model with SWE > 71% in Hermes — combining NVIDIA NIM health monitoring, cross-provider FCM router daemon, and persistent learning database.

✨ Features

Core Engine

  • Hybrid Auto-Switch (scripts/hybrid_auto_switch.py): Combines NIM health checks, FCM router data, and learning DB for intelligent model selection
  • Learning Database (scripts/model_learning_db.py): SQLite tracking SWE scores, success rates, latency, streaks, uptime, and selection outcomes
  • Atomic Config Updates (scripts/nvidia_nim_config_update.py): Temp-file write → atomic replace → 10 backup retention with MoA-aware sync
  • NIM Health Checks (scripts/nvidia_nim_health_check.py): Concurrent requests, configurable thresholds, ranked JSON output

Cross-Provider Failover (Layer 2)

  • FCM Router Daemon (free-coding-models): Runs on localhost:19280, handles per-request failover across NVIDIA NIM, Groq, Cerebras, GitHub Models, OpenRouter, Mistral, Cloudflare, SambaNova
  • Real-time health scores with circuit breakers

SWE Quality Guarantee

  • Hard filter: Only models with SWE ≥ 71% are eligible
  • Seeded database: 25+ models with known SWE-bench scores
  • Measured learning: Tracks actual performance over time

MoA-Aware Configuration

Updates Hermes config.yaml atomically:

  • Primary model (model.defaultfcm:fast-coding)
  • Fallback model
  • MoA aggregator model
  • MoA reference models

Cross-Platform Hooks

  • Linux/macOS: hooks/start_fcm_daemon.sh, hooks/stop_fcm_daemon.sh
  • Windows Batch: hooks/start_fcm_daemon.bat, hooks/stop_fcm_daemon.bat
  • Windows PowerShell: hooks/start_fcm_daemon.ps1, hooks/stop_fcm_daemon.ps1

Documentation

  • Animated HTML architecture diagrams (docs/index.html) with Tailwind CSS
  • Subagent delegation guide (docs/subagent-delegation.md)
  • Complete setup guide (SETUP.md)

Testing

  • E2E pipeline test (tests/test_e2e.py): Validates FCM daemon, NIM health, config update, learning DB
  • SWE gate unit test (tests/test_swe_gate.py): Validates 71% threshold logic

CI/CD

  • GitHub Actions (.github/workflows/ci.yml): Lint (Ruff), type-check (MyPy), tests on Python 3.10/3.11/3.12
  • Issue/PR templates for consistent contributions
  • Contributing guide and Code of Conduct (Contributor Covenant v2.1)

🚀 Quick Start

# 1. Install FCM router
npm install -g free-coding-models

# 2. Install Python dependencies
pip install -e .[dev]

# 3. Configure
cp config/.env.example ~/.hermes/.env
# Edit ~/.hermes/.env with your NVIDIA_API_KEY

# 4. Start FCM daemon
./hooks/start_fcm_daemon.sh  # Linux/macOS
# or hooks/start_fcm_daemon.ps1  # Windows

# 5. Run auto-switch (or schedule via cron)
python scripts/hybrid_auto_switch.py

📦 Installation

pip install hermes-model-auto-switch
# Then use entry points:
hermes-auto-switch      # Run hybrid auto-switch
hermes-nim-health       # Run NIM health check
hermes-learning-db      # Learning DB operations
hermes-config-update    # Update Hermes config

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│  LAYER 1: HERMES AGENT                                      │
│  Reads config.yaml → uses fcm:fast-coding via localhost:19280│
└──────────────────────────┬──────────────────────────────────┘
                           ▼
┌─────────────────────────────────────────────────────────────┐
│  LAYER 2: FCM ROUTER DAEMON (localhost:19280)               │
│  Cross-Provider Failover: NVIDIA NIM → Groq → Cerebras...   │
│  Per-request failover • Circuit breakers • Real-time scores │
└──────────────────────────┬──────────────────────────────────┘
                           ▼
┌─────────────────────────────────────────────────────────────┐
│  LAYER 3: HYBRID AUTO-SWITCH CRON (Every 15 min)            │
│  NIM Health + FCM Router + Learning DB → SWE > 71% filter   │
│  Updates: primary, fallback, MoA aggregator, MoA refs       │
└──────────────────────────┬──────────────────────────────────┘
                           ▼
┌─────────────────────────────────────────────────────────────┐
│  LAYER 4: PERSISTENT STATE                                  │
│  Learning DB (SQLite) + Hermes config.yaml (atomic + backup)│
└─────────────────────────────────────────────────────────────┘

📝 Changelog

  • f0b78fc feat(core): hybrid auto-switch engine with learning DB and atomic config updates
  • 6678736 feat(hooks): cross-platform FCM daemon lifecycle (sh/bat/ps1)
  • e575939 test: e2e pipeline + SWE gate unit tests
  • 2cee78f docs: architecture diagrams, setup guide, delegation docs
  • chore: release prep - CI, contributing, packaging, pyproject.toml

🔗 Links


Full Changelog: https://github.com/rhishi99/hermes-model-auto-switch/commits/v1.0.0