From c68d6174dcb7bcf1db41de5f8a7736cf2eb48d25 Mon Sep 17 00:00:00 2001 From: Ling-Sen Peng Date: Mon, 17 Aug 2026 15:22:06 -0700 Subject: [PATCH] fix(examples): replace retired claude-sonnet-4-20250514 with claude-sonnet-4-6 Anthropic retired claude-sonnet-4-20250514 (404 from the API), breaking every example pinned to it. claude-sonnet-4-6 is the like-for-like replacement: current previous-generation Sonnet that still accepts the legacy extended-thinking shape these examples use via thinkingBudgetTokens, so they work on all server versions. --- examples/agents/56-rag-agent.ts | 2 +- examples/agents/58-scatter-gather.ts | 2 +- examples/agents/59-coding-agent.ts | 4 ++-- examples/agents/60-github-coding-agent.ts | 8 ++++---- examples/agents/60a-github-coding-agent-simple.ts | 8 ++++---- examples/agents/README.md | 2 +- examples/agents/adk/35-rag-agent.ts | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/agents/56-rag-agent.ts b/examples/agents/56-rag-agent.ts index 411449ff..ebd7d31c 100644 --- a/examples/agents/56-rag-agent.ts +++ b/examples/agents/56-rag-agent.ts @@ -55,7 +55,7 @@ const DOCUMENTS = [ text: "Agent Configuration. Agents are defined with a name, model, instructions, " + "and tools. The model field uses the format 'provider/model_name', e.g. " + - "'openai/gpt-4o' or 'anthropic/claude-sonnet-4-20250514'. Instructions can be " + + "'openai/gpt-4o' or 'anthropic/claude-sonnet-4-6'. Instructions can be " + 'a string or a PromptTemplate referencing a stored prompt. Tools can be ' + '@tool-decorated Python functions, http_tool for REST APIs, mcp_tool for ' + 'MCP servers, or agent_tool to wrap another agent as a callable tool. ' + diff --git a/examples/agents/58-scatter-gather.ts b/examples/agents/58-scatter-gather.ts index 443a89d7..c43f159b 100644 --- a/examples/agents/58-scatter-gather.ts +++ b/examples/agents/58-scatter-gather.ts @@ -45,7 +45,7 @@ const searchKnowledgeBase = tool( export const researcher = new Agent({ name: 'researcher', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a country analyst. You will be given the name of a country. ' + 'Use the search_knowledge_base tool ONCE to research that country, then ' + diff --git a/examples/agents/59-coding-agent.ts b/examples/agents/59-coding-agent.ts index 43ad5463..abf77009 100644 --- a/examples/agents/59-coding-agent.ts +++ b/examples/agents/59-coding-agent.ts @@ -18,7 +18,7 @@ import { Agent, AgentRuntime } from '@io-orkes/conductor-javascript/agents'; export const qaTester = new Agent({ name: 'qa_tester', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a meticulous QA engineer. Review the code written by the ' + 'coder for correctness, edge cases, and bugs. Write and execute test ' + @@ -36,7 +36,7 @@ export const qaTester = new Agent({ export const coder = new Agent({ name: 'coder', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are an expert Python developer. Write clean, well-structured ' + 'Python code to solve the given problem. Always execute your code to ' + diff --git a/examples/agents/60-github-coding-agent.ts b/examples/agents/60-github-coding-agent.ts index c8065626..1eb3a8df 100644 --- a/examples/agents/60-github-coding-agent.ts +++ b/examples/agents/60-github-coding-agent.ts @@ -258,7 +258,7 @@ const qaTools = [readFile, listFiles]; export const githubAgent = new Agent({ name: 'github_agent', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a GitHub operations specialist. You handle all git and GitHub CLI interactions.\n\n' + 'IMPORTANT: Read the conversation history carefully. If the conversation already contains ' + @@ -283,7 +283,7 @@ export const githubAgent = new Agent({ export const coderAgent = new Agent({ name: 'coder', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are an expert developer. Write clean, well-structured code.\n\n' + 'WHEN YOU RECEIVE A TASK:\n' + @@ -303,7 +303,7 @@ export const coderAgent = new Agent({ export const qaTester = new Agent({ name: 'qa_tester', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a meticulous QA engineer. Review the code written by the coder.\n\n' + '1. Use read_file to read the code that was written\n' + @@ -323,7 +323,7 @@ export const qaTester = new Agent({ export const codingTeam = new Agent({ name: 'coding_team', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a coding team coordinator. Delegate the incoming request ' + 'to github_agent to get started. Call transfer_to_github_agent now.', diff --git a/examples/agents/60a-github-coding-agent-simple.ts b/examples/agents/60a-github-coding-agent-simple.ts index b4dd21cc..07314348 100644 --- a/examples/agents/60a-github-coding-agent-simple.ts +++ b/examples/agents/60a-github-coding-agent-simple.ts @@ -21,7 +21,7 @@ const WORK_DIR = `/tmp/codingexamples-${randomBytes(4).toString('hex')}`; export const githubAgent = new Agent({ name: 'github_agent', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a GitHub operations specialist.\n\n' + `Repo: ${REPO}\nWork dir: ${WORK_DIR}\n\n` + @@ -45,7 +45,7 @@ export const githubAgent = new Agent({ export const coder = new Agent({ name: 'coder', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are an expert developer.\n\n' + `The repo is cloned at ${WORK_DIR}.\n\n` + @@ -65,7 +65,7 @@ export const coder = new Agent({ export const qaTester = new Agent({ name: 'qa_tester', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a meticulous QA engineer.\n\n' + `The repo is at ${WORK_DIR}. You can read files with:\n cat ${WORK_DIR}/src/main.py\n\n` + @@ -83,7 +83,7 @@ export const qaTester = new Agent({ export const codingTeam = new Agent({ name: 'coding_team', - model: 'anthropic/claude-sonnet-4-20250514', + model: 'anthropic/claude-sonnet-4-6', instructions: 'You are a coding team coordinator. Delegate to github_agent. ' + 'Call transfer_to_github_agent now.', diff --git a/examples/agents/README.md b/examples/agents/README.md index f2cbf011..b5cd2afd 100644 --- a/examples/agents/README.md +++ b/examples/agents/README.md @@ -127,7 +127,7 @@ The `CONDUCTOR_AGENT_LLM_MODEL` variable uses the `provider/model-name` format. | Provider | Model string | API key env var | |----------|-------------|-----------------| | OpenAI | `anthropic/claude-sonnet-4-6` (default) | `OPENAI_API_KEY` | -| Anthropic | `anthropic/claude-sonnet-4-20250514` | `ANTHROPIC_API_KEY` | +| Anthropic | `anthropic/claude-sonnet-4-6` | `ANTHROPIC_API_KEY` | | Google Gemini | `google_gemini/gemini-2.0-flash` | `GOOGLE_GEMINI_API_KEY` | | AWS Bedrock | `aws_bedrock/...` | AWS credentials | | Azure OpenAI | `azure_openai/...` | Azure credentials | diff --git a/examples/agents/adk/35-rag-agent.ts b/examples/agents/adk/35-rag-agent.ts index 5c006dfd..07a60878 100644 --- a/examples/agents/adk/35-rag-agent.ts +++ b/examples/agents/adk/35-rag-agent.ts @@ -71,7 +71,7 @@ const DOCUMENTS: Document[] = [ text: "Agent Configuration. Agents are defined with a name, model, instructions, " + "and tools. The model field uses the format 'provider/model_name', e.g. " + - "'openai/gpt-4o' or 'anthropic/claude-sonnet-4-20250514'. Instructions can be " + + "'openai/gpt-4o' or 'anthropic/claude-sonnet-4-6'. Instructions can be " + 'a string or a PromptTemplate referencing a stored prompt. Tools can be ' + '@tool-decorated Python functions, http_tool for REST APIs, mcp_tool for ' + 'MCP servers, or agent_tool to wrap another agent as a callable tool. ' +