diff --git a/pkg/channels/http/http.go b/pkg/channels/http/http.go index 403e1ce23..26470f6d8 100644 --- a/pkg/channels/http/http.go +++ b/pkg/channels/http/http.go @@ -34,12 +34,12 @@ func (c *HTTPChannel) Stop(ctx context.Context) error { return nil } -func (c *HTTPChannel) Send(ctx context.Context, msg bus.OutboundMessage) error { +func (c *HTTPChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]string, error) { logger.InfoCF("channels", "HTTP channel received outbound message", map[string]any{ "chat_id": msg.ChatID, "content": msg.Content, }) // For synchronous HTTP, the response is usually handled by the caller of ProcessDirectWithChannel. // Asynchronous messages (e.g. from subagents) will just be logged here for now. - return nil + return nil, nil } diff --git a/pkg/config/migration.go b/pkg/config/migration.go index 7430050b3..78be9b78b 100644 --- a/pkg/config/migration.go +++ b/pkg/config/migration.go @@ -539,7 +539,7 @@ func mergeAPIKeys(apiKey string, apiKeys []string) []string { seen := make(map[string]struct{}) var all []string - if k := strings.TrimSpace(apiKey); k != "" { + if k := strings.TrimSpace(apiKey); k != "" && k != "[NOT_HERE]" { if _, exists := seen[k]; !exists { seen[k] = struct{}{} all = append(all, k) @@ -547,7 +547,7 @@ func mergeAPIKeys(apiKey string, apiKeys []string) []string { } for _, k := range apiKeys { - if trimmed := strings.TrimSpace(k); trimmed != "" { + if trimmed := strings.TrimSpace(k); trimmed != "" && trimmed != "[NOT_HERE]" { if _, exists := seen[trimmed]; !exists { seen[trimmed] = struct{}{} all = append(all, trimmed) diff --git a/pkg/health/server.go b/pkg/health/server.go index 736479eda..9410f845e 100644 --- a/pkg/health/server.go +++ b/pkg/health/server.go @@ -271,9 +271,14 @@ func (s *Server) readyHandler(w http.ResponseWriter, r *http.Request) { }) } +// HandlerMux defines the interface for an HTTP request multiplexer. +type HandlerMux interface { + HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) +} + // RegisterOnMux registers /health, /ready, /reload and /chat handlers onto the // given mux. This allows the health endpoints to be served by a shared HTTP server. -func (s *Server) RegisterOnMux(mux Mux) { +func (s *Server) RegisterOnMux(mux HandlerMux) { mux.HandleFunc("/health", s.healthHandler) mux.HandleFunc("/ready", s.readyHandler) mux.HandleFunc("/reload", s.reloadHandler) diff --git a/pkg/providers/factory_provider.go b/pkg/providers/factory_provider.go index ddad48a94..60311ba18 100644 --- a/pkg/providers/factory_provider.go +++ b/pkg/providers/factory_provider.go @@ -222,6 +222,7 @@ func CreateProviderFromConfig(cfg *config.ModelConfig) (LLMProvider, string, err "vivgrid", "volcengine", "vllm", "qwen", "qwen-intl", "qwen-international", "dashscope-intl", "qwen-us", "dashscope-us", "mistral", "avian", "longcat", "modelscope", "novita", "coding-plan", "alibaba-coding", "qwen-coding", "mimo": + // All other OpenAI-compatible HTTP providers if cfg.APIKey() == "" && cfg.APIBase == "" && !isEmptyAPIKeyAllowed(protocol) { return nil, "", fmt.Errorf("api_key or api_base is required for HTTP-based protocol %q", protocol) diff --git a/web/backend/api/skills.go b/web/backend/api/skills.go index 481a52858..329225ce6 100644 --- a/web/backend/api/skills.go +++ b/web/backend/api/skills.go @@ -610,6 +610,7 @@ func findWorkspaceSkillByDirectory(cfg *config.Config, directory string) *skillS func findWorkspaceSkillInfoByDirectory(workspace, directory string) *skills.SkillInfo { loader := skills.NewSkillsLoader(workspace, "", "", "", nil, false) + for _, skill := range loader.ListSkills() { if skill.Source != "workspace" { continue