diff --git a/agent/model_metadata.py b/agent/model_metadata.py index c578acf50..cd847aa82 100644 --- a/agent/model_metadata.py +++ b/agent/model_metadata.py @@ -94,10 +94,9 @@ DEFAULT_CONTEXT_LENGTHS = { "gpt-5": 128000, "gpt-5-codex": 128000, "gpt-5-nano": 128000, - "claude-opus-4-6": 200000, + # Bare model IDs without provider prefix (avoid duplicates with entries above) "claude-opus-4-5": 200000, "claude-opus-4-1": 200000, - "claude-sonnet-4-6": 200000, "claude-sonnet-4-5": 200000, "claude-sonnet-4": 200000, "claude-haiku-4-5": 200000, @@ -108,11 +107,7 @@ DEFAULT_CONTEXT_LENGTHS = { "minimax-m2.5": 204800, "minimax-m2.5-free": 204800, "minimax-m2.1": 204800, - "glm-5": 202752, - "glm-4.7": 202752, "glm-4.6": 202752, - "kimi-k2.5": 262144, - "kimi-k2-thinking": 262144, "kimi-k2": 262144, "qwen3-coder": 32768, "big-pickle": 128000, diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 8c914034c..932c32dcf 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -16,7 +16,6 @@ import os import platform import re import stat -import sys import subprocess import sys import tempfile diff --git a/hermes_state.py b/hermes_state.py index 396c4dbf9..a38870809 100644 --- a/hermes_state.py +++ b/hermes_state.py @@ -350,11 +350,12 @@ class SessionDB: .replace("%", "\\%") .replace("_", "\\_") ) - cursor = self._conn.execute( - "SELECT id FROM sessions WHERE id LIKE ? ESCAPE '\\' ORDER BY started_at DESC LIMIT 2", - (f"{escaped}%",), - ) - matches = [row["id"] for row in cursor.fetchall()] + with self._lock: + cursor = self._conn.execute( + "SELECT id FROM sessions WHERE id LIKE ? ESCAPE '\\' ORDER BY started_at DESC LIMIT 2", + (f"{escaped}%",), + ) + matches = [row["id"] for row in cursor.fetchall()] if len(matches) == 1: return matches[0] return None diff --git a/model_tools.py b/model_tools.py index c8682dacb..87d521091 100644 --- a/model_tools.py +++ b/model_tools.py @@ -101,7 +101,7 @@ def _discover_tools(): try: importlib.import_module(mod_name) except Exception as e: - logger.debug("Could not import %s: %s", mod_name, e) + logger.warning("Could not import tool module %s: %s", mod_name, e) _discover_tools()