From b8bbcb38c56799aa68c3dc88ef517ff8e2fcf165 Mon Sep 17 00:00:00 2001 From: Seif Ghazi Date: Mon, 4 Aug 2025 22:41:12 -0400 Subject: [PATCH] add warning --- proxy/internal/service/model_router.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/proxy/internal/service/model_router.go b/proxy/internal/service/model_router.go index 8e5d4f0..2fba7fc 100644 --- a/proxy/internal/service/model_router.go +++ b/proxy/internal/service/model_router.go @@ -134,6 +134,7 @@ func (r *ModelRouter) loadCustomAgents() { fmt.Sprintf("%s/.claude/agents/%s.md", os.Getenv("HOME"), agentName), } + found := false for _, path := range paths { content, err := os.ReadFile(path) if err != nil { @@ -159,9 +160,18 @@ func (r *ModelRouter) loadCustomAgents() { TargetProvider: providerName, FullPrompt: staticPrompt, } + found = true break } } + + // Log warning if subagent is mapped but definition not found + if !found { + r.logger.Printf("⚠️ Subagent '%s' is mapped to '%s' but definition file not found in:\n", agentName, targetModel) + for _, path := range paths { + r.logger.Printf(" - %s\n", path) + } + } } // Pretty print loaded subagents