diff --git a/backend/ai-core/cmd/main.go b/backend/ai-core/cmd/main.go index f89a75b..65587de 100644 --- a/backend/ai-core/cmd/main.go +++ b/backend/ai-core/cmd/main.go @@ -1086,6 +1086,7 @@ func handleChat( ChannelType: req.Source.ChannelType, ChannelID: req.Source.ChannelID, BotUID: req.Source.BotUID, + AdapterName: req.Source.AdapterName, }) if err != nil { fallback := getFallbackMessage() diff --git a/backend/ai-core/internal/orchestrator/orchestrator.go b/backend/ai-core/internal/orchestrator/orchestrator.go index 212e704..7da2c88 100644 --- a/backend/ai-core/internal/orchestrator/orchestrator.go +++ b/backend/ai-core/internal/orchestrator/orchestrator.go @@ -154,6 +154,7 @@ type ProcessParams struct { ChannelType string // direct / group ChannelID string // platform channel ID (group ID or private OBv11 number) BotUID string // bot's own platform UID (e.g., OBv11 account) + AdapterName string // adapter config name for routing } // ProcessResult 处理结果 @@ -430,6 +431,7 @@ func (o *Orchestrator) ProcessInput( Mode: params.Mode, ChannelType: params.ChannelType, ChannelID: params.ChannelID, + AdapterName: params.AdapterName, } if prevEnrichment != nil { synthParams.MemorySummary = prevEnrichment.MemorySummary diff --git a/backend/ai-core/internal/orchestrator/synthesizer.go b/backend/ai-core/internal/orchestrator/synthesizer.go index f5d6000..4ef0e9f 100644 --- a/backend/ai-core/internal/orchestrator/synthesizer.go +++ b/backend/ai-core/internal/orchestrator/synthesizer.go @@ -54,6 +54,7 @@ type SynthesizeParams struct { Mode string // text / voice_assistant ChannelType string // direct / group ChannelID string // platform channel ID + AdapterName string // adapter config name } // Synthesize 综合所有子会话结果,流式生成最终回复。 @@ -97,7 +98,7 @@ func (s *Synthesizer) Synthesize(ctx context.Context, params SynthesizeParams, e // 自动注入当前会话的平台信息(reminder_create 需要知道来源) if tc.Name == "reminder_create" && params.ChannelType != "" { if _, ok := args["platform"]; !ok || args["platform"] == "" { - args["platform"] = "obv11" + args["platform"] = params.AdapterName } if _, ok := args["channel_type"]; !ok || args["channel_type"] == "" { args["channel_type"] = params.ChannelType