Skip to content

opensite-ai/opensite-skills / amazon-bedrock

amazon-bedrock

Flagged

Builds generative AI applications on Amazon Bedrock. Covers model invocation (Converse API, InvokeModel), RAG with Knowledge Bases, Bedrock Agents, Guardrails, and AgentCore (including the Harness managed agent loop). Applies when invoking models, setting up Knowledge Bases, creating agents, applying guardrails, deploying to AgentCore, migrating/porting/converting a Bedrock Agent (including inline agents) to an AgentCore Harness, troubleshooting Bedrock errors (ThrottlingException, AccessDeniedException), or choosing Bedrock models (Claude, Llama, Nova, Titan). Also for prompt caching, quota and throttling diagnosis, cost tracking, migrating between Claude model generations, chunking strategies, and Bedrock model selection. Covers AgentCore Payments (x402, microtransactions, Payment Manager, Connector, Instrument, Coinbase CDP, Stripe Privy, paid endpoints, agent payments). NOT for custom model training, Rekognition, or Comprehend. For SageMaker model discovery, customization, or endpoints, use aws-ai-ml.

FileKindSize
.aws-skill-metadataother18 B
SKILL.mdskill md34.1 KB
assets/kb_shim.py.tmplother3.4 KB
assets/lambda_shim.py.tmplother8.0 KB
assets/tool_schema.json.tmplother389 B
references/agentcore-credentials-and-security.mdmarkdown6.5 KB
references/agentcore-gateway.mdmarkdown7.0 KB
references/agentcore-harness.mdmarkdown22.0 KB
references/agentcore-memory-observability.mdmarkdown5.6 KB
references/agentcore-payments-setup-script.mdmarkdown12.3 KB
references/agentcore-payments-wiring.mdmarkdown12.1 KB
references/agentcore-payments.mdmarkdown19.5 KB
references/agentcore-registry-evaluations.mdmarkdown6.8 KB
references/agentcore-runtime-container-build.mdmarkdown10.4 KB
references/agentcore-runtime.mdmarkdown7.6 KB
references/agents-and-action-groups.mdmarkdown16.5 KB
references/bedrock-agents-to-agentcore-harness/cli.mdmarkdown2.0 KB
references/bedrock-agents-to-agentcore-harness/deploy.mdmarkdown12.0 KB
references/bedrock-agents-to-agentcore-harness/discovery.mdmarkdown3.9 KB
references/bedrock-agents-to-agentcore-harness/eligibility.mdmarkdown3.3 KB
references/bedrock-agents-to-agentcore-harness/mapping.mdmarkdown8.9 KB
references/cost-tracking.mdmarkdown4.5 KB
references/guardrails.mdmarkdown14.7 KB
references/knowledge-bases-decision-guide.mdmarkdown2.8 KB
references/knowledge-bases-retrieval.mdmarkdown8.3 KB
references/knowledge-bases-setup.mdmarkdown17.9 KB
references/managed-knowledge-bases-retrieval.mdmarkdown8.1 KB
references/managed-knowledge-bases-setup.mdmarkdown12.7 KB
references/migrate-bedrock-agents-to-agentcore-harness.mdmarkdown11.5 KB
references/model-invocation.mdmarkdown11.0 KB
references/model-migration.mdmarkdown4.3 KB
references/model-selection-guide.mdmarkdown7.4 KB
references/prompt-caching.mdmarkdown5.5 KB
references/prompt-engineering-by-model.mdmarkdown7.9 KB
references/quota-health.mdmarkdown4.3 KB
references/sdk-converse-api-python.mdmarkdown6.3 KB
references/sdk-converse-api-typescript.mdmarkdown6.5 KB
scripts/fetch_bedrock_agent.pyscript14.1 KB

references/model-migration.md

View on GitHub
# Cross-Generation Claude Model Migration on Bedrock

Migration checklist for upgrading between Claude model generations on Bedrock. Each generation introduces breaking changes that fail silently or with unclear errors.

