Skip to content

refactor(ai): relocate misfiled AI providers plugin/ai → ai/providers#796

Merged
intel352 merged 1 commit into
mainfrom
refactor/move-ai-providers-20260529
May 29, 2026
Merged

refactor(ai): relocate misfiled AI providers plugin/ai → ai/providers#796
intel352 merged 1 commit into
mainfrom
refactor/move-ai-providers-20260529

Conversation

@intel352
Copy link
Copy Markdown
Contributor

What moved

Three packages relocated from plugin/ai/ to ai/providers/:

  • plugin/ai/anthropicai/providers/anthropic
  • plugin/ai/openaiai/providers/openai
  • plugin/ai/genericai/providers/generic

Why

These packages implement ai.AIProvider (Name/Models/Complete/CompleteStream/SupportsToolUse/ToolComplete) — they are not plugin contracts. They belong alongside ai/llm and ai/copilot in the ai/ tree, not under plugin/.

Move-only — zero behavior change

  • They had zero importers before this PR (confirmed by grep).
  • They remain unwired after this PR.
  • Import paths inside each file (github.com/GoCodeAlone/workflow/ai) are unchanged — ai/ stayed in place.
  • A short doc comment was added to each New(...) constructor noting the future activation site: plugins/ai/plugin.go via aiRegistry.RegisterProvider(...) (the AIModelRegistry owner) — not initAIService.

Verification

  • go build ./... — clean
  • go test ./ai/... ./cmd/server/... — all pass
  • go vet ./ai/... — clean
  • gofmt -l ai/providers/ — clean
  • golangci-lint run ./ai/providers/... — 0 issues
  • grep -r "workflow/plugin/ai" . — zero matches remaining

🤖 Generated with Claude Code

…ove-only, unwired)

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 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@intel352 intel352 merged commit 42ac14a into main May 29, 2026
22 checks passed
@intel352 intel352 deleted the refactor/move-ai-providers-20260529 branch May 29, 2026 13:44
@github-actions
Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:298: parsing iteration count: invalid syntax
baseline-bench.txt:301847: parsing iteration count: invalid syntax
baseline-bench.txt:617175: parsing iteration count: invalid syntax
baseline-bench.txt:958429: parsing iteration count: invalid syntax
baseline-bench.txt:1288640: parsing iteration count: invalid syntax
baseline-bench.txt:1642416: parsing iteration count: invalid syntax
benchmark-results.txt:301: parsing iteration count: invalid syntax
benchmark-results.txt:406172: parsing iteration count: invalid syntax
benchmark-results.txt:796686: parsing iteration count: invalid syntax
benchmark-results.txt:1196338: parsing iteration count: invalid syntax
benchmark-results.txt:1576568: parsing iteration count: invalid syntax
benchmark-results.txt:1970463: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │       sec/op       │    sec/op     vs base               │
InterpreterCreation-4               9.931m ± 65%   7.844m ± 66%  -21.02% (p=0.026 n=6)
ComponentLoad-4                     3.465m ±  1%   2.846m ±  3%  -17.87% (p=0.002 n=6)
ComponentExecute-4                  1.842µ ±  2%   1.417µ ±  1%  -23.05% (p=0.002 n=6)
PoolContention/workers-1-4         1040.5n ±  4%   815.7n ±  3%  -21.60% (p=0.002 n=6)
PoolContention/workers-2-4         1018.5n ±  3%   793.9n ±  3%  -22.06% (p=0.002 n=6)
PoolContention/workers-4-4         1029.0n ±  2%   789.2n ±  3%  -23.31% (p=0.002 n=6)
PoolContention/workers-8-4         1014.5n ±  2%   815.4n ±  4%  -19.62% (p=0.002 n=6)
PoolContention/workers-16-4        1032.0n ±  2%   802.2n ±  2%  -22.27% (p=0.002 n=6)
ComponentLifecycle-4                3.612m ±  3%   2.827m ±  3%  -21.75% (p=0.002 n=6)
SourceValidation-4                  2.140µ ±  3%   1.649µ ±  1%  -22.93% (p=0.002 n=6)
RegistryConcurrent-4                807.0n ±  5%   582.1n ±  3%  -27.87% (p=0.002 n=6)
LoaderLoadFromString-4              3.653m ±  4%   2.993m ±  3%  -18.05% (p=0.002 n=6)
geomean                             18.54µ         14.49µ        -21.82%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.818 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.197 n=6)
ComponentExecute-4                  1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4         1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                2.183Mi ± 0%   2.183Mi ± 0%       ~ (p=0.394 n=6)
SourceValidation-4                  1.984Ki ± 0%   1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                1.133Ki ± 0%   1.133Ki ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4              2.182Mi ± 0%   2.182Mi ± 0%  +0.00% (p=0.045 n=6)
geomean                             15.25Ki        15.25Ki       -0.00%
¹ all samples are equal

                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │     allocs/op      │  allocs/op   vs base                │
