Skip to content

Feature: Per-job compression model override for cron jobs #5438

@teknium1

Description

@teknium1

Problem

Per-job model and provider overrides work for the main chat model in cron jobs (via jobs.json), but compression still uses the global compression.summary_model from config.yaml. This means users who want their cron jobs to compress via a local model (e.g. Ollama) while keeping interactive chat compression on a cloud provider have no way to do so.

Current behavior

cron/scheduler.py passes per-job model and provider to AIAgent(), but the compression config is read from the global config.yaml compression section in run_agent.py (__init__, line ~1199). The auxiliary client resolves the compression model from the global config regardless of the per-job chat model/provider.

Desired behavior

Allow cron jobs to specify a compression model/provider that overrides the global config, so compression runs on the same infrastructure as the job's chat model. Two possible approaches:

  1. New per-job fields in jobs.json: compression_model and/or compression_provider that get passed through to the AIAgent and override the global compression config.
  2. Auto-inherit from per-job model: When a job specifies a custom model/provider, compression automatically uses the same provider (with a cheap model on that provider) instead of the global compression config.

Option 2 is probably the better UX — if someone sets a cron job to use Ollama, they likely want compression on Ollama too, not making external API calls.

Use case

"My crons should compress on Ollama while interactive chat compresses on whatever I want."
@Witcheer

Files involved

  • cron/scheduler.py — AIAgent instantiation (~line 570)
  • cron/jobs.py — job schema (model/provider fields, ~line 392)
  • run_agent.py — compression config reading (~line 1199)
  • agent/context_compressor.pysummary_model_override parameter
  • agent/auxiliary_client.py — compression model resolution
  • hermes_cli/config.py — DEFAULT_CONFIG compression section

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions