fix(llm-to-bedrock): sweep stale Sonnet 4 example model IDs to Sonnet 4.6 - #164
fix(llm-to-bedrock): sweep stale Sonnet 4 example model IDs to Sonnet 4.6#164herosjourney wants to merge 3 commits into
Conversation
…t 4.6 + verify-before-rewrite guard
…del-id lint (Cursor round 1)
|
Applied the Cursor review (commit 89eda24) — all five points, with two findings that came out of verifying point 2: 1. Regression lint — added. 2. The "dated Sonnet 4.6" IDs are fabricated, and one had a wrong price.
Swept in this PR rather than a separate one: the lint has to be green to merge, so lint + sweep are one atomic change. 3. Analyzer guard — added as a 4. ID-form note — added to the rewriter guard: geo-prefixed inference-profile form preferred in rewritten code; bare foundation-model IDs belong in pricing tables (they often reject on-demand invocation — see the IAM known-fix). 5. Replay — left unchecked, per the review. Full |
| "target_models": ["gpt-4o -> us.anthropic.claude-sonnet-4-6"], | ||
| "_comment_target_models": "example only — the real mapping comes from the migration plan, never from this illustration", |
There was a problem hiding this comment.
Currently Bedrock supports GPT-5.6, and Sonnet is positioned in the same tier as GPT-5.6 Terra. So, should we recommend migrating to a model from the same providor?
Summary
The llm2bedrock agent examples (code-rewriter, code-analyzer, report-generator) and the behavior-delta reference still used
us.anthropic.claude-sonnet-4-20250514-v1:0— Claude Sonnet 4 (May 2025) — as the example rewrite target. The plugin's own model catalog marks that model excluded, EOL Oct 14, 2026 (ai-model-lifecycle.md), and every recommendation elsewhere points at Sonnet 4.6. An agent pattern-matching the examples would produce rewrites targeting a model the plugin itself bans. This PR sweeps the examples toclaude-sonnet-4-6and adds a guard note so example IDs can't silently drive rewrites again.Changes
claude-sonnet-4-20250514-v1:0→claude-sonnet-4-6in:agents/llm2bedrock-code-rewriter.md(7 sites: Vercel AI SDK / LangChain / boto3 examples, env-var block)agents/llm2bedrock-code-analyzer.md(target_models example)agents/llm2bedrock-report-generator.md(model-id list example, pricing comment — Sonnet 4.6 has identical $3/$15 rates so the comment's math is unchanged, dual-ARN prose example)skills/llm-to-bedrock/references/helpers/behavior-delta-detection/references/openai-to-bedrock.md(converse example)skills/llm-to-bedrock/scripts/test_iam_policy.py,test_validate_result.py(example IDs in tests; inference-profile logic is ID-agnostic)pricing-cache.mdandai-model-lifecycle.md— those are catalog entries whose whole point is recording the model and its EOL/excluded status.llm2bedrock-code-rewriter.mdabove the rewrite examples: example IDs are illustrative; authoritative IDs come from the migration plan (aws_model_id); verify plan IDs resolve viaaws bedrock list-foundation-models(or the preflight converse-ping); if an ID no longer resolves, STOP and surface it rather than substituting a model. This mirrors the agent-toolkit-for-aws guidance on verifying model IDs at runtime.Relationship to other PRs
Independent — based on current
main(post-#162). No overlap with open PRs (#141/#144/#149/#151/#155/#156/#161/#163).Test plan
claude-sonnet-4-20250514references outside the two catalog filespyteston the two touched test scripts: 119 passedmise run buildgreen (160/160 checks)