Skip to content

fix(hermes): route through cliproxy only, drop broken fallback chain - #2335

Merged
shunkakinoki merged 3 commits into
mainfrom
fix/hermes-cliproxy-fallback
Aug 10, 2026
Merged

fix(hermes): route through cliproxy only, drop broken fallback chain#2335
shunkakinoki merged 3 commits into
mainfrom
fix/hermes-cliproxy-fallback

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Aug 10, 2026

Copy link
Copy Markdown
Owner

What

Hermes was configured with its own model-by-model fallback chain (deepseek-pro → gemma → glm → minimax → free) that never trusted cliproxy's internal quota-exceeded failover. When the primary upstream quota hit, hermes tried each model — and free doesn't exist, causing a hard 400 'unknown provider' failure.

Fix

  • Point hermes at cliproxy/deepseek-v4-flash as the single default (was custom/, an unregistered provider prefix)
  • Set fallback_providers: [] so cliproxy handles routing + internal failover
  • Regenerated config.template.yaml via scripts/llm-update.sh

Test

  • Gateway restarted, Telegram connected
  • Direct curl to cliproxy for deepseek-v4-flash returns success (routes to Aliyun upstream with quota)

Summary by cubic

Route Hermes through cliproxy with deepseek-v4-flash as the default, keep fallbacks aligned with OpenClaw, and restore the webhook platform to avoid 400 "unknown provider" errors.

  • Bug Fixes
    • Set model-level base_url and api_key for cliproxy; default model is cliproxy/deepseek-v4-flash.
    • Kept the fallback chain (deepseek-v4-pro → gemma → glm → minimax → free) to match OpenClaw; removed the bad custom/ default prefix.
    • Restored the webhook platform (port 8644, __WEBHOOK_SECRET__) and added cliproxy under custom_providers with api_mode: chat_completions.

Written for commit 7651719. Summary will update on new commits.

Review in cubic

Hermes had its own model-by-model fallback chain (deepseek-pro -> gemma ->
glm -> minimax -> free) that never trusted cliproxy's internal
quota-exceeded failover. When the primary upstream quota hit, hermes tried
each model and 'free' doesn't exist, causing a hard 400 'unknown provider'
failure.

Point hermes at cliproxy/deepseek-v4-flash as the single default and set
fallback_providers to [] so cliproxy handles routing/fallback internally.
@indent-zero

indent-zero Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Indent Zero is shutting down on August 7th. Please migrate over to Indent 2.0 to continue getting PR reviews.

PR Summary

Merged (bca49f7). Despite the PR title, the OpenClaw-style fallback chain and MoA presets were kept intact; the net change vs main is minimal — top-level model.base_url/model.api_key added on both configs and the platforms.webhook block added to config.tpl.yaml to fix a pre-existing tpl↔template drift.

  • Added base_url: https://cliproxy.shunkakinoki.com/v1 and api_key: __CLIPROXY_API_KEY__ under the top-level model: block in config/hermes/config.template.yaml and config/hermes/config.tpl.yaml.
  • Added the platforms.webhook block (port 8644, secret: __WEBHOOK_SECRET__) to config/hermes/config.tpl.yaml so scripts/llm-update.sh no longer wipes the webhook config on regeneration.
  • fallback_providers (including the unreachable cliproxy/free entry) and MoA reference models left unchanged from main — the "drop broken fallback chain" fix advertised in the first commit was ultimately reverted before merge.

Issues

