Skip to content

feat(ai): MEAI Phase 1 — IChatClient pipeline behind feature flag - #231

Draft
IanFrelinger wants to merge 2 commits into
masterfrom
cursor/meai-phase1-pipeline-5a04
Draft

feat(ai): MEAI Phase 1 — IChatClient pipeline behind feature flag#231
IanFrelinger wants to merge 2 commits into
masterfrom
cursor/meai-phase1-pipeline-5a04

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Phase 1 of the MEAI governed pipeline migration: introduces Nexo.AI.Pipeline with keyed IChatClient targets for local Ollama and local LLamaSharp (local:onnx), registered behind Nexo:UseMeaiPipeline (default off). Legacy IProviderFactory path is unchanged.

Depends on / includes Phase 0 notes (docs/meai-migration-notes.md). Prefer merging #230 first or take this PR which already contains those notes.

Changes

  • New src/Nexo.AI.Pipeline (net8.0;net9.0):
    • OllamaHttpChatClient — thin HTTP /api/chat adapter (OllamaSharp deferred: Roslyn 5 analyzer vs repo C# 12 pin)
    • LlamaSharpChatClient — GGUF offline target keyed as local:onnx
    • AddNexoMeaiPipeline + AddKeyedChatClient; raw clients never registered in DI
    • FakeChatClient for tests
  • Hosting Phase 13b gated by NexoHostingOptions.UseMeaiPipeline / Nexo:UseMeaiPipeline / NEXO_USE_MEAI_PIPELINE
  • CPM: Microsoft.Extensions.AI 10.7.0; bump related Extensions/System.Text.* 10.0.8 → 10.0.9
  • Tests: src/Nexo.Tests.AI.Pipeline (7 tests × net8/net9)
  • Updated docs/meai-migration-notes.md with Phase 1 discoveries

Testing

dotnet test src/Nexo.Tests.AI.Pipeline/Nexo.Tests.AI.Pipeline.csproj
# Passed: 7 on net8.0, 7 on net9.0
dotnet build src/Nexo.Hosting/Nexo.Hosting.csproj

Testing strategy (blast radius)

Change type Minimum proof
New AI pipeline + Hosting DI gate Focused unit tests + Hosting build
  • Focused unit tests in Nexo.Tests.AI.Pipeline
  • Hosting builds with new project reference
  • make kernel-gate (optional follow-up for full kernel)

Checklist

  • Documentation updated (migration notes)
  • Feature flag defaults off (legacy path untouched)
  • No raw provider client resolvable from DI (asserted in tests)
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 14, 2026 17:59
Map current model invocation, sanitization, audit, policy packs, RAG,
and host DI seams to proposed Microsoft.Extensions.AI concepts for the
governed pipeline migration.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Add Nexo.AI.Pipeline with keyed local:ollama and local:onnx chat clients,
wire optional registration through hosting Phase 13b when
Nexo:UseMeaiPipeline is enabled (default off), and cover registration
with FakeChatClient tests. Legacy IProviderFactory path remains default.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
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.

2 participants