From 1eaeb73839fe928804a858083e95fe5c2957cd3e Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Wed, 9 Sep 2026 21:08:22 +0530 Subject: [PATCH] fix(models): OpenRouter disk snapshot follows the configured catalog TTL, not the default constant refresh_interval_seconds() honours model_catalog.ttl_minutes / legacy ttl_hours; reading DEFAULT_TTL_MINUTES would let the snapshot and the manifest it is filtered from go stale on different clocks for anyone who changed the TTL. --- hermes_cli/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hermes_cli/models.py b/hermes_cli/models.py index 96071d4cc0..d3e5046cfd 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -154,9 +154,10 @@ _openrouter_catalog_cache: list[tuple[str, str]] | None = None def _openrouter_catalog_disk_ttl() -> float: - from hermes_cli.model_catalog import DEFAULT_TTL_MINUTES + """Same TTL as the catalog manifest this list is filtered from (honours ``model_catalog.ttl_minutes``).""" + from hermes_cli.model_catalog import refresh_interval_seconds - return DEFAULT_TTL_MINUTES * 60.0 + return refresh_interval_seconds() def _openrouter_catalog_disk_path() -> Path: