Skip to content

Commit d7fddb2

Browse files
authored
feat(models): add gemini-3.1-pro-preview and update gemini-3-pro thinking levels (#3263)
1 parent 61c7afc commit d7fddb2

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

apps/sim/app/api/tools/stt/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ async function transcribeWithGemini(
766766
const error = await response.json()
767767
if (response.status === 404) {
768768
throw new Error(
769-
`Model not found: ${modelName}. Use gemini-3-pro-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, or gemini-2.0-flash-exp`
769+
`Model not found: ${modelName}. Use gemini-3.1-pro-preview, gemini-3-pro-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, or gemini-2.0-flash-exp`
770770
)
771771
}
772772
const errorMessage = error.error?.message || JSON.stringify(error)

apps/sim/blocks/blocks/stt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const SttBlock: BlockConfig<SttBlockResponse> = {
9494
type: 'dropdown',
9595
condition: { field: 'provider', value: 'gemini' },
9696
options: [
97+
{ label: 'Gemini 3.1 Pro', id: 'gemini-3.1-pro-preview' },
9798
{ label: 'Gemini 3 Pro', id: 'gemini-3-pro-preview' },
9899
{ label: 'Gemini 2.5 Pro', id: 'gemini-2.5-pro' },
99100
{ label: 'Gemini 2.5 Flash', id: 'gemini-2.5-flash' },

apps/sim/blocks/blocks/vision.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const VISION_MODEL_OPTIONS = [
1313
{ label: 'Claude Opus 4.5', id: 'claude-opus-4-5' },
1414
{ label: 'Claude Sonnet 4.5', id: 'claude-sonnet-4-5' },
1515
{ label: 'Claude Haiku 4.5', id: 'claude-haiku-4-5' },
16+
{ label: 'Gemini 3.1 Pro Preview', id: 'gemini-3.1-pro-preview' },
1617
{ label: 'Gemini 3 Pro Preview', id: 'gemini-3-pro-preview' },
1718
{ label: 'Gemini 3 Flash Preview', id: 'gemini-3-flash-preview' },
1819
{ label: 'Gemini 2.5 Pro', id: 'gemini-2.5-pro' },

apps/sim/providers/models.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,23 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
834834
},
835835
icon: GeminiIcon,
836836
models: [
837+
{
838+
id: 'gemini-3.1-pro-preview',
839+
pricing: {
840+
input: 2.0,
841+
cachedInput: 0.2,
842+
output: 12.0,
843+
updatedAt: '2026-02-19',
844+
},
845+
capabilities: {
846+
temperature: { min: 0, max: 2 },
847+
thinking: {
848+
levels: ['low', 'medium', 'high'],
849+
default: 'high',
850+
},
851+
},
852+
contextWindow: 1048576,
853+
},
837854
{
838855
id: 'gemini-3-pro-preview',
839856
pricing: {
@@ -845,7 +862,7 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
845862
capabilities: {
846863
temperature: { min: 0, max: 2 },
847864
thinking: {
848-
levels: ['low', 'high'],
865+
levels: ['low', 'medium', 'high'],
849866
default: 'high',
850867
},
851868
},
@@ -957,6 +974,23 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
957974
toolUsageControl: true,
958975
},
959976
models: [
977+
{
978+
id: 'vertex/gemini-3.1-pro-preview',
979+
pricing: {
980+
input: 2.0,
981+
cachedInput: 0.2,
982+
output: 12.0,
983+
updatedAt: '2026-02-19',
984+
},
985+
capabilities: {
986+
temperature: { min: 0, max: 2 },
987+
thinking: {
988+
levels: ['low', 'medium', 'high'],
989+
default: 'high',
990+
},
991+
},
992+
contextWindow: 1048576,
993+
},
960994
{
961995
id: 'vertex/gemini-3-pro-preview',
962996
pricing: {
@@ -968,7 +1002,7 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
9681002
capabilities: {
9691003
temperature: { min: 0, max: 2 },
9701004
thinking: {
971-
levels: ['low', 'high'],
1005+
levels: ['low', 'medium', 'high'],
9721006
default: 'high',
9731007
},
9741008
},

0 commit comments

Comments
 (0)