hermes-agent/tests/plugins/model_providers
emozilla 1908dd09fc fix(agent): size the Ollama context window from /api/ps, not the trained max
Ollama sizes a model's real context window by free VRAM at load time,
often far below the GGUF trained max that /api/show reports, and its
OpenAI-compatible endpoint has no options passthrough — per-request
num_ctx and keep_alive are silently dropped, so the window cannot be
controlled from the client. The compressor was being sized to the
trained max (e.g. 262K for a model actually running at 32K).

- Add query_ollama_loaded_context() reading the effective window from
  /api/ps (60s cache, never persisted — transient load state).
- Reconcile after each successful response via
  sync_ollama_loaded_context(): resize the compressor to the loaded
  window and warn when it is below the tool-use minimum. Selection
  surfaces keep showing the trained max; explicit model.context_length
  still wins. No-op for non-Ollama providers.
- Refresh model.ollama_keep_alive through the native API (rate-limited
  /api/generate ping) since /v1 drops it.
- Remove the inert num_ctx/keep_alive request-body plumbing; warn that
  model.ollama_num_ctx has no effect and point at OLLAMA_CONTEXT_LENGTH
  / Modelfile num_ctx. Keep detection for the pre-flight window check.
- Disable thinking on Ollama thinking models via reasoning_effort
  'none' — the only switch its /v1 handler parses (think is dropped).
2026-07-14 11:26:36 -04:00
..
test_custom_profile.py fix(agent): size the Ollama context window from /api/ps, not the trained max 2026-07-14 11:26:36 -04:00
test_deepseek_profile.py fix(deepseek): set default_aux_model on profile so aux warning stops firing 2026-05-16 22:54:22 -07:00
test_fireworks_profile.py fix(providers): align Fireworks integration with project policy 2026-07-11 05:43:35 -07:00
test_kimi_profile.py fix(kimi): send thinking xor reasoning_effort, never both 2026-06-07 01:24:29 -07:00
test_minimax_profile.py fix: route minimax m3 reasoning controls through profile 2026-06-15 07:08:43 -07:00
test_ollama_cloud_profile.py feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
test_opencode_go_profile.py feat(providers): GLM-5.2 native reasoning_effort controls (#58884) 2026-07-05 13:48:01 -07:00
test_zai_profile.py feat(providers): GLM-5.2 native reasoning_effort controls (#58884) 2026-07-05 13:48:01 -07:00