Skip to content

feat(ai): MEAI Phase 4 — policy-gated AWS Bedrock targets - #234

Draft
IanFrelinger wants to merge 5 commits into
masterfrom
cursor/meai-phase4-bedrock-5a04
Draft

feat(ai): MEAI Phase 4 — policy-gated AWS Bedrock targets#234
IanFrelinger wants to merge 5 commits into
masterfrom
cursor/meai-phase4-bedrock-5a04

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Phase 4 of the MEAI migration: policy-gated AWS Bedrock cloud targets cloud:bedrock:{fast,balanced,heavy} with configurable model ids, full governance stack, and default AWS credential chain reuse.

Stacks Phases 0–3. Prefer merging prior MEAI PRs first, or take this PR alone.

Changes

  • Packages: AWSSDK.BedrockRuntime, AWSSDK.Extensions.Bedrock.MEAI
  • AwsBedrockChatClientFactory uses AsIChatClient(modelId); SDK client never registered in DI
  • Config: Nexo:Meai:Bedrock:{Enabled,Region,FastModelId,BalancedModelId,HeavyModelId}
  • Enabling Bedrock auto-allow-lists cloud target keys for the default access policy
  • Cloud sanitize already strict (BlockOnSecretRedactOnPii)
  • Unit tests with fake transport; live test gated by NEXO_TEST_BEDROCK=1

Testing

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

Checklist

  • Policy permitting cloud routes through sanitization + audit
  • Policy forbidding cloud stays local (Bedrock targets not registered when disabled)
  • Raw Bedrock runtime not DI-resolvable
Open in Web Open in Cursor 

cursoragent and others added 5 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>
Register cloud:bedrock:{fast,balanced,heavy} with configurable model ids,
reuse the default AWS credential chain, keep Bedrock SDK clients out of DI,
and cover routing/sanitization/audit with fake-transport tests.

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