## Table of Contents
- [Claude 4.5 to 4.6 Migration](#claude-45-to-46-migration)
- [Claude 4.6 to 4.7 Migration](#claude-46-to-47-migration)
- [Failover Configuration](#failover-configuration)
- [Prompt Caching Across Generations](#prompt-caching-across-generations)

## Claude 4.5 to 4.6 Migration

### Breaking Changes

| Change | 4.5 Behavior | 4.6 Behavior | Impact |
|--------|-------------|-------------|--------|
| **Prefill** | Supported | Hard 400 error | MUST remove all prefill before switching. Use structured outputs or system prompt instructions instead. |
| **Structured outputs** | `output_format` param | `output_config.format` param (old name deprecated) | Update param name, or use `tool_use` for structured output (works on both). On Bedrock Converse API: `outputConfig.textFormat`. |
| **Thinking config** | `thinking: {type: "enabled", budget_tokens: N}` | `thinking: {type: "adaptive"}` | Failover logic MUST swap the config (not just strip it) to maintain thinking on both sides. |
| **Effort parameter** | Works on Opus 4.5 only. Errors on Sonnet 4.5 and Haiku 4.5. | GA on all 4.6 models (Opus, Sonnet, Haiku) | Failover to 4.5 Sonnet/Haiku MUST strip the effort parameter. |
| **Context window** | 200K tokens (Sonnet 4.5 1M deprecated April 30, 2026) | 1M tokens (GA) | Prompts sized for 1M WILL fail on 4.5 failover. This is the biggest silent risk. |
| **Cache thresholds** | Sonnet 4.5: 1,024 tokens. Opus 4.5: 4,096. | Sonnet 4.6: 2,048 tokens. Opus 4.6: 4,096. | Content cached on 4.5 (1,024–2,047 tokens) will NOT cache on Sonnet 4.6. |

### Migration Steps

1. **Remove prefill** from all requests. Replace with structured outputs or system prompt instructions.
2. **Update structured output params** — switch to `output_config.format` or use `tool_use` for cross-generation compatibility.
3. **Update thinking config** — change `{type: "enabled", budget_tokens: N}` to `{type: "adaptive"}`.
4. **Test effort parameter** — works on all 4.6 models. If using failover to 4.5, strip effort for Sonnet/Haiku 4.5.
5. **Verify prompt size** — if using >200K context, ensure failover targets also support it or add truncation logic.
6. **Verify cache thresholds** — if caching content between 1,024–2,047 tokens, it will stop caching on Sonnet 4.6. Increase content or accept the regression.
7. **Update model IDs** — e.g., `us.anthropic.claude-sonnet-4-5-20250929-v1:0` to `us.anthropic.claude-sonnet-4-6`.

## Claude 4.6 to 4.7 Migration

Opus 4.7 is available. Key changes:

- **Endpoint**: Use `bedrock-runtime` (same as 4.6). Model ID: `us.anthropic.claude-opus-4-7` or `global.anthropic.claude-opus-4-7`.
- **Thinking**: Same `{type: "adaptive"}` config as 4.6. Effort parameter works.
- **Context window**: 1M (same as 4.6).
- **Cache thresholds**: Verify with current docs — thresholds may differ from 4.6.

This migration is lower-risk than 4.5 → 4.6 since the API contract is consistent. Primary concern is testing output quality and verifying quota/pricing changes.

## Failover Configuration

When running multi-model routing (LiteLLM, custom AI gateways), failover between Claude generations requires config translation:

```
Primary: Claude Sonnet 4.6
  thinking: {type: "adaptive"}
  effort: "high"
  output_config: {format: ...}
  context_window: 1M

Fallback: Claude Sonnet 4.5
  thinking: {type: "enabled", budget_tokens: 10000}
  effort: STRIP (errors on Sonnet 4.5)
  output_format: ...  (not output_config)
  context_window: 200K (truncate if needed)
  prefill: must already be removed
```

Most AI gateways (LiteLLM, custom routers) handle param translation automatically. Verify your gateway supports Claude generation-specific config mapping.

## Prompt Caching Across Generations

Cache keys are model-specific. Cross-generation failover ALWAYS results in a cache miss on the fallback model. This impacts both latency (cold cache on failover) and cost (cache write charges on both models).

If using failover with prompt caching, account for:
- Double cache write cost during failover events
- Higher latency on the first request to the fallback model
- Different minimum token thresholds per generation (see [prompt-caching.md](prompt-caching.md))
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall