Skip to content

Commit 944b94a

Browse files
authored
docs: update all model references from Claude 4.5 to Claude 4.6 (anthropics#375)
* docs: update all model references from Claude 4.5 to Claude 4.6 - Update model IDs across all notebooks, scripts, and configs - Add Bedrock model ID conventions and exclude from dated-model checks - Add validation rules to prevent dated model IDs * fix: update prose references from Claude Sonnet 4.5/Opus 4.5 to 4.6 - memory_cookbook.ipynb: Update 'Claude Sonnet 4.5' to 'Claude Sonnet 4.6' - 01_The_chief_of_staff_agent.ipynb: Update 'Opus 4.5' to 'Opus 4.6' - registry.yaml: Update title to 'Claude Sonnet 4.6'
1 parent 7cb72a9 commit 944b94a

File tree

57 files changed

+223
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+223
-170
lines changed

.claude/skills/cookbook-audit/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Use this to ensure comprehensive coverage:
123123
**Technical Requirements**
124124
- [ ] Executable without modification (except API keys)
125125
- [ ] Uses non-deprecated API patterns
126-
- [ ] Uses valid model names (claude-sonnet-4-5, claude-haiku-4-5, claude-opus-4-5)
126+
- [ ] Uses valid model names (claude-sonnet-4-6, claude-haiku-4-5, claude-opus-4-6)
127+
- [ ] Uses non-dated model aliases (never dated IDs like claude-sonnet-4-6-20250514)
127128
- [ ] Model name defined as constant at top of notebook
128129
- [ ] Includes dependency specifications
129130
- [ ] Assigned to primary category

.claude/skills/cookbook-audit/style_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ from dotenv import load_dotenv
142142

143143
load_dotenv()
144144

145-
MODEL = "claude-sonnet-4-5"
145+
MODEL = "claude-sonnet-4-6"
146146

147147
client = anthropic.Anthropic()
148148
~~~

.claude/skills/cookbook-audit/validate_notebook.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,20 +321,20 @@ def check_model_constant(self):
321321
if has_model_refs:
322322
self.warnings.append(
323323
"Model name should be defined as a constant at the top of the notebook "
324-
"(e.g., MODEL = 'claude-sonnet-4-5') to make future updates easier"
324+
"(e.g., MODEL = 'claude-sonnet-4-6') to make future updates easier"
325325
)
326326

327327
def check_deprecated_patterns(self):
328328
"""Check for deprecated API patterns and invalid models."""
329329
# Valid models
330-
valid_models = ["claude-sonnet-4-5", "claude-haiku-4-5", "claude-opus-4-5"]
330+
valid_models = ["claude-sonnet-4-6", "claude-haiku-4-5", "claude-opus-4-6"]
331331

332332
# Pattern to match model strings
333333
model_pattern = r'["\']claude-([a-z0-9\.-]+)["\']'
334334

335335
# Deprecated models that should be migrated
336336
deprecated_models = {
337-
"claude-opus-4-1": "claude-opus-4-5",
337+
"claude-opus-4-1": "claude-opus-4-6",
338338
}
339339

340340
deprecated_patterns = {
@@ -347,6 +347,17 @@ def check_deprecated_patterns(self):
347347

348348
source = self.get_cell_source(cell)
349349

350+
# Check for dated API model IDs (exclude Bedrock IDs which require dates)
351+
dated_pattern = r'["\']claude-\w+-[\d.]+-\d{8}["\']'
352+
dated_matches = re.findall(dated_pattern, source)
353+
for match in dated_matches:
354+
# Skip Bedrock model IDs (anthropic.claude-*) which require dates
355+
if f"anthropic.{match.strip(chr(34)).strip(chr(39))}" not in source:
356+
self.issues.append(
357+
f"Cell {i}: Dated model ID {match} found. "
358+
"Use non-dated aliases instead (e.g., claude-sonnet-4-6)"
359+
)
360+
350361
# Check for invalid or deprecated models
351362
model_matches = re.findall(model_pattern, source)
352363
for match in model_matches:

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
ANTHROPIC_API_KEY=sk-ant-api03-...
66

77
# Optional: Default model for testing (recommended for cost savings)
8-
# Note: claude-haiku-4-5-20251001 is the latest Haiku model as of October 2025
9-
CLAUDE_MODEL=claude-haiku-4-5-20251001
8+
# Note: claude-haiku-4-5 is the latest Haiku model as of October 2025
9+
CLAUDE_MODEL=claude-haiku-4-5
1010

1111
# Optional: Test mode settings
1212
TEST_MODE=true

.github/workflows/notebook-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
- Explains how to fix common issues:
147147
- "Cells not executed": Run all cells from top to bottom before committing
148148
- "Execution order issues": Restart kernel and run all cells sequentially
149-
- "Deprecated models": Update to current model versions (claude-sonnet-4-5-20250929, etc.)
149+
- "Deprecated models": Update to current model versions (claude-sonnet-4-6, etc.)
150150
- "Hardcoded API keys": Use os.environ.get("ANTHROPIC_API_KEY") instead
151151
- Mentions they can test locally with: `make test-notebooks NOTEBOOK=path/to/notebook.ipynb`
152152
- Uses friendly, constructive language

CLAUDE.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,16 @@ style: lint/format
6262
2. **Dependencies:** Use `uv add <package>` or `uv add --dev <package>`. Never edit pyproject.toml directly.
6363

6464
3. **Models:** Use current Claude models. Check docs.anthropic.com for latest versions.
65-
- Sonnet: `claude-sonnet-4-5-20250929`
66-
- Haiku: `claude-haiku-4-5-20251001`
67-
- Opus: `claude-opus-4-5-20251101`
65+
- Sonnet: `claude-sonnet-4-6`
66+
- Haiku: `claude-haiku-4-5`
67+
- Opus: `claude-opus-4-6`
68+
- **Never use dated model IDs** (e.g., `claude-sonnet-4-6-20250514`). Always use the non-dated alias.
69+
- **Bedrock model IDs** follow a different format. Use the base Bedrock model ID from the docs:
70+
- Opus 4.6: `anthropic.claude-opus-4-6-v1`
71+
- Sonnet 4.5: `anthropic.claude-sonnet-4-5-20250929-v1:0`
72+
- Haiku 4.5: `anthropic.claude-haiku-4-5-20251001-v1:0`
73+
- Prepend `global.` for global endpoints (recommended): `global.anthropic.claude-opus-4-6-v1`
74+
- Note: Bedrock models before Opus 4.6 require dated IDs in their Bedrock model ID.
6875

6976
4. **Notebooks:**
7077
- Keep outputs in notebooks (intentional for demonstration)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ If a hook fails, fix the issues and try committing again.
118118

119119
2. **Use current Claude models**:
120120
- Use model aliases for better maintainability when available
121-
- Latest Haiku model: `claude-haiku-4-5-20251001` (Haiku 4.5)
121+
- Latest Haiku model: `claude-haiku-4-5` (Haiku 4.5)
122122
- Check current models at: https://docs.claude.com/en/docs/about-claude/models/overview
123123
- Claude will automatically validate model usage in PR reviews
124124

capabilities/retrieval_augmented_generation/evaluation/eval_end_to_end.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def evaluate_end_to_end(query, generated_answer, correct_answer):
3535
client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))
3636
try:
3737
response = client.messages.create(
38-
model="claude-sonnet-4-5",
38+
model="claude-sonnet-4-6",
3939
max_tokens=1500,
4040
messages=[
4141
{"role": "user", "content": prompt},

capabilities/retrieval_augmented_generation/evaluation/promptfooconfig_end_to_end.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ providers:
1313
max_tokens: 2500
1414
temperature: 0
1515

16-
- id: anthropic:messages:claude-sonnet-4-5
16+
- id: anthropic:messages:claude-sonnet-4-6
1717
label: "3.5 Sonnet: T-0.0"
1818
config:
1919
max_tokens: 2500

capabilities/retrieval_augmented_generation/evaluation/provider_retrieval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _rerank_results(query: str, results: list[dict], k: int = 3) -> list[dict]:
6969
client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))
7070
try:
7171
response = client.messages.create(
72-
model="claude-sonnet-4-5",
72+
model="claude-sonnet-4-6",
7373
max_tokens=50,
7474
messages=[
7575
{"role": "user", "content": prompt},

0 commit comments

Comments
 (0)