2 potential issues found:

  • New top-level model.base_url / model.api_key duplicate the credentials already declared under providers.cliproxy (from PR fix(hermes): register cliproxy as a proper provider #2334) and custom_providers; since model.default: cliproxy/deepseek-v4-flash resolves through the registered provider, these fields are redundant and — if hermes' schema is strict about unknown model.* keys — could fail validation at startup. → Autofix
  • The cliproxy/free fallback entry — which the first commit called out as an "unknown provider" 400 error — is back in fallback_providers, but free is not an alias in config/cliproxyapi/config.template.yaml. So the exact bug the PR title advertises fixing is still present; the OpenClaw id: "free" entry is a UI model descriptor, not a callable cliproxy route. → Autofix
2 issues already resolved
  • spec/hermes_hydrate_spec.sh still asserts the removed fallback chain (deepseek-v4-pro, gemma-4-31b-it, glm-4.7, minimax-m3, free) and MoA models (deepseek-v4-pro, minimax-m3) exist in config.template.yaml, so the Shell CI job (shell-test-dev in .github/workflows/shell.yml) will fail — update or replace those tests to describe the new cliproxy-only contract. (fixed by commit 1300f5d)
  • The platforms.webhook block (port 8644, __WEBHOOK_SECRET__) is silently deleted from config/hermes/config.template.yaml even though the commit message only talks about the fallback chain; this disables the webhook feature PR feat(hermes): enable webhook platform #2319 enabled two commits ago and leaves hydrate.sh still hydrating a now-absent __WEBHOOK_SECRET__ placeholder. (fixed by commit 1300f5d)

CI Checks

Waiting for CI checks...


⚡ Autofix All Issues

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@shunkakinoki, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d6b2538-be20-48be-b491-ef1e3ce36c87

📥 Commits

Reviewing files that changed from the base of the PR and between 33cb1eb and 7651719.

📒 Files selected for processing (2)
  • config/hermes/config.template.yaml
  • config/hermes/config.tpl.yaml
📝 Walkthrough

Summary by CodeRabbit

  • Configuration
    • Updated the default AI model to use DeepSeek Flash through the configured CLI proxy.
    • Added explicit endpoint and API key settings for the default model.
    • Simplified fallback and MOA model configurations.
    • Removed webhook platform configuration.

Walkthrough

Both Hermes configuration templates now use the Cliproxy DeepSeek Flash endpoint with explicit connection settings. Fallback providers and webhook configuration were removed. The default MOA model reference now uses DeepSeek Flash.

Changes

Hermes configuration

Layer / File(s) Summary
Cliproxy model and MOA defaults
config/hermes/config.template.yaml, config/hermes/config.tpl.yaml
The templates define the Cliproxy endpoint and API key, clear fallback providers, select deepseek-v4-flash for MOA, and remove the webhook platform configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit hops through YAML bright,
Cliproxy guides the model’s flight.
Flash now leads the MOA trail,
Empty fallbacks leave no veil.
Config blooms with settings neat!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the Hermes routing change, fallback removal, error cause, and validation steps.
Title check ✅ Passed The title clearly summarizes the main change: routing Hermes through cliproxy and removing the broken fallback chain.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hermes-cliproxy-fallback

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread config/hermes/config.template.yaml
model:
default: cliproxy/deepseek-v4-flash
base_url: https://cliproxy.shunkakinoki.com/v1
api_key: __CLIPROXY_API_KEY__

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant credentials on the top-level model: block

providers.cliproxy at lines 5-9 already sets base_url/api_key/api_mode, and custom_providers at the tail sets them a third time. Because model.default uses the prefixed cliproxy/deepseek-v4-flash form, routing resolves through the registered provider without needing credentials here.

On main the analogous delegation: section uses base_url: ''/api_key: '' empty strings, suggesting per-section credentials are optional overrides rather than required. If these top-level fields are genuinely needed to work around a bug, add a comment explaining why; otherwise drop them (in both config.template.yaml and config.tpl.yaml) so there's one source of truth for the cliproxy endpoint/key.

…claw

Drop the 'custom/' default prefix (unregistered provider) back to
cliproxy/deepseek-v4-flash, but retain the fallback_providers chain
(deepseek-v4-pro, gemma, glm, minimax, free) to mirror OpenClaw's model
fallbacks, and restore the webhook platform block.
… routing

Final minimal change: hermes routes through cliproxyapi (default
cliproxy/deepseek-v4-flash) while retaining the fallback_providers chain in
sync with OpenClaw (deepseek-v4-pro, gemma, glm, minimax, free) and the
webhook platform block.
@shunkakinoki
shunkakinoki merged commit bca49f7 into main Aug 10, 2026
7 of 8 checks passed
@shunkakinoki
shunkakinoki deleted the fix/hermes-cliproxy-fallback branch August 10, 2026 07:34

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/hermes/config.template.yaml`:
- Around line 2-4: Update model configuration in
config/hermes/config.template.yaml lines 2-4 and config/hermes/config.tpl.yaml
lines 2-4: set model.default to only the model key and add model.provider:
cliproxy. Preserve the existing base URL and API key placeholders, and ensure
MoA and delegation provider/model fields remain explicitly split after
placeholder substitution in both templates.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cccb9bed-2d87-441d-a67b-50e26781ba65

📥 Commits

Reviewing files that changed from the base of the PR and between 890d874 and 33cb1eb.

📒 Files selected for processing (2)
  • config/hermes/config.template.yaml
  • config/hermes/config.tpl.yaml

Comment thread config/hermes/config.template.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant