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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user