refactor(agent): inject runtime model publisher
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
Xubin Ren
co-authored by
Cursor
parent
6554c1f832
commit
13eede5803
@@ -633,6 +633,7 @@ def _run_gateway(
|
||||
from nanobot.agent.tools.message import MessageTool
|
||||
from nanobot.bus.queue import MessageBus
|
||||
from nanobot.channels.manager import ChannelManager
|
||||
from nanobot.channels.websocket import publish_runtime_model_update
|
||||
from nanobot.cron.service import CronService
|
||||
from nanobot.cron.types import CronJob
|
||||
from nanobot.heartbeat.service import HeartbeatService
|
||||
@@ -672,6 +673,11 @@ def _run_gateway(
|
||||
"aihubmix": config.providers.aihubmix,
|
||||
},
|
||||
provider_snapshot_loader=load_provider_snapshot,
|
||||
runtime_model_publisher=lambda model, preset: publish_runtime_model_update(
|
||||
bus,
|
||||
model,
|
||||
preset,
|
||||
),
|
||||
provider_signature=provider_snapshot.signature,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user