Skip to content

Commit 2f492ca

Browse files
authored
feat(providers): add Gemini Deep Research via Interactions API (#3192)
* feat(providers): add Gemini Deep Research via Interactions API * fix(providers): hide memory UI for deep research models * feat(providers): add multi-turn support and token logging for deep research * fix(providers): only collect user messages as deep research input * fix(providers): forward previousInteractionId to provider request * fix(blocks): hide memory child fields for deep research models * remove memory params from models that don't support it in provider requests * update blog
1 parent 5792e7e commit 2f492ca

File tree

10 files changed

+610
-7
lines changed

10 files changed

+610
-7
lines changed

apps/sim/blocks/blocks/agent.ts

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import {
1010
getReasoningEffortValuesForModel,
1111
getThinkingLevelsForModel,
1212
getVerbosityValuesForModel,
13+
MODELS_WITH_DEEP_RESEARCH,
1314
MODELS_WITH_REASONING_EFFORT,
1415
MODELS_WITH_THINKING,
1516
MODELS_WITH_VERBOSITY,
17+
MODELS_WITHOUT_MEMORY,
1618
providers,
1719
supportsTemperature,
1820
} from '@/providers/utils'
@@ -412,12 +414,22 @@ Return ONLY the JSON array.`,
412414
title: 'Tools',
413415
type: 'tool-input',
414416
defaultValue: [],
417+
condition: {
418+
field: 'model',
419+
value: MODELS_WITH_DEEP_RESEARCH,
420+
not: true,
421+
},
415422
},
416423
{
417424
id: 'skills',
418425
title: 'Skills',
419426
type: 'skill-input',
420427
defaultValue: [],
428+
condition: {
429+
field: 'model',
430+
value: MODELS_WITH_DEEP_RESEARCH,
431+
not: true,
432+
},
421433
},
422434
{
423435
id: 'memoryType',
@@ -431,6 +443,11 @@ Return ONLY the JSON array.`,
431443
{ label: 'Sliding window (tokens)', id: 'sliding_window_tokens' },
432444
],
433445
defaultValue: 'none',
446+
condition: {
447+
field: 'model',
448+
value: MODELS_WITHOUT_MEMORY,
449+
not: true,
450+
},
434451
},
435452
{
436453
id: 'conversationId',
@@ -444,6 +461,7 @@ Return ONLY the JSON array.`,
444461
condition: {
445462
field: 'memoryType',
446463
value: ['conversation', 'sliding_window', 'sliding_window_tokens'],
464+
and: { field: 'model', value: MODELS_WITHOUT_MEMORY, not: true },
447465
},
448466
},
449467
{
@@ -454,6 +472,7 @@ Return ONLY the JSON array.`,
454472
condition: {
455473
field: 'memoryType',
456474
value: ['sliding_window'],
475+
and: { field: 'model', value: MODELS_WITHOUT_MEMORY, not: true },
457476
},
458477
},
459478
{
@@ -464,6 +483,7 @@ Return ONLY the JSON array.`,
464483
condition: {
465484
field: 'memoryType',
466485
value: ['sliding_window_tokens'],
486+
and: { field: 'model', value: MODELS_WITHOUT_MEMORY, not: true },
467487
},
468488
},
469489
{
@@ -477,9 +497,13 @@ Return ONLY the JSON array.`,
477497
condition: () => ({
478498
field: 'model',
479499
value: (() => {
500+
const deepResearch = new Set(MODELS_WITH_DEEP_RESEARCH.map((m) => m.toLowerCase()))
480501
const allModels = Object.keys(getBaseModelProviders())
481502
return allModels.filter(
482-
(model) => supportsTemperature(model) && getMaxTemperature(model) === 1
503+
(model) =>
504+
supportsTemperature(model) &&
505+
getMaxTemperature(model) === 1 &&
506+
!deepResearch.has(model.toLowerCase())
483507
)
484508
})(),
485509
}),
@@ -495,9 +519,13 @@ Return ONLY the JSON array.`,
495519
condition: () => ({
496520
field: 'model',
497521
value: (() => {
522+
const deepResearch = new Set(MODELS_WITH_DEEP_RESEARCH.map((m) => m.toLowerCase()))
498523
const allModels = Object.keys(getBaseModelProviders())
499524
return allModels.filter(
500-
(model) => supportsTemperature(model) && getMaxTemperature(model) === 2
525+
(model) =>
526+
supportsTemperature(model) &&
527+
getMaxTemperature(model) === 2 &&
528+
!deepResearch.has(model.toLowerCase())
501529
)
502530
})(),
503531
}),
@@ -508,13 +536,23 @@ Return ONLY the JSON array.`,
508536
type: 'short-input',
509537
placeholder: 'Enter max tokens (e.g., 4096)...',
510538
mode: 'advanced',
539+
condition: {
540+
field: 'model',
541+
value: MODELS_WITH_DEEP_RESEARCH,
542+
not: true,
543+
},
511544
},
512545
{
513546
id: 'responseFormat',
514547
title: 'Response Format',
515548
type: 'code',
516549
placeholder: 'Enter JSON schema...',
517550
language: 'json',
551+
condition: {
552+
field: 'model',
553+
value: MODELS_WITH_DEEP_RESEARCH,
554+
not: true,
555+
},
518556
wandConfig: {
519557
enabled: true,
520558
maintainHistory: true,
@@ -607,6 +645,16 @@ Example 3 (Array Input):
607645
generationType: 'json-schema',
608646
},
609647
},
648+
{
649+
id: 'previousInteractionId',
650+
title: 'Previous Interaction ID',
651+
type: 'short-input',
652+
placeholder: 'e.g., {{agent_1.interactionId}}',
653+
condition: {
654+
field: 'model',
655+
value: MODELS_WITH_DEEP_RESEARCH,
656+
},
657+
},
610658
],
611659
tools: {
612660
access: [
@@ -770,5 +818,13 @@ Example 3 (Array Input):
770818
description: 'Provider timing information',
771819
},
772820
cost: { type: 'json', description: 'Cost of the API call' },
821+
interactionId: {
822+
type: 'string',
823+
description: 'Interaction ID for multi-turn deep research follow-ups',
824+
condition: {
825+
field: 'model',
826+
value: MODELS_WITH_DEEP_RESEARCH,
827+
},
828+
},
773829
},
774830
}

apps/sim/content/blog/enterprise/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
slug: enterprise
33
title: 'Build with Sim for Enterprise'
44
description: 'Access control, BYOK, self-hosted deployments, on-prem Copilot, SSO & SAML, whitelabeling, Admin API, and flexible data retention—enterprise features for teams with strict security and compliance requirements.'
5-
date: 2026-01-23
6-
updated: 2026-01-23
5+
date: 2026-02-11
6+
updated: 2026-02-11
77
authors:
88
- vik
99
readingTime: 10
@@ -13,8 +13,8 @@ ogAlt: 'Sim Enterprise features overview'
1313
about: ['Enterprise Software', 'Security', 'Compliance', 'Self-Hosting']
1414
timeRequired: PT10M
1515
canonical: https://sim.ai/studio/enterprise
16-
featured: false
17-
draft: true
16+
featured: true
17+
draft: false
1818
---
1919

2020
We've been working with security teams at larger organizations to bring Sim into environments with strict compliance and data handling requirements. This post covers the enterprise capabilities we've built: granular access control, bring-your-own-keys, self-hosted deployments, on-prem Copilot, SSO & SAML, whitelabeling, compliance, and programmatic management via the Admin API.

apps/sim/executor/handlers/agent/agent-handler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,7 @@ export class AgentBlockHandler implements BlockHandler {
999999
reasoningEffort: inputs.reasoningEffort,
10001000
verbosity: inputs.verbosity,
10011001
thinkingLevel: inputs.thinkingLevel,
1002+
previousInteractionId: inputs.previousInteractionId,
10021003
}
10031004
}
10041005

@@ -1069,6 +1070,7 @@ export class AgentBlockHandler implements BlockHandler {
10691070
reasoningEffort: providerRequest.reasoningEffort,
10701071
verbosity: providerRequest.verbosity,
10711072
thinkingLevel: providerRequest.thinkingLevel,
1073+
previousInteractionId: providerRequest.previousInteractionId,
10721074
})
10731075

10741076
return this.processProviderResponse(response, block, responseFormat)
@@ -1269,6 +1271,7 @@ export class AgentBlockHandler implements BlockHandler {
12691271
content: result.content,
12701272
model: result.model,
12711273
...this.createResponseMetadata(result),
1274+
...(result.interactionId && { interactionId: result.interactionId }),
12721275
}
12731276
}
12741277

apps/sim/executor/handlers/agent/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export interface AgentInputs {
2020
conversationId?: string // Required for all non-none memory types
2121
slidingWindowSize?: string // For message-based sliding window
2222
slidingWindowTokens?: string // For token-based sliding window
23+
// Deep research multi-turn
24+
previousInteractionId?: string // Interactions API previous interaction reference
2325
// LLM parameters
2426
temperature?: string
2527
maxTokens?: string

0 commit comments

Comments
 (0)