# NousResearch/hermes-agent · Context length auto-detection for custom providers

## Open now

- 2 issues, 2 PRs open on GitHub.
- #24640: \[Bug\]:
- #31272: \[Bug\]: Auto-detect context length not working correctly with oMLX
- PR #25675: fix(context): read oMLX admin context window
- PR #109603: fix(dashboard): resolve the runtime provider before auto-detecting context length

These issues and pull requests address adding and fixing automatic context length detection for custom model providers, including oMLX endpoints, CLI display, fuzzy matching, and integration with models.dev for provider-aware resolution.

## TL;DR

- 10 member(s): 2 open issue(s), 1 closed issue(s), 2 open PR(s), 1 merged PR(s), 4 PR(s) closed without merging.
- A fix was merged to main in PR #108907. Verify it addresses your case.
- **Recommended:** read PR #108907 (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: `partially_resolved` · deciding PR(s): `pr-108907`. 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.19`: 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

- #24640: \[Bug\]:
- #31272: \[Bug\]: Auto-detect context length not working correctly with oMLX

## Closed / duplicate issues

- #2513: \[Bug\]: Custom providers lack context length auto-detection when saved via /model command

## Prior & competing PRs

- **#108907: fix(cli): custom-provider wizard reports the auto-detected context length when left blank (#2513)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `hermes_cli/model_setup_flows_custom.py`, `tests/hermes_cli/test_custom_provider_context_feedback.py`
- **#2514: feat: auto-detect and display context length for custom providers #2513**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`
- **#2522: fix(cli): auto-detect context length for custom providers when not specified**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#2514`, `#2513`
- **#25675: fix(context): read oMLX admin context window**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#24640`, `#31272`, `#31272`
  - files: `agent/model_metadata.py`, `tests/agent/test_model_metadata_local_ctx.py`
- **#83696: fix(context): read oMLX admin context window**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#25675`, `#25675`
- **#85499: fix(cli): show context-length detection result when saving custom provider**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `e8016a18c13a`, `#108907`, `#2513`
- **#109603: fix(dashboard): resolve the runtime provider before auto-detecting context length**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `hermes_cli/web_routers/models.py`, `tests/hermes_cli/test_model_info_custom_provider_context.py`

## Fix status

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