Skip to content

Commit 097e55c

Browse files
authored
Adding Sonnet 4.5, and swapping it in as the new default (#1835)
1 parent 930f67c commit 097e55c

File tree

11 files changed

+52
-15
lines changed

11 files changed

+52
-15
lines changed

packages/charm/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export { type ParsedMention, type ProcessedPrompt } from "./imagine.ts";
4040
export { formatPromptWithMentions, parseComposerDocument } from "./format.ts";
4141

4242
export const DEFAULT_MODEL = [
43-
"anthropic:claude-sonnet-4-0",
43+
"anthropic:claude-sonnet-4-5",
4444
][0];
4545

4646
// Export workflow module

packages/llm/src/prompts/charm-describe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Provide your one-sentence description inside <description> tags.
4343
* @param spec - The specification/description of the web application.
4444
* @param code - The code of the web application.
4545
* @param schema - The schema of the web application.
46-
* @param model - The model to use to generate the description. (default: "anthropic:claude-sonnet-4-0")
46+
* @param model - The model to use to generate the description. (default: "anthropic:claude-sonnet-4-5")
4747
* @returns The generated description.
4848
*/
4949
export async function describeCharm(

packages/llm/src/prompts/charm-suggestions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export interface CharmSuggestion {
8181
* @param code - The code of the web app.
8282
* @param schema - The schema of the web app.
8383
* @param count - The number of charm suggestions to generate. (default: 3)
84-
* @param model - The model to use to generate the charm suggestions. (default: "anthropic:claude-sonnet-4-0")
84+
* @param model - The model to use to generate the charm suggestions. (default: "anthropic:claude-sonnet-4-5")
8585
* @returns The generated charm suggestions.
8686
*/
8787
export async function generateCharmSuggestions(

packages/llm/src/prompts/code-and-schema-gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Return ONLY the requested XML tags, no other commentary.
196196
* Generates a schema and code from a goal.
197197
* @param goal The user's goal or request
198198
* @param existingSchema Optional existing schema to use as a basis
199-
* @param model Optional model identifier to use (defaults to claude-sonnet-4-0)
199+
* @param model Optional model identifier to use (defaults to claude-sonnet-4-5)
200200
* @returns Object containing title, description, specification, schema
201201
*/
202202
export async function generateCodeAndSchema(

packages/llm/src/prompts/recipe-fix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Remember to consider the context of the code running inside an iframe and ensure
7777
* @param code - The code of the web application.
7878
* @param schema - The schema of the web application.
7979
* @param error - The error stacktrace that resulted from running the code.
80-
* @param model - The model to use to generate the description. (default: "anthropic:claude-sonnet-4-0")
80+
* @param model - The model to use to generate the description. (default: "anthropic:claude-sonnet-4-5")
8181
* @returns The recipe.
8282
*/
8383
export async function fixRecipePrompt(

packages/llm/src/prompts/spec-and-schema-gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,13 @@ ${
242242
* Generates a complete specification, schema, and plan from a goal.
243243
* @param goal The user's goal or request
244244
* @param existingSchema Optional existing schema to use as a basis
245-
* @param model Optional model identifier to use (defaults to claude-sonnet-4-0)
245+
* @param model Optional model identifier to use (defaults to claude-sonnet-4-5)
246246
* @returns Object containing title, description, specification, schema
247247
*/
248248
export async function generateSpecAndSchema(
249249
form: WorkflowForm,
250250
existingSchema?: JSONSchema,
251-
model: string = "anthropic:claude-sonnet-4-0",
251+
model: string = "anthropic:claude-sonnet-4-5",
252252
): Promise<{
253253
spec: string;
254254
plan: string;
@@ -384,7 +384,7 @@ Based on this goal and the existing schema, please provide a title, description,
384384
* Generates a complete specification, schema, and plan from a goal.
385385
* @param goal The user's goal or request
386386
* @param existingSchema Optional existing schema to use as a basis
387-
* @param model Optional model identifier to use (defaults to claude-sonnet-4-0)
387+
* @param model Optional model identifier to use (defaults to claude-sonnet-4-5)
388388
* @returns Object containing title, description, specification, schema
389389
*/
390390
export async function generateSpecAndSchemaAndCode(

packages/llm/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
JSONSchema,
77
} from "@commontools/api";
88

9-
export const DEFAULT_MODEL_NAME: ModelName = "anthropic:claude-sonnet-4-0";
9+
export const DEFAULT_MODEL_NAME: ModelName = "anthropic:claude-sonnet-4-5";
1010

1111
// NOTE(ja): This should be an array of models, the first model will be tried, if it
1212
// fails, the second model will be tried, etc.

packages/patterns/chatbot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const TitleGenerator = recipe<
101101
export default recipe<ChatInput, ChatOutput>(
102102
"Chat",
103103
({ messages, tools, theme }) => {
104-
const model = cell<string>("anthropic:claude-sonnet-4-0");
104+
const model = cell<string>("anthropic:claude-sonnet-4-5");
105105

106106
const { addMessage, cancelGeneration, pending } = llmDialog({
107107
system: "You are a helpful assistant with some tools.",

packages/seeder/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {
1717
"no-cache": noCache,
1818
"no-verify": noVerify,
1919
"no-report": noReport,
20-
model = "anthropic:claude-sonnet-4-0",
20+
model = "anthropic:claude-sonnet-4-5",
2121
} = parseArgs(
2222
Deno.args,
2323
{

packages/toolshed/routes/ai/llm/llm.routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const LLMRequestSchema = toZod<LLMRequest>().with({
5151
messages: z.array(MessageSchema) as any, // Trust our BuiltInLLMMessage = CoreMessage alignment
5252
system: z.string().optional(),
5353
model: z.string().openapi({
54-
example: "claude-sonnet-4-0",
54+
example: "claude-sonnet-4-5",
5555
}),
5656
maxTokens: z.number().optional(),
5757
stop: z.string().optional(),
@@ -181,7 +181,7 @@ export const generateText = createRoute({
181181
"application/json": {
182182
schema: LLMRequestSchema.openapi({
183183
example: {
184-
model: "anthropic:claude-sonnet-4-0",
184+
model: "anthropic:claude-sonnet-4-5",
185185
system: "You are a pirate, make sure you talk like one.",
186186
stream: false,
187187
cache: true,

0 commit comments

Comments
 (0)