aws-samples / aws-samples/sample-multi-agent-orchestration-chat-on-agentcore
Add Gemma 4 model family support (Google DeepMind) to selectable Bedrock models
- Dominant language
- TypeScript
- Stars
- 128
- Forks
- 12
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 4
Description
## Summary
Google DeepMind's Gemma 4 family is now Generally Available on Amazon Bedrock (announced June 15, 2026). Three instruction-tuned variants are available. Given the current unavailability of Claude Fable 5 / Mythos 5 due to US export controls, adding Gemma 4 as an alternative model option increases platform resilience and provides cost-efficient options for users.
## Background
- **Gemma 4 31B** (dense, 256K context window) — suited for reasoning and coding workloads
- **Gemma 4 26B-A4B** (Mixture-of-Experts, only 4B params active per request) — cost- and latency-sensitive workloads
- **Gemma 4 E2B** (smallest variant) — low-latency interactive use cases
All three variants support:
- Native function calling (critical for agentic workflows)
- Structured output
- Built-in reasoning
- Response streaming
- Multimodal input (text, image, video, audio)
- 35+ languages
## Motivation
1. **Model resilience:** Claude Fable 5 / Mythos 5 were disabled globally on June 12, 2026 due to US export controls. Having diverse model options prevents single-vendor dependency.
2. **Cost efficiency:** The 26B-A4B MoE variant activates only 4B parameters per request, making it significantly cheaper than full dense models for many use cases.
3. **Function calling support:** Gemma 4 supports native function calling, which is essential for the agent tool-use patterns in this application.
4. **Bedrock GA:** All three variants are GA (not preview), so they are production-ready.
## Implementation Plan
### 1. Add model definitions to `packages/libs/core/src/bedrock-models.ts`
Add entries to `BEDROCK_MODEL_DEFINITIONS` for:
- `google.gemma-4-31b-it` (or the appropriate Bedrock model ID once confirmed)
- `google.gemma-4-26b-a4b-it`
- `google.gemma-4-e2b-it`
Each entry should include:
- Model ID
- Display name
- Provider ("Google DeepMind")
- Context window size
- Supported features (function calling, streaming, multimodal)
- Cost tier indicator
### 2. Update CDK configuration (`packages/cdk/config/environments.ts`)
- Add the new model IDs to the `bedrockModels` array in the default environment config
- Ensure IAM permissions grant `bedrock:InvokeModel` for the new model IDs
### 3. Test function calling compatibility
- Verify that Gemma 4's native function calling works with the existing tool-use patterns (MCP tools, agent tools)
- Test with Strands agent framework integration
- Validate streaming responses
### 4. UI update (if needed)
- Ensure the model selector in the frontend displays the new models correctly
- Consider grouping models by provider (Anthropic / Google DeepMind / Amazon)
## Priority
**Low-Medium** — This is a nice-to-have for model diversity. The primary model (Claude Opus 4.8) remains fully functional. However, if the Fable 5 export controls persist, having cost-efficient alternatives becomes more valuable.
## References
- [AWS What's New — Gemma 4 on Amazon Bedrock](https://aws.amazon.com/about-aws/whats-new/2026/06/gemma-4-amazon-bedrock/)
- [AWS Weekly Roundup (June 15, 2026)](https://aws.amazon.com/blogs/aws/aws-weekly-roundup-aws-finops-agent-in-preview-gemma-4-on-bedrock-kiro-pro-max-and-more-june-15-2026)
## Labels
`enhancement`, `models`, `bedrock`
Contributor guide
Research direction
Start with packages/libs/core/src/bedrock-models.ts and packages/cdk/config/environments.ts; inspect the existing Bedrock model definitions, the default bedrockModels array, and IAM configuration. Confirm the actual Amazon Bedrock IDs and supported features from the linked AWS references, then verify model selection, function calling, and streaming against the existing integration paths; done means the models are selectable and permitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- ai, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100