The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(multiplex): the home-keyed cache test no longer asks models.dev whether gpt-4o sees images
Tekniumcbe64d453dde
diff --git a/tests/tools/test_multiplex_tool_cache_scope.py b/tests/tools/test_multiplex_tool_cache_scope.pyindex 17b2c24ee87..01d4992ae24 100644--- a/tests/tools/test_multiplex_tool_cache_scope.py+++ b/tests/tools/test_multiplex_tool_cache_scope.py@@ -14,11 +14,19 @@ from agent.secret_scope import build_profile_secret_scope, reset_secret_scope, sfrom hermes_constants import reset_hermes_home_override, set_hermes_home_override+# Whether the main model sees images natively is a models.dev catalog verdict. A fresh home has no+# catalog, so without this the vision routing below fetched models.dev live, and a slow or failed+# fetch read as "unknown" -> aux vision (CI: `assert True is False` in profile A).+_CATALOG = {"openai": {"id": "openai", "models": {"gpt-4o": {+ "id": "gpt-4o", "tool_call": True, "attachment": True, "modalities": {"input": ["text", "image"]}}}}}++def _make_home(root: Path, cfg: dict, env: str = "") -> Path:root.mkdir(parents=True, exist_ok=True)(root / "config.yaml").write_text(yaml.safe_dump(cfg), encoding="utf-8")(root / ".env").write_text(env, encoding="utf-8")(root / "cache").mkdir(exist_ok=True)+ (root / "models_dev_cache.json").write_text(json.dumps(_CATALOG), encoding="utf-8")return root@@ -59,10 +67,14 @@ def test_home_keyed_caches_serve_each_profile_its_own_config(tmp_path, monkeypatimport agent.auxiliary_client as acimport agent.image_token_cost as itc+ from agent import models_devimport tools.computer_use.tool as cufrom tools import mcp_tool_loopac._reset_aux_semaphores()+ # The catalog memo is process-wide: start cold so the seeded disk catalog is what answers.+ monkeypatch.setattr(models_dev, "_models_dev_cache", {})+ monkeypatch.setattr(models_dev, "_models_dev_cache_time", 0)with _scoped(a):assert cu._should_route_through_aux_vision() is False # no explicit aux vision: native path