InterpreterCreation-4                15.68k ± 0%   15.68k ± 0%       ~ (p=1.000 n=6)
ComponentLoad-4                      18.02k ± 0%   18.02k ± 0%       ~ (p=1.000 n=6)
ComponentExecute-4                    25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4           25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                 18.07k ± 0%   18.07k ± 0%       ~ (p=1.000 n=6) ¹
SourceValidation-4                    32.00 ± 0%    32.00 ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                  2.000 ± 0%    2.000 ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4               18.06k ± 0%   18.06k ± 0%       ~ (p=1.000 n=6) ¹
geomean                               183.3         183.3       +0.00%
¹ all samples are equal

pkg: github.com/GoCodeAlone/workflow/middleware
                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │       sec/op       │   sec/op     vs base               │
CircuitBreakerDetection-4                  297.1n ± 5%   233.6n ± 4%  -21.37% (p=0.002 n=6)
CircuitBreakerExecution_Success-4          22.66n ± 0%   17.59n ± 2%  -22.37% (p=0.002 n=6)
CircuitBreakerExecution_Failure-4          70.91n ± 0%   55.37n ± 0%  -21.91% (p=0.002 n=6)
geomean                                    78.15n        61.05n       -21.89%

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │        B/op        │    B/op     vs base                │
CircuitBreakerDetection-4                 144.0 ± 0%     144.0 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │     allocs/op      │ allocs/op   vs base                │
CircuitBreakerDetection-4                 1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
                                 │ baseline-bench.txt │        benchmark-results.txt        │
                                 │       sec/op       │    sec/op     vs base               │
IaCStateBackend_InProcess-4              328.2n ± 13%   222.8n ±  2%  -32.10% (p=0.002 n=6)
IaCStateBackend_GRPC-4                  10.297m ±  1%   8.245m ± 16%  -19.93% (p=0.002 n=6)
JQTransform_Simple-4                     671.6n ± 26%   572.7n ± 14%  -14.72% (p=0.009 n=6)
JQTransform_ObjectConstruction-4         1.398µ ±  1%   1.100µ ±  2%  -21.29% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.406µ ±  2%   2.820µ ±  6%  -17.20% (p=0.002 n=6)
JQTransform_Complex-4                    41.85µ ±  2%   33.59µ ±  1%  -19.75% (p=0.002 n=6)
JQTransform_Throughput-4                 1.714µ ±  1%   1.399µ ±  4%  -18.33% (p=0.002 n=6)
SSEPublishDelivery-4                     64.34n ±  1%   49.49n ±  2%  -23.07% (p=0.002 n=6)
geomean                                  3.865µ         3.055µ        -20.96%

                                 │ baseline-bench.txt │        benchmark-results.txt         │
                                 │        B/op        │     B/op      vs base                │
IaCStateBackend_InProcess-4              416.0 ± 0%       416.0 ± 0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                 5.737Mi ± 7%     5.648Mi ± 8%       ~ (p=0.699 n=6)
JQTransform_Simple-4                   1.273Ki ± 0%     1.273Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4       1.773Ki ± 0%     1.773Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4              2.625Ki ± 0%     2.625Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                  16.31Ki ± 0%     16.31Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4               1.984Ki ± 0%     1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                 -0.19%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │        benchmark-results.txt        │
                                 │     allocs/op      │  allocs/op   vs base                │
IaCStateBackend_InProcess-4              2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                  6.856k ± 0%     6.859k ± 0%       ~ (p=0.552 n=6)
JQTransform_Simple-4                     10.00 ± 0%      10.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4         15.00 ± 0%      15.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4                30.00 ± 0%      30.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                    328.0 ± 0%      328.0 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4                 17.00 ± 0%      17.00 ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
                                    │ baseline-bench.txt │        benchmark-results.txt        │
                                    │       sec/op       │    sec/op     vs base               │
