mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
feat(models): added claude sonnet 4 and opus 4
This commit is contained in:
@@ -140,8 +140,10 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
|
||||
'o4-mini',
|
||||
'gpt-4.1',
|
||||
// Claude models
|
||||
'claude-3-5-sonnet-20240620',
|
||||
'claude-sonnet-4-20250514',
|
||||
'claude-opus-4-20250514',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
],
|
||||
not: true, // Show for all models EXCEPT those listed
|
||||
}
|
||||
@@ -237,10 +239,11 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
|
||||
context: { type: 'string', required: false },
|
||||
model: { type: 'string', required: true },
|
||||
apiKey: { type: 'string', required: true },
|
||||
messages: {
|
||||
type: 'json',
|
||||
messages: {
|
||||
type: 'json',
|
||||
required: false,
|
||||
description: 'Array of message objects with role and content fields for advanced chat history control.'
|
||||
description:
|
||||
'Array of message objects with role and content fields for advanced chat history control.',
|
||||
},
|
||||
responseFormat: {
|
||||
type: 'json',
|
||||
|
||||
@@ -36,8 +36,13 @@ export const anthropicProvider: ProviderConfig = {
|
||||
name: 'Anthropic',
|
||||
description: "Anthropic's Claude models",
|
||||
version: '1.0.0',
|
||||
models: ['claude-3-5-sonnet-20240620', 'claude-3-7-sonnet-20250219'],
|
||||
defaultModel: 'claude-3-7-sonnet-20250219',
|
||||
models: [
|
||||
'claude-sonnet-4-20250514',
|
||||
'claude-opus-4-20250514',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
],
|
||||
defaultModel: 'claude-sonnet-4-20250514',
|
||||
|
||||
executeRequest: async (
|
||||
request: ProviderRequest
|
||||
|
||||
@@ -28,6 +28,9 @@ describe('supportsTemperature', () => {
|
||||
const supportedModels = [
|
||||
'gpt-4o',
|
||||
'gemini-2.5-flash-preview-04-17',
|
||||
'claude-sonnet-4-20250514',
|
||||
'claude-opus-4-20250514',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
`grok-3-latest`,
|
||||
`grok-3-fast-latest`,
|
||||
@@ -58,8 +61,10 @@ describe('getMaxTemperature', () => {
|
||||
|
||||
it('should return 1 for models with temperature range 0-1', () => {
|
||||
const models = [
|
||||
'claude-3-5-sonnet-20240620',
|
||||
'claude-sonnet-4-20250514',
|
||||
'claude-opus-4-20250514',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
'grok-3-latest',
|
||||
'grok-3-fast-latest',
|
||||
]
|
||||
|
||||
@@ -17,8 +17,10 @@ export const MODELS_TEMP_RANGE_0_2 = [
|
||||
// Models that support temperature with range 0-1
|
||||
export const MODELS_TEMP_RANGE_0_1 = [
|
||||
// Anthropic models
|
||||
'claude-3-5-sonnet-20240620',
|
||||
'claude-sonnet-4-20250514',
|
||||
'claude-opus-4-20250514',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
// xAI models
|
||||
'grok-3-latest',
|
||||
'grok-3-fast-latest',
|
||||
|
||||
@@ -52,6 +52,18 @@ const modelPricing: ModelPricingMap = {
|
||||
output: 15.0,
|
||||
updatedAt: '2025-03-21',
|
||||
},
|
||||
'claude-sonnet-4-20250514': {
|
||||
input: 3.0,
|
||||
cachedInput: 1.5,
|
||||
output: 15.0,
|
||||
updatedAt: '2025-05-22',
|
||||
},
|
||||
'claude-opus-4-20250514': {
|
||||
input: 15.0,
|
||||
cachedInput: 7.5,
|
||||
output: 75.0,
|
||||
updatedAt: '2025-05-22',
|
||||
},
|
||||
|
||||
// Google Models
|
||||
'gemini-2.5-pro-exp-03-25': {
|
||||
|
||||
@@ -34,7 +34,12 @@ export const providers: Record<
|
||||
},
|
||||
anthropic: {
|
||||
...anthropicProvider,
|
||||
models: ['claude-3-5-sonnet-20240620', 'claude-3-7-sonnet-20250219'],
|
||||
models: [
|
||||
'claude-sonnet-4-20250514',
|
||||
'claude-opus-4-20250514',
|
||||
'claude-3-7-sonnet-20250219',
|
||||
'claude-3-5-sonnet-20240620',
|
||||
],
|
||||
computerUseModels: ['claude-3-5-sonnet-20240620', 'claude-3-7-sonnet-20250219'],
|
||||
modelPatterns: [/^claude/],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user