Skip to content

feat(ai): MEAI Phase 3 — local-first RoutingChatClient - #233

Draft
IanFrelinger wants to merge 4 commits into
masterfrom
cursor/meai-phase3-router-5a04
Draft

feat(ai): MEAI Phase 3 — local-first RoutingChatClient#233
IanFrelinger wants to merge 4 commits into
masterfrom
cursor/meai-phase3-router-5a04

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Phase 3 of the MEAI migration: local-first RoutingChatClient that selects a governed per-target pipeline using policy × availability × capability tier, with audited route decisions.

Stacks Phase 0–2. Prefer merging #230#231#232 → this PR (or take this PR alone).

Changes

  • RoutingChatClient / LocalFirstChatRouter / DefaultRouteCandidateTable / ITargetAvailability
  • Capability hints via ChatOptions.AdditionalProperties["nexo.route.capability"]
  • Cloud candidates only when policy allow-lists cloud:bedrock:* keys
  • Default DI wraps the router in AuditingChatClient (outside per-target governance)
  • Table-driven policy × availability matrix + scenario tests
  • Migration notes updated

Testing

dotnet test src/Nexo.Tests.AI.Pipeline/Nexo.Tests.AI.Pipeline.csproj
# Passed: 25 on net8.0 and net9.0

Checklist

  • Cloud forbidden ⇒ cloud never consulted
  • Local down + cloud allowed ⇒ audited fallback
  • Local down + cloud forbidden ⇒ structured PolicyViolationException, no silent degradation
Open in Web Open in Cursor 

cursoragent and others added 4 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>
Introduce UseNexoGovernance with fixed PolicyGate → Sanitizing → Auditing
order on every keyed IChatClient, plus unit tests for deny short-circuit,
PII redaction, audit outcomes, and composition/architecture guarantees.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Introduce policy × availability routing outside per-target governance
stacks, with audited route decisions and a table-driven matrix of
local/cloud fallback scenarios.

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