Skip to content

Replace deprecated model IDs with -latest aliases#82

Open
iskysun96 wants to merge 1 commit intoanthropics:masterfrom
iskysun96:fix/use-latest-model-aliases
Open

Replace deprecated model IDs with -latest aliases#82
iskysun96 wants to merge 1 commit intoanthropics:masterfrom
iskysun96:fix/use-latest-model-aliases

Conversation

@iskysun96
Copy link
Copy Markdown

Summary

  • Replace all hardcoded deprecated Claude 3 model IDs (claude-3-haiku-20240307, claude-3-sonnet-20240229) with -latest aliases (claude-haiku-4-5-latest, claude-sonnet-4-5-latest) across all 3 tutorial variants (Anthropic 1P, Bedrock/anthropic, Bedrock/boto3)
  • Using -latest aliases means the tutorials will automatically use the newest model version when Anthropic releases updates — no code changes needed
  • Updated AmazonBedrock/requirements.txt to unpin SDK versions for alias support

Files changed (9)

  • Anthropic 1P/00_Tutorial_How-To.ipynb — Haiku model ID + prose
  • Anthropic 1P/10.2_Appendix_Tool Use.ipynb — Sonnet model ID
  • AmazonBedrock/anthropic/00_Tutorial_How-To.ipynb — Haiku model ID + prose
  • AmazonBedrock/anthropic/10_2_Appendix_Tool_Use.ipynb — Sonnet model ID
  • AmazonBedrock/anthropic/10_3_Appendix_Empirical_Performance_Evaluations.ipynb — Haiku model ID
  • AmazonBedrock/boto3/00_Tutorial_How-To.ipynb — Haiku model ID + prose
  • AmazonBedrock/boto3/10_2_Appendix_Tool_Use.ipynb — Sonnet model ID
  • AmazonBedrock/boto3/10_3_Appendix_Empirical_Performance_Eval.ipynb — Haiku model ID
  • AmazonBedrock/requirements.txt — Unpinned SDK versions

Test plan

  • Run 00_Tutorial_How-To.ipynb for each variant to verify model ID is accepted
  • Run get_completion("Hello, Claude!") cell to confirm end-to-end API call works
  • Spot-check one Tool Use notebook (Sonnet alias)
  • Spot-check one Eval notebook (Haiku alias)
  • Verify Bedrock alias format (anthropic.claude-haiku-4-5-latest-v1:0) is valid in target AWS region

🤖 Generated with Claude Code

The hardcoded Claude 3 model IDs (claude-3-haiku-20240307, claude-3-sonnet-20240229)
are deprecated and broken. Replace them with -latest aliases (e.g., claude-haiku-4-5-latest)
so the tutorials automatically use the newest model version without code changes.

Changes:
- Update MODEL_NAME in all 3 variants (Anthropic 1P, Bedrock/anthropic, Bedrock/boto3)
- Update tool use notebooks from Sonnet 3 to claude-sonnet-4-5-latest
- Update eval notebooks from Haiku 3 to claude-haiku-4-5-latest
- Update markdown prose to reference "Claude Haiku (latest)" instead of "Claude 3 Haiku"
- Unpin SDK versions in AmazonBedrock/requirements.txt for alias support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@iskysun96 iskysun96 force-pushed the fix/use-latest-model-aliases branch from a9964bf to 8ce0af3 Compare March 25, 2026 22:55
@iskysun96
Copy link
Copy Markdown
Author

One caveat. With the newer model, the courses become functional, but the model is too smart for some of the questions now.

For example, on course 3, it assumes the model would fail to answer the Is a married person looking at an unmarried person? question but it succeeds without it needing a role.
image

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.

1 participant