Skip to content

AWS: Refactor provider to use Bedrock Converse API#171

Merged
ClickerMonkey merged 21 commits intomainfrom
copilot/refactor-aws-package-converse-api
Apr 4, 2026
Merged

AWS: Refactor provider to use Bedrock Converse API#171
ClickerMonkey merged 21 commits intomainfrom
copilot/refactor-aws-package-converse-api

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

The AWS provider had three separate model-family-specific implementations (Anthropic/Claude, Llama/Mistral, Cohere), each with their own request/response format. The Converse API provides a unified interface across all Bedrock chat models.

Changes

Unified chat execution (aws.ts)

  • Replaced executeAnthropicModel, executeLlamaStyleModel, executeCohereModel (and their streaming counterparts + all helper methods) with a single executeWithConverse() / streamWithConverse() pair
  • Message/system/tool conversion now happens through a single convertRequestToConverse() pipeline rather than three divergent paths
  • Hook types updated from InvokeModelCommand | InvokeModelWithResponseStreamCommandConverseCommand | ConverseStreamCommand
  • Dropped anthropic-specific config block (version, beta, emptyMessage) — not applicable to the Converse API
  • Fixed broken imports (isModelInfo from wrong path, unused http module, Anthropic SDK types)
  • Streaming now handles reasoningContent blocks natively via Converse API events
// Before: routing to family-specific implementations
if (family === 'anthropic') return self.executeAnthropicModel(...)
else if (family === 'meta' || family === 'mistral') return self.executeLlamaStyleModel(...)
else if (family === 'cohere') return self.executeCohereModel(...)

// After: single Converse API path for all chat models
return self.executeWithConverse(modelInput, request, ctx)

Capability detection (common.ts)

  • Expanded tools capability to Llama 3.1+, Mistral Large, and Cohere Command R — models that support tool use via the Converse API but were previously excluded

Removed dependency

  • @anthropic-ai/sdk devDependency dropped; Anthropic-specific SDK types are no longer needed

Image generation (Stability AI) and embeddings (Amazon Titan) continue to use InvokeModelCommand — they are not part of the Converse API surface.

Copilot AI linked an issue Mar 31, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits March 31, 2026 10:46
Agent-Logs-Url: https://github.com/ClickerMonkey/aeye/sessions/f9ae043b-e57a-411d-a2b1-6a78c7e125df

Co-authored-by: ClickerMonkey <421233+ClickerMonkey@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor AWS package to use Converse API for model calls AWS: Refactor provider to use Bedrock Converse API Mar 31, 2026
Copilot AI requested a review from ClickerMonkey March 31, 2026 11:01
Copilot AI and others added 6 commits April 2, 2026 22:37
…ptions

Agent-Logs-Url: https://github.com/ClickerMonkey/aeye/sessions/572e69b6-be85-4ee7-a3e5-9c179468a7f4

Co-authored-by: ClickerMonkey <421233+ClickerMonkey@users.noreply.github.com>
…es from suspend event

Agent-Logs-Url: https://github.com/ClickerMonkey/aeye/sessions/05b72ef8-96ec-4c3f-8866-9a77784d8189

Co-authored-by: ClickerMonkey <421233+ClickerMonkey@users.noreply.github.com>
…use-resume

feat(core): Add PromptSuspend for prompt pause/resume at tool call boundaries
Copilot AI and others added 9 commits April 3, 2026 03:59
…-root-core-ai

Update root, core, and ai package READMEs with correct types and examples
@ClickerMonkey ClickerMonkey marked this pull request as ready for review April 4, 2026 20:35
@ClickerMonkey ClickerMonkey merged commit f454423 into main Apr 4, 2026
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.

AWS: Converse API

2 participants