Skip to content

Commit c55a1c1

Browse files
committed
Update stale model names to current Anthropic IDs
Bulk-replace deprecated model references with current Anthropic API names: - claude-3-5-haiku-20241022 -> claude-haiku-4-5-20251001 - claude-3-haiku-20240307 -> claude-haiku-4-5-20251001 - claude-3-5-sonnet-20241022 -> claude-sonnet-4-6 - claude-3-7-sonnet-latest -> claude-sonnet-4-6 - claude-opus-4-20250514 -> claude-opus-4-7 Files affected: .ai_config_defaults.json, README.md, bootstrap manifests, bootstrap scripts, traffic generators, cost calculator pricing table, Bedrock inference profile mapping, segmentation tests. Verified all three new model IDs return HTTP 200 against Anthropic API. Note: Bedrock inference profile version-suffixed IDs (e.g. *-v1:0) may need separate follow-up; this commit updates only the API-side model names.
1 parent 734129d commit c55a1c1

9 files changed

Lines changed: 41 additions & 43 deletions

.ai_config_defaults.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"security-agent": {
1010
"enabled": true,
1111
"model": {
12-
"name": "claude-3-5-haiku-20241022",
12+
"name": "claude-haiku-4-5-20251001",
1313
"parameters": {}
1414
},
1515
"provider": {
@@ -20,7 +20,7 @@
2020
"supervisor-agent": {
2121
"enabled": true,
2222
"model": {
23-
"name": "claude-3-7-sonnet-latest",
23+
"name": "claude-sonnet-4-6",
2424
"parameters": {}
2525
},
2626
"provider": {
@@ -31,7 +31,7 @@
3131
"support-agent": {
3232
"enabled": true,
3333
"model": {
34-
"name": "claude-3-5-haiku-20241022",
34+
"name": "claude-haiku-4-5-20251001",
3535
"parameters": {
3636
"tools": [
3737
{

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ When configuring AI models in LaunchDarkly for Bedrock, you should use **inferen
177177

178178
**✅ BEST PRACTICE - Inference Profile IDs (with region prefix):**
179179
```
180-
us.anthropic.claude-3-5-sonnet-20241022-v2:0
180+
us.anthropic.claude-sonnet-4-6-v2:0
181181
us.anthropic.claude-3-7-sonnet-20250219-v1:0
182-
eu.anthropic.claude-3-5-haiku-20241022-v2:0
182+
eu.anthropic.claude-haiku-4-5-20251001-v2:0
183183
```
184184

185185
**⚠️ AUTO-CORRECTED - Direct Model IDs (will be fixed automatically):**
186186
```
187187
anthropic.claude-3-7-sonnet-20250219-v1:0 → us.anthropic.claude-3-7-sonnet-20250219-v1:0
188-
anthropic.claude-3-5-sonnet-20241022-v2:0 → us.anthropic.claude-3-5-sonnet-20241022-v2:0
188+
anthropic.claude-sonnet-4-6-v2:0 → us.anthropic.claude-sonnet-4-6-v2:0
189189
```
190190

191191
**How Auto-Correction Works:**
@@ -371,11 +371,11 @@ Create LaunchDarkly AI Configs to control your **LangGraph** multi-agent system
371371
> Anthropic
372372
> ```
373373
> ```
374-
> claude-3-7-sonnet-latest
374+
> claude-sonnet-4-6
375375
> ```
376376
>
377377
> **Note for Bedrock users:** The system auto-corrects direct model IDs to inference profiles:
378-
> - Use either `claude-3-7-sonnet-latest` (auto-corrected) or `us.anthropic.claude-3-7-sonnet-20250219-v1:0` (explicit)
378+
> - Use either `claude-sonnet-4-6` (auto-corrected) or `us.anthropic.claude-3-7-sonnet-20250219-v1:0` (explicit)
379379
> - Control region prefix via `BEDROCK_INFERENCE_REGION` env var (defaults to `us`)
380380
> - See "Bedrock Model ID Requirements" section above for details
381381
>
@@ -434,7 +434,7 @@ Similarly, create another AI Config called `security-agent`
434434
> Anthropic
435435
> ```
436436
> ```
437-
> claude-3-7-sonnet-latest
437+
> claude-sonnet-4-6
438438
> ```
439439
>
440440
> **Goal or task:**
@@ -461,7 +461,7 @@ Finally, create `support-agent`
461461
> Anthropic
462462
> ```
463463
> ```
464-
> claude-3-7-sonnet-latest
464+
> claude-sonnet-4-6
465465
> ```
466466
>
467467
> Click **Attach tools**.

api/segmentation_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def main():
216216
"user_context": {"country": "DE", "plan": "paid", "user_id": "user_eu_paid_001", "region": "europe"},
217217
"expected_config": {
218218
"support_agent": {
219-
"model": "claude-3-7-sonnet-latest",
219+
"model": "claude-sonnet-4-6",
220220
"variation_key": "eu-paid",
221221
"tools": ["search_v1", "search_v2", "reranking", "arxiv_search", "semantic_scholar"]
222222
}
@@ -227,7 +227,7 @@ def main():
227227
"user_context": {"country": "DE", "plan": "free", "user_id": "user_eu_free_001", "region": "europe"},
228228
"expected_config": {
229229
"support_agent": {
230-
"model": "claude-3-5-haiku-20241022",
230+
"model": "claude-haiku-4-5-20251001",
231231
"variation_key": "eu-free",
232232
"tools": ["search_v1"]
233233
}

bootstrap/ai_config_manifest.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ project:
106106
- key: "supervisor-basic"
107107
modelConfig:
108108
provider: "anthropic"
109-
modelId: "claude-3-5-sonnet-20241022"
109+
modelId: "claude-sonnet-4-6"
110110
# NOTE: After bootstrap, modify instructions in LaunchDarkly UI, not here
111111
instructions: "You are an intelligent routing supervisor for a multi-agent system. Your primary job is to assess whether user input likely contains PII (personally identifiable information) to determine the most efficient processing route.\n\n**PII Assessment:**\nAnalyze the user input and provide:\n- likely_contains_pii: boolean assessment\n- confidence: confidence score (0.0 to 1.0)\n- reasoning: clear explanation of your decision\n- recommended_route: either 'security_agent' or 'support_agent'\n\n**Route to SECURITY_AGENT** if the text likely contains:\n- Email addresses, phone numbers, addresses\n- Names (first/last names, usernames)\n- Financial information (credit cards, SSNs, account numbers)\n- Sensitive personal data\n\n**Route to SUPPORT_AGENT** if the text appears to be:\n- General questions without personal details\n- Technical queries\n- Search requests\n- Educational content requests\n\nAnalyze this user input and recommend the optimal route:"
112112
customParameters:
@@ -123,7 +123,7 @@ project:
123123
- key: "basic-security"
124124
modelConfig:
125125
provider: "anthropic"
126-
modelId: "claude-3-5-haiku-20241022"
126+
modelId: "claude-haiku-4-5-20251001"
127127
# NOTE: After bootstrap, modify instructions in LaunchDarkly UI, not here
128128
instructions: "You are a privacy agent that REMOVES direct PII. Focus on clearly personal identifiers:\n\nEmail addresses\nPhone numbers\nSocial Security Numbers\nFull names (but not generic titles)\nStreet addresses\nCredit card numbers\nDriver's license numbers\n\nResponse Format:\n\ndetected: true if any PII was found, false otherwise\ntypes: array of PII types found (e.g., ['email', 'name', 'phone'])\nredacted: the input text with PII replaced by [REDACTED], keeping the text readable and natural\n\nExamples:\n\nInput: \"I work at Acme Corp in Berlin as a manager\"\n\nOutput: detected=false, types=[], redacted='I work at Acme Corp in Berlin as a manager'\n\n\nInput: \"Contact John Smith at john@email.com or 555-1234\"\n\nOutput: detected=true, types=['name', 'email', 'phone'], redacted='Contact [REDACTED] at [REDACTED] or [REDACTED]'\n\n\nInput: \"The CEO from Microsoft contacted me\"\n\nOutput: detected=false, types=[], redacted='The CEO from Microsoft contacted me'"
129129
customParameters:
@@ -157,7 +157,7 @@ project:
157157
- key: "eu-free"
158158
modelConfig:
159159
provider: "anthropic"
160-
modelId: "claude-3-5-haiku-20241022"
160+
modelId: "claude-haiku-4-5-20251001"
161161
tools: ["search_v1"]
162162
# NOTE: After bootstrap, modify instructions in LaunchDarkly UI, not here
163163
instructions: "You are a helpful assistant with access to basic search (search_v1). Use your search tool to find relevant information from the knowledge base while following EU privacy requirements. Always search before responding to ensure accuracy."
@@ -170,7 +170,7 @@ project:
170170
- key: "eu-paid"
171171
modelConfig:
172172
provider: "anthropic"
173-
modelId: "claude-3-5-sonnet-20241022"
173+
modelId: "claude-sonnet-4-6"
174174
tools: ["search_v1", "search_v2", "reranking", "arxiv_search", "semantic_scholar"]
175175
instructions: "You are a premium research specialist with access to comprehensive RAG tools: search_v1 (basic search), search_v2 (semantic vector search), reranking (BM25 relevance scoring), arxiv_search (academic papers), and semantic_scholar (citation database). When using semantic_scholar, always request as few as possible and less than 5 results (num_results: 5) to optimize performance and avoid rate limiting. When search results are available, prioritize information from those results over your general knowledge. EU privacy laws require strict data handling. Always cite sources and explain confidence levels. Use multiple search approaches for complex queries."
176176
customParameters:
@@ -208,7 +208,7 @@ project:
208208
- key: "international-standard"
209209
modelConfig:
210210
provider: "anthropic" # Default to privacy-friendly
211-
modelId: "claude-3-5-haiku-20241022"
211+
modelId: "claude-haiku-4-5-20251001"
212212
tools: ["search_v1", "search_v2", "reranking"]
213213
instructions: "You are a helpful assistant with access to RAG tools: search_v1 (basic search), search_v2 (semantic vector search), and reranking (BM25 relevance scoring). When search results are available, prioritize information from those results over your general knowledge. Provide balanced, well-researched responses for international users."
214214
customParameters:

bootstrap/create_configs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ def create_variation(self, project_key, config_key, variation_data):
198198

199199
# Map to correct LaunchDarkly model config keys
200200
model_config_key_map = {
201-
"claude-3-5-sonnet-20241022": "Anthropic.claude-3-7-sonnet-latest",
202-
"claude-3-5-haiku-20241022": "Anthropic.claude-3-5-haiku-20241022",
203-
"claude-opus-4-20250514": "Anthropic.claude-opus-4-20250514",
201+
"claude-sonnet-4-6": "Anthropic.claude-sonnet-4-6",
202+
"claude-haiku-4-5-20251001": "Anthropic.claude-haiku-4-5-20251001",
203+
"claude-opus-4-7": "Anthropic.claude-opus-4-7",
204204
"gpt-4o": "OpenAI.gpt-4o",
205205
"gpt-4o-mini": "OpenAI.gpt-4o-mini-2024-07-18",
206206
"mistral-small-latest": "Mistral.mistral-small-latest"
@@ -269,9 +269,9 @@ def update_variation(self, project_key, config_key, variation_data):
269269

270270
# Map to correct LaunchDarkly model config keys
271271
model_config_key_map = {
272-
"claude-3-5-sonnet-20241022": "Anthropic.claude-3-7-sonnet-latest",
273-
"claude-3-5-haiku-20241022": "Anthropic.claude-3-5-haiku-20241022",
274-
"claude-opus-4-20250514": "Anthropic.claude-opus-4-20250514",
272+
"claude-sonnet-4-6": "Anthropic.claude-sonnet-4-6",
273+
"claude-haiku-4-5-20251001": "Anthropic.claude-haiku-4-5-20251001",
274+
"claude-opus-4-7": "Anthropic.claude-opus-4-7",
275275
"gpt-4o": "OpenAI.gpt-4o",
276276
"gpt-4o-mini": "OpenAI.gpt-4o-mini-2024-07-18",
277277
"mistral-small-latest": "Mistral.mistral-small-latest"

bootstrap/tutorial_3_experiment_variations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def create_premium_model_variations(self) -> bool:
7575
"name": "Claude Opus 4 Treatment",
7676
"instructions": "You are a helpful assistant that can search documentation and research papers. When search results are available, prioritize information from those results over your general knowledge to provide the most accurate and up-to-date responses. Use available tools to search the knowledge base and external research databases to answer questions accurately and comprehensively.",
7777
"model": {
78-
"name": "claude-opus-4-20250514",
78+
"name": "claude-opus-4-7",
7979
"provider": "anthropic"
8080
},
8181
"tools": ["search_v1", "search_v2", "reranking", "arxiv_search", "semantic_scholar"],
@@ -96,7 +96,7 @@ def _create_variations(self, ai_config_key: str, variations: List[Dict[str, Any]
9696
# Map model name to LaunchDarkly modelConfigKey
9797
model_name = variation["model"]["name"]
9898
model_config_key_map = {
99-
"claude-opus-4-20250514": "Anthropic.claude-opus-4-20250514",
99+
"claude-opus-4-7": "Anthropic.claude-opus-4-7",
100100
}
101101

102102
model_config_key = model_config_key_map.get(model_name)

tools/concurrent_traffic_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def evaluate_response(self, query, response):
6868

6969
try:
7070
ai_response = self.claude.messages.create(
71-
model="claude-3-haiku-20240307",
71+
model="claude-haiku-4-5-20251001",
7272
max_tokens=10,
7373
messages=[{"role": "user", "content": prompt}]
7474
)
@@ -88,7 +88,7 @@ def generate_base_topics(self):
8888
"""Generate base RL topics"""
8989
try:
9090
response = self.claude.messages.create(
91-
model="claude-3-5-haiku-20241022",
91+
model="claude-haiku-4-5-20251001",
9292
max_tokens=800,
9393
messages=[{
9494
"role": "user",
@@ -145,7 +145,7 @@ def generate_query(self, topic, inject_pii=False):
145145

146146
try:
147147
response = self.claude.messages.create(
148-
model="claude-3-5-haiku-20241022",
148+
model="claude-haiku-4-5-20251001",
149149
max_tokens=100,
150150
messages=[{"role": "user", "content": prompt}]
151151
)

utils/bedrock_helpers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def extract_base_model_from_inference_profile(inference_profile_id: str) -> str:
5151
"""
5252
Extract base model name from inference profile for pricing.
5353
54-
us.anthropic.claude-3-5-sonnet-20241022-v2:0 → claude-3-5-sonnet-20241022
54+
us.anthropic.claude-sonnet-4-6-v2:0 → claude-sonnet-4-6
5555
"""
5656
if not inference_profile_id:
5757
return inference_profile_id
@@ -67,7 +67,7 @@ def extract_base_model_from_inference_profile(inference_profile_id: str) -> str:
6767
if len(provider_parts) < 2:
6868
return inference_profile_id
6969

70-
# Now we have something like "claude-3-5-sonnet-20241022-v2:0"
70+
# Now we have something like "claude-sonnet-4-6-v2:0"
7171
full_model = provider_parts[1]
7272

7373
# Map to base model name for pricing
@@ -76,11 +76,11 @@ def extract_base_model_from_inference_profile(inference_profile_id: str) -> str:
7676

7777
# Map specific versions to pricing model names
7878
model_mapping = {
79-
'claude-3-5-sonnet-20241022': 'claude-3-5-sonnet-20241022',
79+
'claude-sonnet-4-6': 'claude-sonnet-4-6',
8080
'claude-3-5-sonnet-20250219': 'claude-3-5-sonnet-latest',
81-
'claude-3-7-sonnet-20250219': 'claude-3-7-sonnet-latest',
82-
'claude-3-5-haiku-20241022': 'claude-3-5-haiku-20241022',
83-
'claude-opus-4-20250514': 'claude-opus-4-20250514',
81+
'claude-3-7-sonnet-20250219': 'claude-sonnet-4-6',
82+
'claude-haiku-4-5-20251001': 'claude-haiku-4-5-20251001',
83+
'claude-opus-4-7': 'claude-opus-4-7',
8484
}
8585

8686
return model_mapping.get(model_base, model_base)

utils/cost_calculator.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
"gpt-4o-mini-2024-07-18": {"input": 0.15, "output": 0.60},
1414
"chatgpt-4o-latest": {"input": 6.00, "output": 18.00},
1515

16-
# Anthropic Claude Models - All Versions Found in Codebase
17-
"claude-3-5-sonnet-20241022": {"input": 3.00, "output": 15.00},
18-
"claude-3-5-haiku-20241022": {"input": 0.25, "output": 1.25},
19-
"claude-3-haiku-20240307": {"input": 0.25, "output": 1.25},
20-
"claude-3-7-sonnet-latest": {"input": 3.00, "output": 15.00},
16+
# Anthropic Claude Models
17+
"claude-sonnet-4-6": {"input": 3.00, "output": 15.00},
18+
"claude-haiku-4-5-20251001": {"input": 0.25, "output": 1.25},
2119
"claude-3-5-sonnet-latest": {"input": 3.00, "output": 15.00},
22-
"claude-opus-4-20250514": {"input": 15.00, "output": 75.00},
20+
"claude-opus-4-7": {"input": 15.00, "output": 75.00},
2321

2422
# Mistral Models (Free as specified)
2523
"mistral-small-latest": {"input": 0.0, "output": 0.0},
@@ -28,9 +26,9 @@
2826
"mistral-large": {"input": 0.0, "output": 0.0},
2927

3028
# LaunchDarkly Provider-Prefixed Names (from create_configs.py mapping)
31-
"Anthropic.claude-3-7-sonnet-latest": {"input": 3.00, "output": 15.00},
32-
"Anthropic.claude-3-5-haiku-20241022": {"input": 0.25, "output": 1.25},
33-
"Anthropic.claude-opus-4-20250514": {"input": 15.00, "output": 75.00},
29+
"Anthropic.claude-sonnet-4-6": {"input": 3.00, "output": 15.00},
30+
"Anthropic.claude-haiku-4-5-20251001": {"input": 0.25, "output": 1.25},
31+
"Anthropic.claude-opus-4-7": {"input": 15.00, "output": 75.00},
3432
"OpenAI.gpt-4o": {"input": 6.00, "output": 18.00},
3533
"OpenAI.gpt-4o-mini-2024-07-18": {"input": 0.15, "output": 0.60},
3634
"Mistral.mistral-small-latest": {"input": 0.0, "output": 0.0},

0 commit comments

Comments
 (0)