mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): move llm_config + prompt_caching to app/agents/shared (slice 4b)
Relocate the mutually-dependent LLM config layer and the LiteLLM prompt-caching
helper to the shared kernel as one unit, rewiring their internal cross-reference
to the shared paths. Flip 21 non-frozen importers. Re-export shims remain at
new_chat/{llm_config,prompt_caching}.py for the frozen single-agent stack
(chat_deepagent); they will be removed when that stack is retired.
This commit is contained in:
parent
8fca2753aa
commit
946f8a8c5d
23 changed files with 928 additions and 882 deletions
|
|
@ -32,7 +32,7 @@ from app.agents.new_chat.checkpointer import get_checkpointer
|
|||
from app.agents.shared.context import SurfSenseContextSchema
|
||||
from app.agents.shared.errors import BusyError
|
||||
from app.agents.shared.filesystem_selection import FilesystemMode, FilesystemSelection
|
||||
from app.agents.new_chat.llm_config import (
|
||||
from app.agents.shared.llm_config import (
|
||||
AgentConfig,
|
||||
create_chat_litellm_from_agent_config,
|
||||
create_chat_litellm_from_config,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from __future__ import annotations
|
|||
from typing import Any
|
||||
|
||||
from app.agents.shared.filesystem_selection import FilesystemSelection
|
||||
from app.agents.new_chat.llm_config import AgentConfig
|
||||
from app.agents.shared.llm_config import AgentConfig
|
||||
from app.db import ChatVisibility
|
||||
from app.services.connector_service import ConnectorService
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ tells the user what to change.
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.agents.new_chat.llm_config import AgentConfig
|
||||
from app.agents.shared.llm_config import AgentConfig
|
||||
from app.observability import otel as ot
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ from app.prompts import TITLE_GENERATION_PROMPT
|
|||
from app.services.new_streaming_service import VercelStreamingService
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.agents.new_chat.llm_config import AgentConfig
|
||||
from app.agents.shared.llm_config import AgentConfig
|
||||
from app.services.token_tracking_service import TokenAccumulator
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ from typing import Any
|
|||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.agents.new_chat.llm_config import (
|
||||
from app.agents.shared.llm_config import (
|
||||
AgentConfig,
|
||||
create_chat_litellm_from_agent_config,
|
||||
create_chat_litellm_from_config,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from dataclasses import dataclass
|
|||
from typing import TYPE_CHECKING
|
||||
from uuid import UUID
|
||||
|
||||
from app.agents.new_chat.llm_config import AgentConfig
|
||||
from app.agents.shared.llm_config import AgentConfig
|
||||
from app.db import shielded_async_session
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue