model-switch-playbook

Diagnoses silent model fallback and guides model switching for Hermes gateways.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill model-switch-playbook-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-switch-playbook
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/autonomous-ai-agents/model-switch-playbook
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill model-switch-playbook-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When you switch an AI gateway's model or receive a new API key, the gateway can silently fall back to an old model without any visible error, leaving you running the wrong model for days. This playbook walks through verifying keys, updating configuration, restarting the gateway, and confirming the actual model in use. ## Core Features & Use Cases - Telegram message mangling awareness: Explains how Telegram inserts spaces into API keys and masks IP addresses, and how to recover the original text before validating. - End-to-end model switch procedure: Validate the key against /v1/models, set config via the hermes CLI (config.yaml is locked against direct edits), restart the gateway via a scheduled script, and verify the real model from the sessions table. - Silent fallback diagnosis: Query state.db to see which model actually ran, test the primary key directly, and fix model_not_found or 401 failures. - Use Case: A user reports the backend shows deepseek even though glm was configured. Follow the playbook to discover the key was corrupted by Telegram whitespace, re-validate it, update config, restart via an at-scheduled script, and confirm the new model in recent sessions. ## Quick Start Use the model-switch-playbook to switch the gateway to the glm model with this API key and verify which model is actually running.

Frequently Asked Questions about model-switch-playbook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch the default model on a Hermes gateway?

First validate the API key with a /v1/models request, then run hermes config set model.default and model.api_key, restart the gateway, and verify the actual model in the state.db sessions table. Never edit config.yaml directly since it is security-locked.

Why is my gateway running a different model than configured?

This is silent fallback: when the primary model's key fails with model_not_found or 401, the gateway automatically downgrades to fallback_providers without an obvious error. Query the sessions table in state.db to see which model actually ran.

Why does my API key fail validation after receiving it in Telegram?

Telegram inserts spaces and line breaks into API keys and masks IP addresses in messages. Remove all whitespace from the key before validating, or recover the original text from the messages table in state.db.

How do I restart the Hermes gateway when restart commands are blocked?

In-process restart commands are intercepted by self-protection. Write the restart command into a script file and schedule it with at now + 1 minute so it executes outside the protected process.

Can I edit config.yaml directly to change the model?

No. Direct edits via patch or write_file are rejected with a security-sensitive configuration error. You must use hermes config set commands to modify model and key settings.