mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): consolidate chat runtime infra under chat/runtime
Move the lower-level runtime/infra modules out of multi_agent_chat/shared/ (they were never used by subagents, so they failed the shared-by-all-siblings rule) and unify them with the already-relocated checkpointer: agents/runtime/ -> agents/chat/runtime/ mac/shared/errors.py -> chat/runtime/errors.py mac/shared/llm_config.py -> chat/runtime/llm_config.py mac/shared/prompt_caching.py -> chat/runtime/prompt_caching.py mac/shared/mention_resolver.py -> chat/runtime/mention_resolver.py mac/shared/path_resolver.py -> chat/runtime/path_resolver.py These sit below the agent packages: the boundary + agent factory + shared middleware depend on them, and they import no agent code (acyclic).
This commit is contained in:
parent
7d866a2279
commit
f2a61bc0ef
52 changed files with 97 additions and 87 deletions
|
|
@ -227,7 +227,7 @@ global_llm_configs:
|
|||
|
||||
|
||||
def test_agent_config_from_yaml_explicit_overrides_resolver():
|
||||
from app.agents.chat.multi_agent_chat.shared.llm_config import AgentConfig
|
||||
from app.agents.chat.runtime.llm_config import AgentConfig
|
||||
|
||||
cfg_text_only = AgentConfig.from_yaml_config(
|
||||
{
|
||||
|
|
@ -256,7 +256,7 @@ def test_agent_config_from_yaml_explicit_overrides_resolver():
|
|||
def test_agent_config_from_yaml_unannotated_uses_resolver():
|
||||
"""Without an explicit YAML key, AgentConfig defers to the catalog
|
||||
resolver — for ``gpt-4o`` LiteLLM's map says supports_vision=True."""
|
||||
from app.agents.chat.multi_agent_chat.shared.llm_config import AgentConfig
|
||||
from app.agents.chat.runtime.llm_config import AgentConfig
|
||||
|
||||
cfg = AgentConfig.from_yaml_config(
|
||||
{
|
||||
|
|
@ -275,7 +275,7 @@ def test_agent_config_auto_mode_supports_image_input():
|
|||
so users can keep their selection on Auto with a vision-capable
|
||||
deployment somewhere in the pool. The router's own `allowed_fails`
|
||||
handles non-vision deployments via fallback."""
|
||||
from app.agents.chat.multi_agent_chat.shared.llm_config import AgentConfig
|
||||
from app.agents.chat.runtime.llm_config import AgentConfig
|
||||
|
||||
auto = AgentConfig.from_auto_mode()
|
||||
assert auto.supports_image_input is True
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ async def test_get_vision_llm_global_openrouter_sets_api_base():
|
|||
return_value=cfg,
|
||||
),
|
||||
patch(
|
||||
"app.agents.chat.multi_agent_chat.shared.llm_config.SanitizedChatLiteLLM",
|
||||
"app.agents.chat.runtime.llm_config.SanitizedChatLiteLLM",
|
||||
new=FakeSanitized,
|
||||
),
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue