hermes-agent/tests/cron
ScotterMonk d9cdb81923 feat(config): support per-model reasoning_effort overrides
Add agent.reasoning_overrides dict to config.yaml. Users can now set
a reasoning_effort per model, overriding the global agent.reasoning_effort.

Example:
  agent:
    reasoning_effort: "medium"       # global default
    reasoning_overrides:
      "openrouter/anthropic/claude-opus-4.5": "xhigh"
      "openai/gpt-5": "low"
      "claude-sonnet-4.6": "high"    # bare model name also works

The helper is spelling-tolerant: override keys match regardless of
provider prefix or dots-vs-dashes normalization, so users can write
keys in any sensible form and they'll match.

Resolution priority:
1. Session-scoped /reasoning --session override (gateway only; unchanged)
2. Per-model override from agent.reasoning_overrides (spelling-tolerant)
3. Global agent.reasoning_effort (existing)
4. Provider default (unchanged)

Wired into:
- CLI startup (cli.py)
- Messaging gateway agent construction (gateway/run.py)
- Desktop/TUI _load_reasoning_config (tui_gateway/server.py)
- Cron job scheduler (cron/scheduler.py)
- /model mid-session switch (agent/agent_runtime_helpers.py)
  + _primary_runtime now tracks reasoning_config for correct fallback recovery
- Fallback activation (agent/chat_completion_helpers.py::try_activate_fallback)
  + Re-resolves reasoning_config for the fallback model (best-effort)

Closes #21256 (per-model reasoning_effort defaults).

Note: no hermes config set agent.reasoning_overrides.<model> support;
users edit the YAML directly. _set_nested splits on "." and would
corrupt model keys containing version dots.
2026-07-14 11:46:40 -07:00
..
__init__.py
…
conftest.py
…
test_blueprint_catalog.py
…
test_claim_job_for_fire.py
…
test_codex_execution_paths.py
…
test_compute_next_run_last_run_at.py
…
test_cron_context_from.py
…
test_cron_direct_api_call_62151.py
…
test_cron_inactivity_timeout.py
…
test_cron_no_agent.py
…
test_cron_profile_isolation.py
…
test_cron_prompt_injection_skill.py
…
test_cron_provider_pin.py
…
test_cron_script.py
…
test_cron_workdir.py
…
test_cronjob_schema.py
…
test_file_permissions.py
…
test_jobs.py
…
test_jobs_changed_notify.py
…
test_jobs_crossprocess_lock.py
…
test_parallel_pool.py
…
test_reasoning_config_per_model.py
…
test_rewrite_skill_refs.py
…
test_run_one_job.py
…
test_scheduler.py
…
test_scheduler_mcp_init.py
…
test_scheduler_provider.py
…
test_scheduler_shutdown_guard.py
…
test_script_claim_heartbeat.py
…
test_sessiondb_init_hang.py
…
test_shutdown_interrupt.py
…
test_suggestions.py
…
test_terminal_cwd_lock.py
…
test_ticker_stall_60703.py
…