diff --git a/src/backend/src/modules/puterai/ClaudeService.js b/src/backend/src/modules/puterai/ClaudeService.js index c0d30239..33efd5a5 100644 --- a/src/backend/src/modules/puterai/ClaudeService.js +++ b/src/backend/src/modules/puterai/ClaudeService.js @@ -28,6 +28,7 @@ class ClaudeService extends BaseService { ['puter-chat-completion']: { async list () { return [ + 'claude-3-5-sonnet-latest', 'claude-3-5-sonnet-20241022', 'claude-3-5-sonnet-20240620', 'claude-3-haiku-20240307', @@ -75,7 +76,7 @@ class ClaudeService extends BaseService { }, stream); (async () => { const completion = await this.anthropic.messages.stream({ - model: model ?? 'claude-3-5-sonnet-20241022', + model: model ?? 'claude-3-5-sonnet-latest', max_tokens: 1000, temperature: 0, system: PUTER_PROMPT + JSON.stringify(system_prompts), @@ -98,7 +99,7 @@ class ClaudeService extends BaseService { } const msg = await this.anthropic.messages.create({ - model: 'claude-3-5-sonnet-20241022', + model: 'claude-3-5-sonnet-latest', max_tokens: 1000, temperature: 0, system: PUTER_PROMPT + JSON.stringify(system_prompts), diff --git a/src/puter-js/src/modules/AI.js b/src/puter-js/src/modules/AI.js index f6ee7f3d..6b287021 100644 --- a/src/puter-js/src/modules/AI.js +++ b/src/puter-js/src/modules/AI.js @@ -229,7 +229,7 @@ class AI{ // convert to the correct model name if necessary if( options.model === 'claude-3-5-sonnet' || options.model === 'claude'){ - options.model = 'claude-3-5-sonnet-20240620'; + options.model = 'claude-3-5-sonnet-latest'; } if ( options.model === 'mistral' ) { options.model = 'mistral-large-latest'; @@ -241,7 +241,12 @@ class AI{ // map model to the appropriate driver if (!options.model || options.model === 'gpt-4o' || options.model === 'gpt-4o-mini') { driver = 'openai-completion'; - }else if(options.model === 'claude-3-haiku-20240307' || options.model === 'claude-3-5-sonnet-20240620'){ + }else if( + options.model === 'claude-3-haiku-20240307' || + options.model === 'claude-3-5-sonnet-20240620' || + options.model === 'claude-3-5-sonnet-20241022' || + options.model === 'claude-3-5-sonnet-latest' + ){ driver = 'claude'; }else if(options.model === 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo' || options.model === 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo' || options.model === 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo' || options.model === `google/gemma-2-27b-it`){ driver = 'together-ai';