Skip to content

feat: add Bedrock Mantle API format support for harness#1412

Open
notgitika wants to merge 2 commits into
aws:mainfrom
notgitika:feat/bedrock-mantle-api-format
Open

feat: add Bedrock Mantle API format support for harness#1412
notgitika wants to merge 2 commits into
aws:mainfrom
notgitika:feat/bedrock-mantle-api-format

Conversation

@notgitika
Copy link
Copy Markdown
Contributor

@notgitika notgitika commented May 28, 2026

Summary

  • Adds apiFormat field to harness bedrockModelConfig allowing users to select between converse_stream (default Bedrock Converse API), responses, or chat_completions (Bedrock Mantle endpoint)
  • When user selects responses or chat_completions, the CLI defaults model ID to openai.gpt-oss-120b and adds Bedrock Mantle IAM permissions to the harness execution role
  • Feature is gated behind isPreviewEnabled() since harness is in preview
  • Wire format matches the Loopy service Smithy model: apiFormat lives inside bedrockModelConfig with snake_case enum values

Changes

Area Files
Schema primitives/harness.ts, primitives/index.ts, agentcore-project.ts
API types aws/agentcore-harness.ts
Deploy mapper harness-mapper.ts
TUI wizard types.ts, useAddHarnessWizard.ts, AddHarnessScreen.tsx, AddHarnessFlow.tsx, useCreateFlow.ts
CLI command HarnessPrimitive.ts, harness-action.ts, harness-validate.ts
CDK IAM AgentCoreHarnessRole.ts (in agentcore-cdk repo)
CDK asset assets/cdk/bin/cdk.ts

Test plan

  • Unit tests pass (160 harness tests, 122 snapshot tests)
  • TypeScript compiles cleanly
  • E2E tested: agentcore add harness --api-format responses → deploy → invoke returns response via Bedrock Mantle (account 998846730471, ap-southeast-2)
  • CDK repo changes need separate PR (tracked below)

Notes

Add apiFormat field to harness bedrockModelConfig that allows users to
select between converse_stream (default Bedrock), responses, or
chat_completions (Bedrock Mantle) when creating a harness.

- Schema: add BedrockApiFormatSchema enum and apiFormat field to HarnessModelSchema
- API types: add apiFormat to BedrockModelConfig interface
- Mapper: include apiFormat in bedrockModelConfig when not converse_stream
- TUI: add api-format wizard step for bedrock provider (gated behind isPreviewEnabled)
- CDK: add BedrockMantleInference/CallWithBearerToken IAM policies when mantle format selected
- CLI: add --api-format flag, default model ID to openai.gpt-oss-120b for mantle formats
- Validation: reject apiFormat for non-bedrock providers

E2E tested against account 998846730471 in ap-southeast-2.
@notgitika notgitika requested a review from a team May 28, 2026 15:13
@github-actions github-actions Bot added size/m PR size: M agentcore-harness-reviewing AgentCore Harness review in progress labels May 28, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.15.0.tgz

How to install

gh release download pr-1412-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.15.0.tgz

@agentcore-devx-automation
Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label May 28, 2026
@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label May 28, 2026
- Schema: accepts/rejects apiFormat for bedrock/non-bedrock providers
- Mapper: verifies apiFormat included in bedrockModelConfig, omitted for converse_stream
- Validate: tests CLI --api-format flag validation
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 28, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 28, 2026
@agentcore-devx-automation
Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label May 28, 2026
@notgitika
Copy link
Copy Markdown
Contributor Author

I have tested this E2E using the tarball

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

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant