hermes-agent/tests/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
..
__init__.py feat: provider modules — ProviderProfile ABC, 33 providers, fetch_models, transport single-path 2026-05-05 13:40:01 -07:00
test_e2e_wiring.py fix(agent): size the Ollama context window from /api/ps, not the trained max 2026-07-14 11:26:36 -04:00
test_fetch_models_base_url.py compare full origin (scheme, host, port), not hostname, before keeping credentials 2026-07-11 12:28:55 +05:30
test_plugin_discovery.py feat(providers): add Fireworks AI as preferred provider 2026-07-11 05:43:35 -07:00
test_profile_wiring.py fix(openrouter): never send reasoning field for adaptive Anthropic models (#43012) 2026-06-10 00:18:23 +05:30
test_provider_profiles.py feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
test_transport_parity.py fix(agent): size the Ollama context window from /api/ps, not the trained max 2026-07-14 11:26:36 -04:00