# NousResearch/hermes-agent · Context length fallback ignoring catalog on custom endpoints

## Open now

- 1 issue, 0 PRs open on GitHub.
- #15563: get_model_context_length step 2 short-circuits to 128K default; resolve_display_context_length skips config_context_length

Most members describe the same issue: for models behind custom gateway or proxy base_urls, context length resolution falls back to a generic default (128K/256K) instead of consulting DEFAULT_CONTEXT_LENGTHS or config_context_length. One member is a broad batch of ten unrelated low-risk fixes that may only partly overlap with this theme.

## TL;DR

- 6 member(s): 1 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- A fix was merged to main in PR #41651. Verify it addresses your case.
- **Recommended:** read PR #41651 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.29`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #15563: get_model_context_length step 2 short-circuits to 128K default; resolve_display_context_length skips config_context_length

## Closed / duplicate issues

- #38865: Context length falls back to 256K for Anthropic models behind a custom gateway base_url, ignoring the DEFAULT_CONTEXT_LENGTHS catalog

## Prior & competing PRs

- **#15732: fix(context-length): fall through to catalog when endpoint probe misses; pass config_context_length to display resolver**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#41651: fix: batch salvage of 10 low-risk fixes (@islam666)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/context_compressor.py`, `agent/image_routing.py`, `agent/model_metadata.py`, `gateway/platforms/weixin.py`, `hermes_cli/gateway.py`, `hermes_cli/profile_distribution.py`, `hermes_cli/profiles.py`, `hermes_cli/web_server.py`, `plugins/google_meet/meet_bot.py`, `plugins/model-providers/xiaomi/__init__.py`, `providers/base.py`, `run_agent.py`, `scripts/release.py`, `tests/agent/test_custom_providers_vision.py`, `tests/agent/test_model_metadata.py`, `tests/gateway/test_weixin_typing.py`, `tests/hermes_cli/test_profile_distribution.py`, `tests/hermes_cli/test_systemd_optional_directives.py`, `tests/hermes_cli/test_web_server.py`, `tests/run_agent/test_infinite_compaction_loop.py` (+2 more)
- **#38911: fix(model): use catalog fallback for proxied Anthropic contexts**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `2e61de06388ac0cb184198e1bfddb3d0f41b638a`
- **#39198: fix(model_metadata): consult DEFAULT_CONTEXT_LENGTHS before 256K fallback on custom endpoints**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#41651`

## Fix status

- Merged to main in PR #41651 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-06-08`.
- Subsystem: `agent`
