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
56 changes: 56 additions & 0 deletions apps/sim/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3687,6 +3687,62 @@ export const SakanaIcon = (props: SVGProps<SVGSVGElement>) => (
</svg>
)

export function MetaIcon(props: SVGProps<SVGSVGElement>) {
const id = useId()
const gradient1Id = `meta_gradient_1_${id}`
const gradient2Id = `meta_gradient_2_${id}`

return (
<svg
{...props}
height='1em'
viewBox='0 0 265 165'
width='1em'
xmlns='http://www.w3.org/2000/svg'
>
<title>Meta</title>
<defs>
<linearGradient
id={gradient1Id}
x1='61'
x2='259'
y1='117'
y2='127'
gradientUnits='userSpaceOnUse'
>
<stop offset='0' stopColor='#0064e1' />
<stop offset='0.4' stopColor='#0064e1' />
<stop offset='0.83' stopColor='#0073ee' />
<stop offset='1' stopColor='#0082fb' />
</linearGradient>
<linearGradient
id={gradient2Id}
x1='45'
x2='45'
y1='139'
y2='66'
gradientUnits='userSpaceOnUse'
>
<stop offset='0' stopColor='#0082fb' />
<stop offset='1' stopColor='#0064e0' />
</linearGradient>
</defs>
<path
d='m31.06,125.96c0,10.98 2.41,19.41 5.56,24.51 4.13,6.68 10.29,9.51 16.57,9.51 8.1,0 15.51-2.01 29.79-21.76 11.44-15.83 24.92-38.05 33.99-51.98l15.36-23.6c10.67-16.39 23.02-34.61 37.18-46.96 11.56-10.08 24.03-15.68 36.58-15.68 21.07,0 41.14,12.21 56.5,35.11 16.81,25.08 24.97,56.67 24.97,89.27 0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75l0-31.02c17.63,0 22.03-16.2 22.03-34.74 0-26.42-6.16-55.74-19.73-76.69-9.63-14.86-22.11-23.94-35.84-23.94-14.85,0-26.8,11.2-40.23,31.17-7.14,10.61-14.47,23.54-22.7,38.13l-9.06,16.05c-18.2,32.27-22.81,39.62-31.91,51.75-15.95,21.24-29.57,29.29-47.5,29.29-21.27,0-34.72-9.21-43.05-23.09-6.8-11.31-10.14-26.15-10.14-43.06z'
fill='#0081fb'
/>
<path
d='m24.49,37.3c14.24-21.95 34.79-37.3 58.36-37.3 13.65,0 27.22,4.04 41.39,15.61 15.5,12.65 32.02,33.48 52.63,67.81l7.39,12.32c17.84,29.72 27.99,45.01 33.93,52.22 7.64,9.26 12.99,12.02 19.94,12.02 17.63,0 22.03-16.2 22.03-34.74l27.4-.86c0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75-12.8,0-24.14-2.78-36.68-14.61-9.64-9.08-20.91-25.21-29.58-39.71l-25.79-43.08c-12.94-21.62-24.81-37.74-31.68-45.04-7.39-7.85-16.89-17.33-32.05-17.33-12.27,0-22.69,8.61-31.41,21.78z'
fill={`url(#${gradient1Id})`}
/>
<path
d='m82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78-12.33,18.61-19.88,46.33-19.88,72.95 0,10.98 2.41,19.41 5.56,24.51l-26.48,17.44c-6.8-11.31-10.14-26.15-10.14-43.06 0-30.75 8.44-62.8 24.49-87.55 14.24-21.95 34.79-37.3 58.36-37.3z'
fill={`url(#${gradient2Id})`}
/>
</svg>
)
}

export function GeminiIcon(props: SVGProps<SVGSVGElement>) {
const id = useId()
const gradientId = `gemini_gradient_${id}`
Expand Down
5 changes: 5 additions & 0 deletions apps/sim/lib/tokenization/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export const TOKENIZATION_CONFIG = {
confidence: 'medium',
supportedMethods: ['heuristic', 'fallback'],
},
meta: {
avgCharsPerToken: 4,
confidence: 'medium',
supportedMethods: ['heuristic', 'fallback'],
},
ollama: {
avgCharsPerToken: 4,
confidence: 'low',
Expand Down
11 changes: 10 additions & 1 deletion apps/sim/providers/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export type AttachmentProvider =
| 'deepseek'
| 'cerebras'
| 'sakana'
| 'meta'

export interface PreparedProviderAttachment {
file: UserFile
Expand Down Expand Up @@ -119,7 +120,12 @@ const BEDROCK_DOCUMENT_FORMATS = new Set([
const BEDROCK_IMAGE_FORMATS = new Set(['png', 'jpeg', 'jpg', 'gif', 'webp'])
const BEDROCK_VIDEO_FORMATS = new Set(['mp4', 'mov', 'mkv', 'webm'])

const UNSUPPORTED_FILE_PROVIDERS = new Set<AttachmentProvider>(['deepseek', 'cerebras', 'sakana'])
const UNSUPPORTED_FILE_PROVIDERS = new Set<AttachmentProvider>([
'deepseek',
'cerebras',
'sakana',
'meta',
])

const PROVIDER_SUPPORTED_LABELS: Record<AttachmentProvider, string> = {
openai: 'images and documents through the Responses API input_image/input_file parts',
Expand All @@ -139,6 +145,7 @@ const PROVIDER_SUPPORTED_LABELS: Record<AttachmentProvider, string> = {
deepseek: 'no file attachments in the current API adapter',
cerebras: 'no file attachments in the current API adapter',
sakana: 'no file attachments in the current API adapter',
meta: 'no file attachments in the current API adapter',
}

export function getAttachmentProvider(providerId: ProviderId | string): AttachmentProvider | null {
Expand All @@ -159,6 +166,7 @@ export function getAttachmentProvider(providerId: ProviderId | string): Attachme
if (providerId === 'deepseek') return 'deepseek'
if (providerId === 'cerebras') return 'cerebras'
if (providerId === 'sakana') return 'sakana'
if (providerId === 'meta') return 'meta'
return null
}

Expand Down Expand Up @@ -307,6 +315,7 @@ function isMimeTypeSupportedByProvider(
case 'deepseek':
case 'cerebras':
case 'sakana':
case 'meta':
return false
default: {
const _exhaustive: never = provider
Expand Down
Loading
Loading