Add experiment for agent config (#9861)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Rohit Malhotra
2025-07-29 13:56:28 -04:00
committed by GitHub
parent 5553584056
commit 5b13cfc2a0
2 changed files with 16 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ from openhands.events.observation.agent import RecallObservation
from openhands.events.observation.error import ErrorObservation
from openhands.events.serialization import event_from_dict, event_to_dict
from openhands.events.stream import EventStreamSubscriber
from openhands.experiments.experiment_manager import ExperimentManagerImpl
from openhands.llm.llm import LLM
from openhands.runtime.runtime_status import RuntimeStatus
from openhands.server.session.agent_session import AgentSession
@@ -157,6 +158,10 @@ class Session:
llm = self._create_llm(agent_cls)
agent_config = self.config.get_agent_config(agent_cls)
agent_config = ExperimentManagerImpl.run_agent_config_variant_test(
self.user_id, self.sid, agent_config
)
if settings.enable_default_condenser:
# Default condenser chains three condensers together:
# 1. a conversation window condenser that handles explicit