diff --git a/src/modules/alt.ts b/src/modules/alt.ts index fe7c284..a168d59 100644 --- a/src/modules/alt.ts +++ b/src/modules/alt.ts @@ -10,11 +10,11 @@ import { calculateCost } from "../utils/calculateCost.js"; import { isSubscribed } from "../utils/isSubscribed.js"; import { logger } from "../utils/logger.js"; import { replyToError } from "../utils/replyToError.js"; -import type { ImageBlockParam } from "@anthropic-ai/sdk/resources/index.js"; +import type { Base64ImageSource } from "@anthropic-ai/sdk/resources/index.js"; const isValidContentType = ( type: string, -): type is ImageBlockParam["source"]["media_type"] => { +): type is Base64ImageSource["media_type"] => { return [ "image/jpg", "image/jpeg", @@ -100,7 +100,7 @@ export const alt = async( role: "user", }, ], - model: "claude-3-5-sonnet-latest", + model: "claude-sonnet-4-20250514", system: `${personality} Your role in this conversation is to generate descriptive and accessible alt-text for the user's image. Be as descriptive as possible. Do not include ANYTHING in your response EXCEPT the actual alt-text. Wrap the text in a multi-line code block for easy copying.`, temperature: 1, }); diff --git a/src/modules/evaluate.ts b/src/modules/evaluate.ts index b59c502..4df8a5f 100644 --- a/src/modules/evaluate.ts +++ b/src/modules/evaluate.ts @@ -31,7 +31,7 @@ export const evaluate = async( // eslint-disable-next-line @typescript-eslint/naming-convention -- Required key format for SDK. max_tokens: 2000, messages: [ { content: code, role: "user" } ], - model: "claude-3-5-sonnet-latest", + model: "claude-sonnet-4-20250514", system: `${personality} Your role in this conversation is to evaluate the user's code and provide the result. Wrap ONLY THE CODE RESULT in a multi-line code block for easy copying.`, temperature: 1, }); diff --git a/src/modules/mood.ts b/src/modules/mood.ts index c8f4a3d..8ee768d 100644 --- a/src/modules/mood.ts +++ b/src/modules/mood.ts @@ -32,7 +32,7 @@ export const mood = async( // eslint-disable-next-line @typescript-eslint/naming-convention -- Required key format for SDK. max_tokens: 2000, messages: [ { content: prompt, role: "user" } ], - model: "claude-3-5-sonnet-latest", + model: "claude-sonnet-4-20250514", system: `${personality} Your role in this conversation is to analyse the text the user provides for the overall sentiment and mood of the author.`, temperature: 1, }); diff --git a/src/modules/proofread.ts b/src/modules/proofread.ts index f8092b4..7155945 100644 --- a/src/modules/proofread.ts +++ b/src/modules/proofread.ts @@ -32,7 +32,7 @@ export const proofread = async( // eslint-disable-next-line @typescript-eslint/naming-convention -- Required key format for SDK. max_tokens: 2000, messages: [ { content: prompt, role: "user" } ], - model: "claude-3-5-sonnet-latest", + model: "claude-sonnet-4-20250514", system: `${personality} Your role in this conversation is to proofread the text the user has provided. You should identify spelling and grammatical errors using British English.`, temperature: 1, }); diff --git a/src/modules/query.ts b/src/modules/query.ts index 93d36e5..79d2d58 100644 --- a/src/modules/query.ts +++ b/src/modules/query.ts @@ -32,7 +32,7 @@ export const query = async( // eslint-disable-next-line @typescript-eslint/naming-convention -- Required key format for SDK. max_tokens: 2000, messages: [ { content: prompt, role: "user" } ], - model: "claude-3-5-sonnet-latest", + model: "claude-sonnet-4-20250514", system: `${personality} Your role in this conversation is to answer the user's question to the best of your abilities. When possible, include links to relevant sources.`, temperature: 1, }); diff --git a/src/modules/summarise.ts b/src/modules/summarise.ts index 082779e..4c1f8cf 100644 --- a/src/modules/summarise.ts +++ b/src/modules/summarise.ts @@ -32,7 +32,7 @@ export const summarise = async( // eslint-disable-next-line @typescript-eslint/naming-convention -- Required key format for SDK. max_tokens: 2000, messages: [ { content: prompt, role: "user" } ], - model: "claude-3-5-sonnet-latest", + model: "claude-sonnet-4-20250514", system: `${personality} Your role in this conversation is to summarise the text the user has provided. Your goal is to reach 250 words or less. Wrap ONLY THE SUMMARY in multi-line code block so it is easy to copy.`, temperature: 1, });