hermes - ✅(Solved) Fix [Feature]: Region-aware model filtering — hide geoblocked models from /model picker [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#23501Fetched 2026-05-11 03:29:11
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×2

Error Message

Error 403: Unsupported Regions The /model picker currently shows ~20+ providers/models with no indication of regional availability. Users must manually trial-and-error which models work, and the list is confusing and misleading. 3. Fallback: at minimum, warn the user if they select a model known to be geoblocked for their region

Root Cause

This happens because:

  • Anthropic excludes Hong Kong from its supported countries — Claude API returns 403
  • OpenAI excludes Hong Kong since July 2024 — GPT API returns 403
  • Google Gemini excludes Hong Kong from its API regions

Fix Action

Fix / Workaround

Medium priority because:

  • Affects all users in blocked regions (Hong Kong, mainland China, and others)
  • Causes confusing UX: models appear available but fail silently with auth errors
  • The existing allowlist PR (#20703) is a partial workaround but requires manual configuration
  • Blocked regions represent a significant user base for Hermes (DeepSeek is the #1 recommended provider for these regions)

PR fix notes

PR #20703: feat(model-picker): add display.model_picker_providers allowlist

Description (problem / solution / changelog)

Summary

Add an optional config key — display.model_picker_providers — that restricts the interactive /model picker (the inline keyboard surfaced by Telegram/Discord and other gateway adapters) to a user-chosen set of provider slugs.

When many providers are authenticated, the inline picker can balloon to dozens of rows. This lets the user scope the picker down to the handful they actually use from chat without affecting the typed /model <name> flow.

Behavior

  • Set (list or comma-separated string): only those provider slugs are shown in the picker.
  • Current provider always included — the user never loses their currently-active row even if it isn't in the allowlist.
  • Empty / missing: legacy unfiltered behavior is preserved.
  • Slugs are matched case-insensitively.
  • Only the interactive picker is filtered; typed /model <name> switches are unaffected.

Config example

display:
  model_picker_providers:
    - openai
    - anthropic
    - openrouter

A comma-separated string also works: model_picker_providers: "openai, anthropic, openrouter".

Tests

tests/hermes_cli/test_list_picker_providers.py (extended, all 14 tests green):

  • allowlist filters to listed providers
  • current provider is always included even when excluded by the allowlist
  • empty/missing allowlist => no filter (legacy behavior preserved)
  • comma-separated string form is accepted
$ pytest -q tests/hermes_cli/test_list_picker_providers.py
14 passed in 1.89s

Docs

Adds a short "Model Picker Allowlist" section to website/docs/user-guide/configuration.md.

Related

Closes the long-standing ask in #12655, #15267, #16608 — pluggable / configurable scope for the /model chat picker.

Changed files

  • hermes_cli/model_switch.py (modified, +23/-0)
  • tests/hermes_cli/test_list_picker_providers.py (modified, +91/-0)
  • website/docs/user-guide/configuration.md (modified, +22/-0)

Code Example

Error 403: Unsupported Regions
This model is not available in your region.

---

model:
  region_filter: auto       # auto | off
  # auto = probe and hide geoblocked models
  # off  = show everything (current behavior)
RAW_BUFFERClick to expand / collapse

Problem

When using Hermes from a geoblocked region (Hong Kong, mainland China, etc.), the /model picker and hermes model CLI show all models from OpenRouter and direct providers, including many that will fail at call time with 403/404.

Example: A user in Hong Kong sees Claude Opus, GPT-5, Gemini in the model picker. Selecting any of them eventually fails with:

Error 403: Unsupported Regions
This model is not available in your region.

This happens because:

  • Anthropic excludes Hong Kong from its supported countries — Claude API returns 403
  • OpenAI excludes Hong Kong since July 2024 — GPT API returns 403
  • Google Gemini excludes Hong Kong from its API regions

OpenRouter does NOT bypass these restrictions — it forwards the upstream provider's 403/404. User reports confirm this (HN, Reddit, Cherry Studio, OpenCode issues).

The /model picker currently shows ~20+ providers/models with no indication of regional availability. Users must manually trial-and-error which models work, and the list is confusing and misleading.

Desired behavior

  1. Hermes detects which models are actually callable from the user's current region
  2. The /model picker and hermes model CLI either:
    • (a) Hide geoblocked models entirely, OR
    • (b) Grey them out with a "🔒 unavailable in your region" label
  3. Fallback: at minimum, warn the user if they select a model known to be geoblocked for their region

Proposed approach

Detection mechanism:

  • When fetching the model list (from OpenRouter API or provider endpoints), do a lightweight probe: a cheap models/list request for each provider
  • If the provider returns 403/404 with region-related errors, mark all its models as unavailable
  • Cache the result per-session (don't re-probe on every /model invocation)

Model list sources where this matters most:

  • OpenRouter (openrouter.ai/api/v1/models) — the largest catalog, where most users encounter this
  • Direct provider endpoints (Anthropic, OpenAI, Google) — already known to fail from blocked regions

Config options:

model:
  region_filter: auto       # auto | off
  # auto = probe and hide geoblocked models
  # off  = show everything (current behavior)

Relationship to existing work:

  • PR #20703 (display.model_picker_providers allowlist) would let users manually curate — but that requires knowing which models are blocked
  • Issue #16608 (model allowlist) is complementary — region filter + allowlist together would cover most cases

Why P2

Medium priority because:

  • Affects all users in blocked regions (Hong Kong, mainland China, and others)
  • Causes confusing UX: models appear available but fail silently with auth errors
  • The existing allowlist PR (#20703) is a partial workaround but requires manual configuration
  • Blocked regions represent a significant user base for Hermes (DeepSeek is the #1 recommended provider for these regions)

Related

  • #16608 — Model allowlist
  • #15267 — Filter unconfigured providers
  • #20703display.model_picker_providers
  • OpenRouter: Cherry Studio #13245 — "OpenRouter has regional restrictions and disables the use of certain models based on your IP address"

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Feature]: Region-aware model filtering — hide geoblocked models from /model picker [1 pull requests, 1 participants]