Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/docs/content/docs/en/blocks/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ The user prompt represents the primary input data for inference processing. This

The Agent block supports multiple LLM providers through a unified inference interface. Available models include:

- **OpenAI**: GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 3.7 Sonnet
- **OpenAI**: GPT-5.1, GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 4.5 Sonnet, Claude Opus 4.1
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
Comment on lines +45 to 47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Documentation references non-existent models:

  • GPT-5.1 hasn't been announced by OpenAI
  • Claude 4.5 Sonnet and Claude Opus 4.1 don't match actual Anthropic model names (should be claude-sonnet-4-5 and claude-opus-4-1)
  • Azure OpenAI and OpenRouter are documented as "Other Providers" but should be separate categories since they're distinct provider types
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/content/docs/en/blocks/agent.mdx
Line: 45:47

Comment:
**logic:** Documentation references non-existent models:
- `GPT-5.1` hasn't been announced by OpenAI
- `Claude 4.5 Sonnet` and `Claude Opus 4.1` don't match actual Anthropic model names (should be `claude-sonnet-4-5` and `claude-opus-4-1`)
- `Azure OpenAI` and `OpenRouter` are documented as "Other Providers" but should be separate categories since they're distinct provider types

How can I resolve this? If you propose a fix, please make it concise.

- **Other Providers**: Groq, Cerebras, xAI, DeepSeek
- **Other Providers**: Groq, Cerebras, xAI, Azure OpenAI, OpenRouter
- **Local Models**: Ollama-compatible models

### Temperature
Expand Down
1 change: 1 addition & 0 deletions apps/sim/blocks/blocks/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Create a system prompt appropriately detailed for the request, using clear langu
type: 'dropdown',
placeholder: 'Select reasoning effort...',
options: [
{ label: 'none', id: 'none' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Added 'none' to reasoning effort, but GPT-5 models use 'minimal' (line 182 in models.ts). This inconsistency means GPT-5.1 and GPT-5 have different reasoning effort options.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/blocks/blocks/agent.ts
Line: 213:213

Comment:
**logic:** Added `'none'` to reasoning effort, but GPT-5 models use `'minimal'` (line 182 in `models.ts`). This inconsistency means GPT-5.1 and GPT-5 have different reasoning effort options.

How can I resolve this? If you propose a fix, please make it concise.

{ label: 'minimal', id: 'minimal' },
{ label: 'low', id: 'low' },
{ label: 'medium', id: 'medium' },
Expand Down
136 changes: 136 additions & 0 deletions apps/sim/providers/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,74 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
temperature: { min: 0, max: 2 },
},
},
{
id: 'gpt-5.1',
pricing: {
input: 1.25,
cachedInput: 0.125,
output: 10.0,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'low', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
Comment on lines +105 to +120
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: gpt-5.1 doesn't exist - OpenAI hasn't announced this model. Verify model availability before adding.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/providers/models.ts
Line: 105:120

Comment:
**logic:** `gpt-5.1` doesn't exist - OpenAI hasn't announced this model. Verify model availability before adding.

How can I resolve this? If you propose a fix, please make it concise.

{
id: 'gpt-5.1-mini',
pricing: {
input: 0.25,
cachedInput: 0.025,
output: 2.0,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'low', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'gpt-5.1-nano',
pricing: {
input: 0.05,
cachedInput: 0.005,
output: 0.4,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'low', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'gpt-5.1-codex',
pricing: {
input: 1.25,
cachedInput: 0.125,
output: 10.0,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'gpt-5',
pricing: {
Expand Down Expand Up @@ -253,6 +321,74 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
temperature: { min: 0, max: 2 },
},
},
{
id: 'azure/gpt-5.1',
pricing: {
input: 1.25,
cachedInput: 0.125,
output: 10.0,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'low', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'azure/gpt-5.1-mini',
pricing: {
input: 0.25,
cachedInput: 0.025,
output: 2.0,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'low', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'azure/gpt-5.1-nano',
pricing: {
input: 0.05,
cachedInput: 0.005,
output: 0.4,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'low', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'azure/gpt-5.1-codex',
pricing: {
input: 1.25,
cachedInput: 0.125,
output: 10.0,
updatedAt: '2025-11-14',
},
capabilities: {
reasoningEffort: {
values: ['none', 'medium', 'high'],
},
verbosity: {
values: ['low', 'medium', 'high'],
},
},
},
{
id: 'azure/gpt-5',
pricing: {
Expand Down
39 changes: 38 additions & 1 deletion apps/sim/providers/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const mockGetRotatingApiKey = vi.fn().mockReturnValue('rotating-server-key')
const originalRequire = module.require

describe('getApiKey', () => {
// Save original env and reset between tests
const originalEnv = { ...process.env }

beforeEach(() => {
Expand Down Expand Up @@ -146,6 +145,15 @@ describe('Model Capabilities', () => {
'deepseek-chat',
'azure/gpt-4.1',
'azure/model-router',
// GPT-5.1 models don't support temperature (removed in our implementation)
'gpt-5.1',
'gpt-5.1-mini',
'gpt-5.1-nano',
'gpt-5.1-codex',
'azure/gpt-5.1',
'azure/gpt-5.1-mini',
'azure/gpt-5.1-nano',
'azure/gpt-5.1-codex',
// GPT-5 models don't support temperature (removed in our implementation)
'gpt-5',
'gpt-5-mini',
Expand Down Expand Up @@ -218,6 +226,15 @@ describe('Model Capabilities', () => {
expect(getMaxTemperature('azure/o3')).toBeUndefined()
expect(getMaxTemperature('azure/o4-mini')).toBeUndefined()
expect(getMaxTemperature('deepseek-r1')).toBeUndefined()
// GPT-5.1 models don't support temperature
expect(getMaxTemperature('gpt-5.1')).toBeUndefined()
expect(getMaxTemperature('gpt-5.1-mini')).toBeUndefined()
expect(getMaxTemperature('gpt-5.1-nano')).toBeUndefined()
expect(getMaxTemperature('gpt-5.1-codex')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1-mini')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1-nano')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1-codex')).toBeUndefined()
// GPT-5 models don't support temperature
expect(getMaxTemperature('gpt-5')).toBeUndefined()
expect(getMaxTemperature('gpt-5-mini')).toBeUndefined()
Expand Down Expand Up @@ -306,6 +323,16 @@ describe('Model Capabilities', () => {
)

it.concurrent('should have correct models in MODELS_WITH_REASONING_EFFORT', () => {
// Should contain GPT-5.1 models that support reasoning effort
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1-mini')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1-nano')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1-codex')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1-mini')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1-nano')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1-codex')

// Should contain GPT-5 models that support reasoning effort
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5-mini')
Expand All @@ -325,6 +352,16 @@ describe('Model Capabilities', () => {
})

it.concurrent('should have correct models in MODELS_WITH_VERBOSITY', () => {
// Should contain GPT-5.1 models that support verbosity
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1-mini')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1-nano')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1-codex')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1-mini')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1-nano')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1-codex')

// Should contain GPT-5 models that support verbosity
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5-mini')
Expand Down