SchemaValidation_Simple-4                   1074.5n ± 5%   854.1n ± 12%  -20.51% (p=0.002 n=6)
SchemaValidation_AllFields-4                 1.641µ ± 4%   1.255µ ±  5%  -23.55% (p=0.002 n=6)
SchemaValidation_FormatValidation-4          1.550µ ± 1%   1.218µ ±  3%  -21.42% (p=0.002 n=6)
SchemaValidation_ManySchemas-4               1.584µ ± 3%   1.235µ ±  2%  -22.04% (p=0.002 n=6)
geomean                                      1.442µ        1.127µ        -21.89%

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │        B/op        │    B/op     vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │     allocs/op      │ allocs/op   vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
                                   │ baseline-bench.txt │         benchmark-results.txt         │
                                   │       sec/op       │    sec/op      vs base                │
EventStoreAppend_InMemory-4               1026.5n ± 37%   774.5n ±   7%   -24.55% (p=0.002 n=6)
EventStoreAppend_SQLite-4                  1.052m ±  4%   7.256m ± 216%  +589.42% (p=0.002 n=6)
GetTimeline_InMemory/events-10-4          13.454µ ±  5%   8.189µ ±   1%   -39.13% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           74.17µ ±  3%   45.24µ ±   1%   -39.00% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4         148.00µ ±  3%   90.06µ ±   2%   -39.15% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          584.6µ ±  1%   462.3µ ±   1%   -20.92% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4        1187.3µ ±  4%   950.3µ ±   4%   -19.96% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             86.74µ ±  9%   72.35µ ±   3%   -16.60% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             225.0µ ±  1%   187.5µ ±   2%   -16.66% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            394.1µ ±  2%   330.2µ ±   6%   -16.20% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.716m ±  5%   1.430m ±   2%   -16.67% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.433m ±  4%   2.751m ±   4%   -19.86% (p=0.002 n=6)
geomean                                    203.4µ         183.4µ           -9.82%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                 745.0 ± 14%     802.5 ± 8%       ~ (p=0.249 n=6)
EventStoreAppend_SQLite-4                 1.983Ki ±  2%   1.988Ki ± 3%       ~ (p=0.729 n=6)
GetTimeline_InMemory/events-10-4          7.953Ki ±  0%   7.953Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4          46.62Ki ±  0%   46.62Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4         94.48Ki ±  0%   94.48Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4         472.8Ki ±  0%   472.8Ki ± 0%       ~ (p=0.080 n=6)
GetTimeline_InMemory/events-1000-4        944.3Ki ±  0%   944.3Ki ± 0%       ~ (p=0.394 n=6)
GetTimeline_SQLite/events-10-4            16.74Ki ±  0%   16.74Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4            87.14Ki ±  0%   87.14Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4           175.4Ki ±  0%   175.4Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4           846.1Ki ±  0%   846.1Ki ± 0%       ~ (p=0.238 n=6)
GetTimeline_SQLite/events-1000-4          1.639Mi ±  0%   1.639Mi ± 0%       ~ (p=0.113 n=6)
geomean                                   67.01Ki         67.44Ki       +0.64%
¹ all samples are equal

                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │     allocs/op      │  allocs/op   vs base                │
EventStoreAppend_InMemory-4                  7.000 ± 0%    7.000 ± 0%       ~ (p=1.000 n=6) ¹
EventStoreAppend_SQLite-4                    53.00 ± 0%    52.50 ± 1%       ~ (p=0.182 n=6)
GetTimeline_InMemory/events-10-4             125.0 ± 0%    125.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4             653.0 ± 0%    653.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4           1.306k ± 0%   1.306k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4           6.514k ± 0%   6.514k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-1000-4          13.02k ± 0%   13.02k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-10-4               382.0 ± 0%    382.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4              1.852k ± 0%   1.852k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4             3.681k ± 0%   3.681k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4             18.54k ± 0%   18.54k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-1000-4            37.29k ± 0%   37.29k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                     1.162k        1.161k       -0.08%
¹ all samples are equal

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant