Skip to content

Commit b10b246

Browse files
waleedlatif1waleed
authored andcommitted
feat(mistal): added mistral as a provider, updated model prices (#1607)
* feat(mistal): added mistral as a provider, updated model prices * remove the ability for a block to reference its own outluts * fixed order of responses for guardrails block
1 parent 34fc8f8 commit b10b246

File tree

9 files changed

+902
-50
lines changed

9 files changed

+902
-50
lines changed

apps/sim/blocks/blocks/guardrails.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -337,21 +337,21 @@ export const GuardrailsBlock: BlockConfig<GuardrailsResponse> = {
337337
},
338338
},
339339
outputs: {
340-
passed: {
341-
type: 'boolean',
342-
description: 'Whether validation passed (true/false)',
343-
},
344-
validationType: {
345-
type: 'string',
346-
description: 'Type of validation performed',
347-
},
348340
input: {
349341
type: 'string',
350342
description: 'Original input that was validated',
351343
},
352-
error: {
344+
maskedText: {
353345
type: 'string',
354-
description: 'Error message if validation failed',
346+
description: 'Text with PII masked (only for PII detection in mask mode)',
347+
},
348+
validationType: {
349+
type: 'string',
350+
description: 'Type of validation performed',
351+
},
352+
passed: {
353+
type: 'boolean',
354+
description: 'Whether validation passed (true/false)',
355355
},
356356
score: {
357357
type: 'number',
@@ -366,9 +366,9 @@ export const GuardrailsBlock: BlockConfig<GuardrailsResponse> = {
366366
type: 'array',
367367
description: 'Detected PII entities (only for PII detection)',
368368
},
369-
maskedText: {
369+
error: {
370370
type: 'string',
371-
description: 'Text with PII masked (only for PII detection in mask mode)',
371+
description: 'Error message if validation failed',
372372
},
373373
},
374374
}

apps/sim/components/ui/tag-dropdown.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,9 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
662662
const accessibleBlock = blocks[accessibleBlockId]
663663
if (!accessibleBlock) continue
664664

665+
// Skip the current block - blocks cannot reference their own outputs
666+
if (accessibleBlockId === blockId) continue
667+
665668
const blockConfig = getBlock(accessibleBlock.type)
666669

667670
if (!blockConfig) {

apps/sim/lib/copilot/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const VALID_PROVIDER_IDS: readonly ProviderId[] = [
1616
'deepseek',
1717
'xai',
1818
'cerebras',
19+
'mistral',
1920
'groq',
2021
'ollama',
2122
] as const

apps/sim/lib/tokenization/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ export const TOKENIZATION_CONFIG = {
4141
confidence: 'medium',
4242
supportedMethods: ['heuristic', 'fallback'],
4343
},
44+
mistral: {
45+
avgCharsPerToken: 4,
46+
confidence: 'medium',
47+
supportedMethods: ['heuristic', 'fallback'],
48+
},
4449
groq: {
4550
avgCharsPerToken: 4,
4651
confidence: 'medium',

0 commit comments

Comments
 (0)