From 51a5652be8222ab99a1925cb1d2ee0e598540897 Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Fri, 29 May 2026 09:33:13 -0400 Subject: [PATCH] refactor(ai): relocate AI providers from plugin/ai to ai/providers (move-only, unwired) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move plugin/ai/{anthropic,openai,generic} to ai/providers/{anthropic,openai,generic}. These packages implement ai.AIProvider (not plugin contracts), belong alongside ai/llm and ai/copilot, and had zero importers. Added doc comment on each New() constructor noting the future activation site (plugins/ai/plugin.go aiRegistry.RegisterProvider). No behavior change — packages were unwired before and remain unwired after. Co-Authored-By: Claude Sonnet 4.6 --- {plugin/ai => ai/providers}/anthropic/plugin.go | 4 ++++ {plugin/ai => ai/providers}/generic/plugin.go | 4 ++++ {plugin/ai => ai/providers}/openai/plugin.go | 4 ++++ 3 files changed, 12 insertions(+) rename {plugin/ai => ai/providers}/anthropic/plugin.go (97%) rename {plugin/ai => ai/providers}/generic/plugin.go (97%) rename {plugin/ai => ai/providers}/openai/plugin.go (97%) diff --git a/plugin/ai/anthropic/plugin.go b/ai/providers/anthropic/plugin.go similarity index 97% rename from plugin/ai/anthropic/plugin.go rename to ai/providers/anthropic/plugin.go index 0225742c..0894b61a 100644 --- a/plugin/ai/anthropic/plugin.go +++ b/ai/providers/anthropic/plugin.go @@ -36,6 +36,10 @@ type Provider struct { } // New creates a new Anthropic AIProvider. +// +// NOTE: This provider is currently unwired. The activation site is +// plugins/ai/plugin.go via aiRegistry.RegisterProvider(New(cfg)) — +// do NOT wire it via initAIService. func New(cfg Config) (*Provider, error) { apiKey := cfg.APIKey if apiKey == "" { diff --git a/plugin/ai/generic/plugin.go b/ai/providers/generic/plugin.go similarity index 97% rename from plugin/ai/generic/plugin.go rename to ai/providers/generic/plugin.go index 497c3b7c..07cd4aae 100644 --- a/plugin/ai/generic/plugin.go +++ b/ai/providers/generic/plugin.go @@ -47,6 +47,10 @@ type Provider struct { } // New creates a new generic OpenAI-compatible provider. +// +// NOTE: This provider is currently unwired. The activation site is +// plugins/ai/plugin.go via aiRegistry.RegisterProvider(New(cfg)) — +// do NOT wire it via initAIService. func New(cfg Config) (*Provider, error) { if cfg.Name == "" { return nil, fmt.Errorf("generic: provider name is required") diff --git a/plugin/ai/openai/plugin.go b/ai/providers/openai/plugin.go similarity index 97% rename from plugin/ai/openai/plugin.go rename to ai/providers/openai/plugin.go index b7a9d935..253ce1b9 100644 --- a/plugin/ai/openai/plugin.go +++ b/ai/providers/openai/plugin.go @@ -34,6 +34,10 @@ type Provider struct { } // New creates a new OpenAI AIProvider. +// +// NOTE: This provider is currently unwired. The activation site is +// plugins/ai/plugin.go via aiRegistry.RegisterProvider(New(cfg)) — +// do NOT wire it via initAIService. func New(cfg Config) (*Provider, error) { apiKey := cfg.APIKey if apiKey == "" {