diff --git a/apps/docs/content/docs/platform/costs.mdx b/apps/docs/content/docs/platform/costs.mdx index 5b6141895d1..a93302e539d 100644 --- a/apps/docs/content/docs/platform/costs.mdx +++ b/apps/docs/content/docs/platform/costs.mdx @@ -132,6 +132,8 @@ The settings page groups keys into **Models**, **Search & web**, and **Enrichmen | Ollama Cloud | Model calls | | Kie | Model calls | | Thinking Machines | Model calls | + | MiniMax | Model calls | + | Alibaba Cloud | Model calls (Qwen) | | Fal.ai | Image and video generation | diff --git a/apps/docs/content/docs/workflows/blocks/agent.mdx b/apps/docs/content/docs/workflows/blocks/agent.mdx index 028c1887507..7cb3fca97d3 100644 --- a/apps/docs/content/docs/workflows/blocks/agent.mdx +++ b/apps/docs/content/docs/workflows/blocks/agent.mdx @@ -52,6 +52,18 @@ Select a model beginning with `thinkingmachines/` to run Inkling, Inkling-Small, Bring your own Thinking Machines Tinker API key. On Sim Cloud, a workspace admin can add it under **Workspace settings → BYOK → Thinking Machines**. On self-hosted Sim, provide the key in the Agent block's **API Key** field, using a [secret reference](/platform/credentials). Tinker's serverless inference is in beta: file attachments are not sent, tools run with automatic tool choice only, and structured outputs are requested through the prompt. +#### MiniMax + +Select `minimax/minimax-m3.1-flash` or `minimax/minimax-m3` to run MiniMax's M-series models through MiniMax's OpenAI-compatible API. Both models accept image attachments and think before answering. MiniMax returns the thinking separately, so it never appears in the block's answer. On MiniMax M3.1 Flash, **Reasoning Effort** sets the thinking depth from `low` to `max`, MiniMax's default. Thinking tokens count toward **Max Tokens**, so a small limit can use up the budget before the model writes an answer, leaving it empty. + +Bring your own MiniMax API key from the international platform (platform.minimax.io). On Sim Cloud, a workspace admin can add it under **Workspace settings → BYOK → MiniMax**. On self-hosted Sim, provide the key in the Agent block's **API Key** field, using a [secret reference](/platform/credentials). MiniMax ignores temperature, tools run with automatic tool choice only, and structured outputs are requested through the prompt. + +#### Alibaba Cloud (Qwen) + +Select `qwen4-max`, `qwen3.7-plus`, `qwen3.8-flash`, or the open-weight `qwen3.8-27b` to run Qwen through Alibaba Cloud Model Studio. Thinking is on by default: set **Reasoning Effort** to `none` (or **Thinking Level** to `none` on `qwen3.7-plus`) to turn it off. Model Studio runs `qwen3.8-27b` with thinking only when the response streams, so Sim turns its thinking off for every call that doesn't stream: requests without streaming, and every model call of a request that uses tools. + +Bring your own Model Studio API key from the Singapore (International) region; keys from other regions don't work with this endpoint. On Sim Cloud, a workspace admin can add it under **Workspace settings → BYOK → Alibaba Cloud**. On self-hosted Sim, provide the key in the Agent block's **API Key** field, using a [secret reference](/platform/credentials). Forcing a tool turns thinking off for that request, because Qwen can't force a tool while thinking. Structured outputs are requested through the prompt. Images are sent to multimodal models. + #### Jev evaluation models Select `jev-latest` from TypeSafe in the Agent model selector. Hosted Sim supplies a key and bills model usage through the normal credit system; workspace or organization BYOK keys override the hosted key without model charges. Self-hosted users enter their TypeSafe key in the block. Use `jev-1.13.0` to pin a version or `jev-preview` to follow preview releases. These models use **State** and **Questions** in place of conversational messages. State accepts text or a reference to a JSON object or array. Questions is a JSON object keyed by the answer names you want: @@ -188,6 +200,8 @@ Live tool-call chips stream for **OpenAI, Anthropic, Azure Anthropic, Google, Ve | Provider | Streamed thinking | Models | |----------|-------------------|--------| +| MiniMax | Full thinking deltas | `minimax/minimax-m3.1-flash` | +| Alibaba Cloud | Full thinking deltas | `qwen4-max`, `qwen3.7-plus`, `qwen3.8-flash`, `qwen3.8-27b` | | OpenAI | Summaries only — Requires OpenAI organization verification; falls back to no summaries. | `gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6-astra`, `gpt-6.1-sol`, `gpt-6.1-terra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-5.5-pro`, `gpt-5.5`, `gpt-5.4-pro`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.3-codex`, `gpt-5.2-pro`, `gpt-5.2`, `gpt-5.1`, `gpt-5-pro`, `gpt-5`, `gpt-5-mini`, `gpt-5-nano`, `o3` | | Anthropic | Summaries only — These generations omit full thinking; Sim requests summarized thinking on streaming runs. | `claude-fable-5-2`, `claude-fable-5-1`, `claude-fable-5`, `claude-sonnet-5-5`, `claude-sonnet-5`, `claude-opus-5-5`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-opus-4-5`, `claude-haiku-5-5`, `claude-haiku-4-5` | | Azure OpenAI | Summaries only — Requires OpenAI organization verification; falls back to no summaries. | `azure/gpt-6.1-sol`, `azure/gpt-6.1-terra`, `azure/gpt-6-sol`, `azure/gpt-6-luna`, `azure/gpt-6-astra`, `azure/gpt-5.6-sol`, `azure/gpt-5.6-terra`, `azure/gpt-5.6-luna`, `azure/gpt-5.5`, `azure/gpt-5.4-pro`, `azure/gpt-5.4`, `azure/gpt-5.4-mini`, `azure/gpt-5.4-nano`, `azure/gpt-5.2`, `azure/gpt-5.1`, `azure/gpt-5.1-codex`, `azure/gpt-5`, `azure/gpt-5-mini`, `azure/gpt-5-nano` | @@ -200,7 +214,7 @@ Live tool-call chips stream for **OpenAI, Anthropic, Azure Anthropic, Google, Ve | Cerebras | Full thinking deltas | `cerebras/qwen-3.8-27b` | | Groq | Full thinking deltas | `groq/openai/gpt-oss-120b`, `groq/openai/gpt-oss-20b`, `groq/openai/gpt-oss-safeguard-20b`, `groq/qwen/qwen3.8-27b` | | Meta | Not streamed | `muse-spark-1.3`, `muse-spark-1.1` | -| Kimi | Full thinking deltas | `kimi-k3`, `kimi-k2.6` | +| Kimi | Full thinking deltas | `kimi-k3.1-pro`, `kimi-k3`, `kimi-k2.6` | | Kie | Summaries only | `kie/claude-sonnet-5-5`, `kie/claude-opus-5-5`, `kie/claude-opus-5`, `kie/claude-fable-5`, `kie/claude-sonnet-5`, `kie/claude-opus-4-8`, `kie/claude-opus-4-7`, `kie/claude-opus-4-6`, `kie/claude-sonnet-4-6`, `kie/claude-opus-4-5`, `kie/claude-sonnet-4-5`, `kie/claude-haiku-4-5`, `kie/gpt-6-1-sol`, `kie/gpt-6-astra`, `kie/gpt-6-sol`, `kie/gpt-6-luna`, `kie/gpt-5-6-sol`, `kie/gpt-5-6-terra`, `kie/gpt-5-6-luna`, `kie/gpt-5-5`, `kie/grok-4-6`, `kie/grok-4-5`, `kie/grok-4-3`, `kie/kimi-k3` | | Z.ai | Full thinking deltas | `glm-5.3`, `glm-5.3-flashx`, `glm-5.3-flash`, `glm-5.2`, `glm-5.1`, `glm-5`, `glm-5-turbo`, `glm-4.7`, `glm-4.6`, `glm-4.5`, `glm-4.5-air` | diff --git a/apps/sim/app/(landing)/models/utils.ts b/apps/sim/app/(landing)/models/utils.ts index 9a31890fe9b..f6fdf04edc1 100644 --- a/apps/sim/app/(landing)/models/utils.ts +++ b/apps/sim/app/(landing)/models/utils.ts @@ -26,6 +26,7 @@ const PROVIDER_PREFIXES: Record = { * ("Anthropic (Claude) API Pricing & Models"). Providers left out use their own name for both. */ const PROVIDER_MODEL_FAMILIES: Record = { + alibaba: { family: 'Qwen' }, anthropic: { family: 'Claude' }, 'azure-anthropic': { family: 'Claude' }, google: { family: 'Gemini', apiName: 'Google Gemini' }, @@ -57,6 +58,7 @@ const TOKEN_REPLACEMENTS: Record = { qwen: 'Qwen', glm: 'GLM', kimi: 'Kimi', + minimax: 'MiniMax', nova: 'Nova', llama: 'Llama', meta: 'Meta', diff --git a/apps/sim/app/api/providers/baseten/models/route.test.ts b/apps/sim/app/api/providers/baseten/models/route.test.ts index f0281e2f13b..5a534d7561e 100644 --- a/apps/sim/app/api/providers/baseten/models/route.test.ts +++ b/apps/sim/app/api/providers/baseten/models/route.test.ts @@ -1,6 +1,7 @@ import { authMockFns, createMockRequest, resetEnvMock, setEnv } from '@sim/testing' import { jsonResponse } from '@sim/testing/helpers/http' import { apiKeyByokMock, apiKeyByokMockFns } from '@sim/testing/mocks/api-key-byok.mock' +import { resetEnvFlagsMock, setEnvFlags } from '@sim/testing/mocks/env-flags.mock' import { providersUtilsMock, providersUtilsMockFns } from '@sim/testing/mocks/providers-utils.mock' import { workspaceAuthzMock, workspaceAuthzMockFns } from '@sim/testing/mocks/workspace-authz.mock' import { workspaceContextMock } from '@sim/testing/mocks/workspace-context.mock' @@ -15,6 +16,9 @@ vi.mock('@sim/platform-authz/workspace', () => workspaceAuthzMock) vi.mock('@/lib/workspaces/application/context', () => workspaceContextMock) import { GET } from '@/app/api/providers/baseten/models/route' +import { getStaticProviderModels } from '@/providers/models' + +const STATIC_MODELS = getStaticProviderModels('baseten').map((model) => model.id) const mockGetSession = authMockFns.mockGetSession const mockGetBYOKKey = apiKeyByokMockFns.mockGetBYOKKey @@ -42,11 +46,13 @@ describe('GET /api/providers/baseten/models', () => { mockGetBYOKKey.mockResolvedValue(null) mockGetSession.mockResolvedValue(null) mockResolveEffectiveWorkspacePermission.mockResolvedValue(null) + setEnvFlags({ isHosted: false }) setEnvKey(undefined) }) afterAll(() => { resetEnvMock() + resetEnvFlagsMock() }) it('uses the BYOK key when workspaceId, session, and permission are present', async () => { @@ -57,11 +63,12 @@ describe('GET /api/providers/baseten/models', () => { mockFetch.mockResolvedValueOnce(jsonResponse({ data: [{ id: 'model-a' }] })) const res = await GET( - createMockRequest('GET', undefined, {}, 'http://localhost:3000/api/test?workspaceId=ws-1') + createMockRequest('GET', undefined, {}, 'http://localhost:3000/api/test?workspaceId=ws-1'), + { params: Promise.resolve({}) } ) expect(res.status).toBe(200) - expect(await res.json()).toEqual({ models: ['baseten/model-a'] }) + expect(await res.json()).toEqual({ models: [...STATIC_MODELS, 'baseten/model-a'] }) expect(mockGetBYOKKey).toHaveBeenCalledWith('ws-1', 'baseten') expect(authHeaderFromLastFetch(mockFetch)).toBe('Bearer byok-key') @@ -74,12 +81,30 @@ describe('GET /api/providers/baseten/models', () => { mockFetch.mockResolvedValueOnce(jsonResponse({ data: [{ id: 'model-a' }] })) const res = await GET( - createMockRequest('GET', undefined, {}, 'http://localhost:3000/api/test?workspaceId=ws-1') + createMockRequest('GET', undefined, {}, 'http://localhost:3000/api/test?workspaceId=ws-1'), + { params: Promise.resolve({}) } ) expect(res.status).toBe(200) - expect(await res.json()).toEqual({ models: ['baseten/model-a'] }) + expect(await res.json()).toEqual({ models: [...STATIC_MODELS, 'baseten/model-a'] }) expect(mockGetBYOKKey).not.toHaveBeenCalled() expect(authHeaderFromLastFetch(mockFetch)).toBe('Bearer env-key') }) + + it("never lists the catalog with Sim's env key on hosted", async () => { + setEnvFlags({ isHosted: true }) + setEnvKey('env-key') + mockGetSession.mockResolvedValue({ user: { id: 'user-1' }, session: { id: 'session-1' } }) + mockResolveEffectiveWorkspacePermission.mockResolvedValue(null) + mockFetch.mockResolvedValueOnce(jsonResponse({ data: [{ id: 'model-a' }] })) + + const res = await GET( + createMockRequest('GET', undefined, {}, 'http://localhost:3000/api/test?workspaceId=ws-1'), + { params: Promise.resolve({}) } + ) + + expect(res.status).toBe(200) + expect(await res.json()).toEqual({ models: STATIC_MODELS }) + expect(mockFetch).not.toHaveBeenCalled() + }) }) diff --git a/apps/sim/app/api/providers/together/models/route.test.ts b/apps/sim/app/api/providers/together/models/route.test.ts index 6d3b75dbed4..4218e590781 100644 --- a/apps/sim/app/api/providers/together/models/route.test.ts +++ b/apps/sim/app/api/providers/together/models/route.test.ts @@ -1,6 +1,7 @@ import { authMockFns, createMockRequest, resetEnvMock, setEnv } from '@sim/testing' import { jsonResponse } from '@sim/testing/helpers/http' import { apiKeyByokMock, apiKeyByokMockFns } from '@sim/testing/mocks/api-key-byok.mock' +import { resetEnvFlagsMock, setEnvFlags } from '@sim/testing/mocks/env-flags.mock' import { providersUtilsMock, providersUtilsMockFns } from '@sim/testing/mocks/providers-utils.mock' import { workspaceAuthzMock, workspaceAuthzMockFns } from '@sim/testing/mocks/workspace-authz.mock' import { workspaceContextMock } from '@sim/testing/mocks/workspace-context.mock' @@ -19,6 +20,9 @@ vi.mock('@sim/platform-authz/workspace', () => workspaceAuthzMock) vi.mock('@/lib/workspaces/application/context', () => workspaceContextMock) import { GET } from '@/app/api/providers/together/models/route' +import { getStaticProviderModels } from '@/providers/models' + +const STATIC_MODELS = getStaticProviderModels('together').map((model) => model.id) const mockGetSession = authMockFns.mockGetSession const mockGetBYOKKey = apiKeyByokMockFns.mockGetBYOKKey @@ -53,10 +57,12 @@ describe('GET /api/providers/together/models', () => { mockGetBYOKKey.mockResolvedValue(null) mockGetSession.mockResolvedValue(null) mockResolveEffectiveWorkspacePermission.mockResolvedValue(null) + setEnvFlags({ isHosted: false }) }) afterAll(() => { resetEnvMock() + resetEnvFlagsMock() }) it('uses the BYOK key when a workspace, session, and permission are present', async () => { @@ -66,10 +72,12 @@ describe('GET /api/providers/together/models', () => { mockGetBYOKKey.mockResolvedValue({ apiKey: 'byok-together-key' }) mockFetch.mockResolvedValue(jsonResponse([{ id: 'moonshotai/Kimi-K2-Instruct' }])) - const res = await GET(requestWithWorkspace('ws-1')) + const res = await GET(requestWithWorkspace('ws-1'), { params: Promise.resolve({}) }) expect(res.status).toBe(200) - expect(await res.json()).toEqual({ models: ['together/moonshotai/Kimi-K2-Instruct'] }) + expect(await res.json()).toEqual({ + models: [...STATIC_MODELS, 'together/moonshotai/Kimi-K2-Instruct'], + }) expect(mockGetBYOKKey).toHaveBeenCalledWith('ws-1', 'together') expect(fetchAuthHeader()).toBe('Bearer byok-together-key') @@ -81,11 +89,36 @@ describe('GET /api/providers/together/models', () => { mockResolveEffectiveWorkspacePermission.mockResolvedValue(null) mockFetch.mockResolvedValue(jsonResponse([{ id: 'moonshotai/Kimi-K2-Instruct' }])) - const res = await GET(requestWithWorkspace('ws-1')) + const res = await GET(requestWithWorkspace('ws-1'), { params: Promise.resolve({}) }) expect(res.status).toBe(200) - expect(await res.json()).toEqual({ models: ['together/moonshotai/Kimi-K2-Instruct'] }) + expect(await res.json()).toEqual({ + models: [...STATIC_MODELS, 'together/moonshotai/Kimi-K2-Instruct'], + }) expect(mockGetBYOKKey).not.toHaveBeenCalled() expect(fetchAuthHeader()).toBe('Bearer env-together-key') }) + + it("never lists the catalog with Sim's env key on hosted", async () => { + setEnvFlags({ isHosted: true }) + setEnv({ TOGETHER_API_KEY: 'env-together-key' }) + mockGetSession.mockResolvedValue({ user: { id: 'user-1' }, session: { id: 'session-1' } }) + mockResolveEffectiveWorkspacePermission.mockResolvedValue(null) + mockFetch.mockResolvedValue(jsonResponse([{ id: 'moonshotai/Kimi-K2-Instruct' }])) + + const res = await GET(requestWithWorkspace('ws-1'), { params: Promise.resolve({}) }) + + expect(res.status).toBe(200) + expect(await res.json()).toEqual({ models: STATIC_MODELS }) + expect(mockFetch).not.toHaveBeenCalled() + }) + + it('lists a discovered model the static catalog covers once, under its catalog id', async () => { + setEnv({ TOGETHER_API_KEY: 'env-together-key' }) + mockFetch.mockResolvedValue(jsonResponse([{ id: 'zai-org/glm-5.3' }])) + + const res = await GET(requestWithWorkspace(), { params: Promise.resolve({}) }) + + expect(await res.json()).toEqual({ models: STATIC_MODELS }) + }) }) diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok.tsx index c3ea986599f..49f5b766af8 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok.tsx @@ -46,7 +46,9 @@ import { ZaiIcon, ZeroBounceIcon, } from '@/components/icons' +import { MiniMaxIcon } from '@/components/icons/minimax' import { NebiusIcon } from '@/components/icons/nebius' +import { QwenIcon } from '@/components/icons/qwen' import { ThinkingMachinesIcon } from '@/components/icons/thinking-machines' import { canMutateWorkspaceSettingsSection } from '@/components/settings/navigation' import { type BYOKProviderId, MAX_BYOK_KEYS_PER_PROVIDER } from '@/lib/api/contracts/byok-keys' @@ -190,6 +192,20 @@ const PROVIDERS: (BYOKManagerProvider & { id: BYOKProviderId })[] = [ description: 'LLM calls', placeholder: 'Enter your Thinking Machines Tinker API key', }, + { + id: 'minimax', + name: 'MiniMax', + icon: MiniMaxIcon, + description: 'LLM calls', + placeholder: 'Enter your MiniMax API key', + }, + { + id: 'alibaba', + name: 'Alibaba Cloud', + icon: QwenIcon, + description: 'LLM calls', + placeholder: 'Enter your Model Studio (Singapore) API key', + }, { id: 'falai', name: 'Fal.ai', @@ -392,6 +408,8 @@ const PROVIDER_SECTIONS: BYOKProviderSection[] = [ 'ollama-cloud', 'kie', 'thinkingmachines', + 'minimax', + 'alibaba', 'falai', ], }, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx index 9e8b224df55..23537e1abe7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx @@ -1,5 +1,5 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { Combobox, type ComboboxOption, cn } from '@sim/emcn' +import { Combobox, type ComboboxOption, cn, OptionDetail } from '@sim/emcn' import { Plus } from '@sim/emcn/icons' import { useReactFlow } from '@xyflow/react' import { useDeploymentShape } from '@/lib/core/config/deployment-shape' @@ -9,6 +9,7 @@ import { getDependsOnFields } from '@/lib/workflows/subblocks/dependencies' import { SandboxCreateModal } from '@/app/workspace/[workspaceId]/settings/components/sandboxes/components/sandbox-create-modal' import type { SandboxLanguage } from '@/app/workspace/[workspaceId]/settings/components/sandboxes/utils' import { shouldClearMissingOption } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/missing-option' +import { resolveTypedOptionValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { SubBlockInputController } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sub-block-input-controller' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' @@ -21,6 +22,7 @@ import { getModelFieldDefaults, offersAutoModel } from '@/blocks/utils' import { useDebounce } from '@/hooks/use-debounce' import { usePermissionConfig } from '@/hooks/use-permission-config' import { DEFAULT_BLOCK_MODEL } from '@/providers/default-model' +import { clusterOpenModelHosts } from '@/providers/open-models' import { useWorkflowRegistry } from '@/stores/workflows/registry/store' import { useSubBlockStore } from '@/stores/workflows/subblock/store' @@ -57,6 +59,12 @@ type ComboBoxOption = icon?: React.ComponentType<{ className?: string }> /** Left out of the list but still resolves a stored value to its label. */ hidden?: boolean + /** Shown in place of `label`, which stays the option's published name. */ + displayLabel?: string + /** Muted secondary text after the label, such as the host serving a model. */ + detail?: string + /** Extra terms the search matches. */ + searchTerms?: readonly string[] } /** @@ -149,7 +157,9 @@ export const ComboBox = memo(function ComboBox({ : (options ?? EMPTY_OPTIONS) if (subBlockId === 'model' && !config.mediaModelOptions) { - return opts.filter((opt) => isModelUsable(typeof opt === 'string' ? opt : opt.id)) + return clusterOpenModelHosts( + opts.filter((opt) => isModelUsable(typeof opt === 'string' ? opt : opt.id)) + ) } return opts @@ -293,7 +303,14 @@ export const ComboBox = memo(function ComboBox({ if (typeof option === 'string') { return { label: option, value: option } } - return { label: option.label, value: option.id, icon: option.icon, hidden: option.hidden } + return { + label: option.displayLabel ?? option.label, + value: option.id, + icon: option.icon, + hidden: option.hidden, + detail: option.detail, + searchTerms: option.searchTerms, + } }) return createOption ? [createOption, ...mapped] : mapped }, [evaluatedOptions, createOption]) @@ -370,7 +387,7 @@ export const ComboBox = memo(function ComboBox({ ) if (!match) return raw - return typeof match === 'string' ? match : match.label + return typeof match === 'string' ? match : (match.displayLabel ?? match.label) }, [value, evaluatedOptions]) const [inputValue, setInputValue] = useState(displayValue) @@ -468,6 +485,7 @@ export const ComboBox = memo(function ComboBox({ }, [comboboxOptions, value]) const selectedOptionIcon = selectedOption?.icon + const selectedOptionDetail = selectedOption?.detail /** * Overlay content for the editable combobox @@ -492,9 +510,21 @@ export const ComboBox = memo(function ComboBox({ workflowSearchHighlight, })} + {selectedOptionDetail && displayLabel === selectedOption?.label && ( + + )} ) - }, [activeSearchTarget, blockId, inputValue, accessiblePrefixes, selectedOptionIcon, subBlockId]) + }, [ + activeSearchTarget, + blockId, + inputValue, + accessiblePrefixes, + selectedOptionIcon, + selectedOptionDetail, + selectedOption?.label, + subBlockId, + ]) const ctrlOnChangeRef = useRef< ((e: React.ChangeEvent) => void) | null @@ -548,24 +578,11 @@ export const ComboBox = memo(function ComboBox({ return } - const matchedOption = evaluatedOptions.find((option) => { - if (typeof option === 'string') { - return option === newValue - } - return option.id === newValue - }) - - // If a matching option is found, store its ID; otherwise store the raw value - // (allows expressions like to be entered directly) - const nextValue = matchedOption - ? typeof matchedOption === 'string' - ? matchedOption - : matchedOption.id - : newValue + const nextValue = resolveTypedOptionValue(newValue, evaluatedOptions, value) userClearedDefaultRef.current = nextValue === '' ? (defaultOptionValue ?? null) : null setStoreValue(nextValue) }, - [isPreview, evaluatedOptions, setStoreValue, defaultOptionValue] + [isPreview, evaluatedOptions, value, setStoreValue, defaultOptionValue] ) return ( diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value.test.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value.test.ts new file mode 100644 index 00000000000..3b2a1a96f79 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value.test.ts @@ -0,0 +1,35 @@ +import { describe, expect, it } from 'vitest' +import { resolveTypedOptionValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value' + +const GLM_HOSTS = [ + { id: 'glm-5.3', displayLabel: 'GLM 5.3' }, + { id: 'nebius/zai-org/glm-5.3', displayLabel: 'GLM 5.3' }, + { id: 'fireworks/glm-5.3', displayLabel: 'GLM 5.3' }, + { id: 'gpt-4o' }, +] + +describe('resolveTypedOptionValue', () => { + it('stores the selected host when the input still shows its readable name', () => { + expect(resolveTypedOptionValue('GLM 5.3', GLM_HOSTS, 'fireworks/glm-5.3')).toBe( + 'fireworks/glm-5.3' + ) + }) + + it('stores the first host for a readable name typed over another selection', () => { + expect(resolveTypedOptionValue('GLM 5.3', GLM_HOSTS, 'gpt-4o')).toBe('glm-5.3') + expect(resolveTypedOptionValue('GLM 5.3', GLM_HOSTS, 'GLM 5.')).toBe('glm-5.3') + }) + + it('stores ids, custom ids and references exactly as typed', () => { + expect(resolveTypedOptionValue('gpt-4o', GLM_HOSTS, 'glm-5.3')).toBe('gpt-4o') + expect( + resolveTypedOptionValue( + 'arn:aws:bedrock:us-east-1:123456789012:inference-profile/custom', + GLM_HOSTS, + 'glm-5.3' + ) + ).toBe('arn:aws:bedrock:us-east-1:123456789012:inference-profile/custom') + expect(resolveTypedOptionValue('llama3.1:8b', GLM_HOSTS, undefined)).toBe('llama3.1:8b') + expect(resolveTypedOptionValue('', GLM_HOSTS, undefined)).toBe('') + }) +}) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value.ts new file mode 100644 index 00000000000..88a76fa3cc2 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/typed-value.ts @@ -0,0 +1,25 @@ +type TypedValueOption = string | { id: string; displayLabel?: string } + +/** + * The value an editable combobox stores for the text in its input. Text naming an option's id + * stores that id. Text naming a picker-only `displayLabel`, which every host of an open model + * shares, stores the current selection when it carries that label and otherwise the first + * option that does, so a readable name never persists as a value. Any other text is stored as + * typed: a reference, a custom model id, a fine-tune, an Ollama tag. + */ +export function resolveTypedOptionValue( + text: string, + options: readonly TypedValueOption[], + currentValue: unknown +): string { + const labelled: string[] = [] + for (const option of options) { + if (typeof option === 'string') { + if (option === text) return option + continue + } + if (option.id === text) return option.id + if (option.displayLabel === text) labelled.push(option.id) + } + return labelled.find((id) => id === currentValue) ?? labelled[0] ?? text +} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list/model-fallback-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list/model-fallback-list.tsx index bf4b66f65db..cb6d58ade1e 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list/model-fallback-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list/model-fallback-list.tsx @@ -30,6 +30,7 @@ import { getModelOptions } from '@/blocks/utils' import { usePersonalEnvironment, useWorkspaceEnvironment } from '@/hooks/queries/environment' import { usePermissionConfig } from '@/hooks/use-permission-config' import { useSettingsNavigation } from '@/hooks/use-settings-navigation' +import { clusterOpenModelHosts } from '@/providers/open-models' import { useProvidersStore } from '@/stores/providers/store' const CREATE_SECRET_VALUE = 'action-create-secret' @@ -57,6 +58,8 @@ interface ViableModelOption { label: string value: string icon?: React.ComponentType<{ className?: string }> + detail?: string + searchTerms?: readonly string[] } interface FallbackRowProps { @@ -302,15 +305,17 @@ export function ModelFallbackList({ */ const viableOptions = useMemo( (): ViableModelOption[] => - getModelOptions() - .filter( + clusterOpenModelHosts( + getModelOptions().filter( (option) => isModelUsable(option.id) && isViableFallbackModel(option.id, primaryModel) ) - .map((option) => ({ - label: option.label, - value: option.id, - ...(option.icon ? { icon: option.icon } : {}), - })), + ).map((option) => ({ + label: option.displayLabel ?? option.label, + value: option.id, + ...(option.icon ? { icon: option.icon } : {}), + ...(option.detail ? { detail: option.detail } : {}), + ...(option.searchTerms ? { searchTerms: option.searchTerms } : {}), + })), [primaryModel, isModelUsable, providers, deploymentShape] ) diff --git a/apps/sim/blocks/types.ts b/apps/sim/blocks/types.ts index 54efa034522..35c3b9f1d9d 100644 --- a/apps/sim/blocks/types.ts +++ b/apps/sim/blocks/types.ts @@ -370,6 +370,15 @@ export interface SubBlockConfig { reactiveCondition?: SubBlockConfig['reactiveCondition'] defaultChecked?: boolean description?: string + /** + * Picker-only text shown in place of `label`. `label` stays the option's published + * name (block catalog, Copilot); a model option keeps its exact id there. + */ + displayLabel?: string + /** Muted secondary text after the label in a picker, such as the host serving a model. */ + detail?: string + /** Extra terms a picker's search matches. Never rendered. */ + searchTerms?: readonly string[] }[] /** * Options DERIVED from the block's own values — no I/O. Receives the block's current @@ -389,6 +398,15 @@ export interface SubBlockConfig { reactiveCondition?: SubBlockConfig['reactiveCondition'] defaultChecked?: boolean description?: string + /** + * Picker-only text shown in place of `label`. `label` stays the option's published + * name (block catalog, Copilot); a model option keeps its exact id there. + */ + displayLabel?: string + /** Muted secondary text after the label in a picker, such as the host serving a model. */ + detail?: string + /** Extra terms a picker's search matches. Never rendered. */ + searchTerms?: readonly string[] }[]) min?: number max?: number diff --git a/apps/sim/blocks/utils.test.ts b/apps/sim/blocks/utils.test.ts index 4d7c64843a5..727e322a25f 100644 --- a/apps/sim/blocks/utils.test.ts +++ b/apps/sim/blocks/utils.test.ts @@ -371,6 +371,30 @@ describe('model options', () => { expect(ids(getModelOptionsWithAuto())).toEqual(['gpt-4o']) expect(ids(getAgentModelOptions())).toEqual(['gpt-4o']) }) + + it('keeps the published order and ids, adding picker-only text to open-model hosts', () => { + mockProviders.value = { + ...mockProviders.value, + base: { models: ['nebius/moonshotai/kimi-k3', 'gpt-4o', 'kimi-k3'], isLoading: false }, + fireworks: { models: ['fireworks/kimi-k3'], isLoading: false }, + } + + const options = getModelOptions() + + expect(ids(options)).toEqual([ + 'nebius/moonshotai/kimi-k3', + 'gpt-4o', + 'kimi-k3', + 'fireworks/kimi-k3', + ]) + expect(options.every((option) => option.label === option.id)).toBe(true) + expect(options.map(({ displayLabel, detail }) => [displayLabel, detail])).toEqual([ + ['Kimi K3', 'via Nebius'], + [undefined, undefined], + ['Kimi K3', 'Moonshot'], + ['Kimi K3', 'via Fireworks'], + ]) + }) }) describe('getModelFieldDefaults', () => { diff --git a/apps/sim/blocks/utils.ts b/apps/sim/blocks/utils.ts index 32a2f8a4512..44b43b901e4 100644 --- a/apps/sim/blocks/utils.ts +++ b/apps/sim/blocks/utils.ts @@ -1,3 +1,4 @@ +import type { ComponentType } from 'react' import { toError } from '@sim/utils/errors' import { SimAutoIcon } from '@/components/icons' import { getDeploymentShape } from '@/lib/core/config/deployment-shape' @@ -28,6 +29,7 @@ import { orderModelIdsByReleaseDate, SIM_AUTO_MODEL_ID, } from '@/providers/models' +import { getOpenModelPresentation } from '@/providers/open-models' import { isPiSupportedModel } from '@/providers/pi-providers' import { ToolCallParamsError } from '@/providers/tool-params-error' import type { ProviderId } from '@/providers/types' @@ -273,6 +275,22 @@ export const MODEL_OPTION_SOURCES: ReadonlyMap = new [getModelOptionsWithAuto, { auto: true }], ]) +/** + * A model picker option. `label` stays the exact model id, which is what the block catalog + * publishes; an open model that several providers serve adds a readable `displayLabel`, a + * `detail` naming the host, and `searchTerms` for the lab and host, which only pickers read. + * The option order is the published order too, so pickers cluster an open model's hosts + * themselves (`clusterOpenModelHosts`). + */ +interface ModelOption { + label: string + id: string + icon?: ComponentType<{ className?: string }> + displayLabel?: string + detail?: string + searchTerms?: readonly string[] +} + /** Whether a sub-block is a model field whose options offer Auto (Agent, Router, Evaluator). */ export function offersAutoModel(subBlock: Pick): boolean { return ( @@ -326,7 +344,7 @@ function buildModelOptions({ ]) ) - const options = allModels + const options: ModelOption[] = allModels .filter( (model) => getModelSunsetStatus(model) !== 'deprecated' && @@ -334,7 +352,17 @@ function buildModelOptions({ ) .map((model) => { const icon = getProviderIcon(model) - return { label: model, id: model, ...(icon && { icon }) } + const openModel = getOpenModelPresentation(model) + return { + label: model, + id: model, + ...(icon && { icon }), + ...(openModel && { + displayLabel: openModel.name, + detail: openModel.host, + searchTerms: openModel.searchTerms, + }), + } }) // Hosted-only automatic model, and the default for new blocks there, so it diff --git a/apps/sim/components/icons/minimax.tsx b/apps/sim/components/icons/minimax.tsx new file mode 100644 index 00000000000..147bb2f3706 --- /dev/null +++ b/apps/sim/components/icons/minimax.tsx @@ -0,0 +1,11 @@ +import type { SVGProps } from 'react' + +interface MiniMaxIconProps extends SVGProps {} + +export function MiniMaxIcon(props: MiniMaxIconProps) { + return ( + + + + ) +} diff --git a/apps/sim/components/icons/qwen.tsx b/apps/sim/components/icons/qwen.tsx new file mode 100644 index 00000000000..835b19e45e1 --- /dev/null +++ b/apps/sim/components/icons/qwen.tsx @@ -0,0 +1,34 @@ +import { type SVGProps, useId } from 'react' + +interface QwenIconProps extends SVGProps {} + +export function QwenIcon(props: QwenIconProps) { + const gradientId = `qwen_gradient_${useId()}` + + return ( + + + + + + + + + + + + ) +} diff --git a/apps/sim/ee/organization-usage/components/usage-consumers.tsx b/apps/sim/ee/organization-usage/components/usage-consumers.tsx index 129ce5aa90f..7fdcb8b44b6 100644 --- a/apps/sim/ee/organization-usage/components/usage-consumers.tsx +++ b/apps/sim/ee/organization-usage/components/usage-consumers.tsx @@ -43,7 +43,9 @@ import { xAIIcon, ZaiIcon, } from '@/components/icons' +import { MiniMaxIcon } from '@/components/icons/minimax' import { NebiusIcon } from '@/components/icons/nebius' +import { QwenIcon } from '@/components/icons/qwen' import { ThinkingMachinesIcon } from '@/components/icons/thinking-machines' import type { OrganizationUsageBreakdown, @@ -72,6 +74,7 @@ import { USAGE_TAB_EMPTY_COPY } from '@/ee/organization-usage/constants' * the two drift, so the coverage is checked rather than remembered. */ const PROVIDER_ICONS: Readonly>> = { + alibaba: QwenIcon, anthropic: AnthropicIcon, baseten: BasetenIcon, bedrock: BedrockIcon, @@ -84,6 +87,7 @@ const PROVIDER_ICONS: Readonly { }) }) -describe('getApiKeyWithBYOK for Nebius', () => { +describe.each([ + { provider: 'together', envVar: 'TOGETHER_API_KEY', model: 'together/moonshotai/Kimi-K3' }, + { provider: 'baseten', envVar: 'BASETEN_API_KEY', model: 'baseten/moonshotai/Kimi-K3' }, +])('getApiKeyWithBYOK for $provider', ({ provider, envVar, model }) => { beforeEach(() => { resetDbChainMock() + setEnvFlags({ isHosted: true }) + setEnv({ [envVar]: 'platform-env-key' }) + }) + + afterEach(() => { + setEnvFlags({ isHosted: true }) + setEnv({ [envVar]: undefined }) + }) + + it("never serves Sim's env key on hosted, where no model of the provider is billed", async () => { + await expect(getApiKeyWithBYOK(provider, model, uniqueWorkspaceId())).rejects.toThrow( + 'API key is required' + ) + }) + + it("falls back to the operator's env key when self-hosted", async () => { + setEnvFlags({ isHosted: false }) + + await expect(getApiKeyWithBYOK(provider, model, uniqueWorkspaceId())).resolves.toEqual({ + apiKey: 'platform-env-key', + isBYOK: false, + }) + }) +}) + +describe.each([ + { provider: 'nebius', model: 'nebius/Qwen/Qwen3-30B-A3B-Instruct-2507', name: 'Nebius' }, + { provider: 'thinkingmachines', model: 'thinkingmachines/inkling', name: 'Thinking Machines' }, + { provider: 'minimax', model: 'minimax/minimax-m3', name: 'MiniMax' }, + { provider: 'alibaba', model: 'qwen4-max', name: 'Alibaba Cloud' }, + { provider: 'ollama-cloud', model: 'ollama-cloud/glm-5.3', name: 'Ollama Cloud' }, + { provider: 'kie', model: 'kie/custom', name: 'Kie' }, +])('getApiKeyWithBYOK for BYOK-only $provider', ({ provider, model, name }) => { + beforeEach(() => { + resetDbChainMock() + setEnvFlags({ isHosted: true }) mockDecryptSecret.mockImplementation(async (encrypted: string) => ({ decrypted: encrypted.replace('encrypted-', 'decrypted-'), })) }) it('uses the configured workspace key instead of a caller key', async () => { - dbChainMockFns.orderBy.mockResolvedValueOnce([storedKey('nebius-workspace')]) + dbChainMockFns.orderBy.mockResolvedValueOnce([storedKey(`${provider}-workspace`)]) await expect( - getApiKeyWithBYOK( - 'nebius', - 'nebius/Qwen/Qwen3-30B-A3B-Instruct-2507', - uniqueWorkspaceId(), - 'caller-key' - ) + getApiKeyWithBYOK(provider, model, uniqueWorkspaceId(), 'caller-key') ).resolves.toEqual({ - apiKey: 'decrypted-nebius-workspace', + apiKey: `decrypted-${provider}-workspace`, isBYOK: true, scope: 'workspace', }) }) - it('fails closed when a configured Nebius key cannot be decrypted', async () => { - dbChainMockFns.orderBy.mockResolvedValueOnce([storedKey('nebius-corrupt')]) + it('fails closed when a configured key cannot be decrypted', async () => { + dbChainMockFns.orderBy.mockResolvedValueOnce([storedKey(`${provider}-corrupt`)]) mockDecryptSecret.mockRejectedValueOnce(new Error('cannot decrypt')) await expect( - getApiKeyWithBYOK( - 'nebius', - 'nebius/Qwen/Qwen3-30B-A3B-Instruct-2507', - uniqueWorkspaceId(), - 'caller-key' - ) + getApiKeyWithBYOK(provider, model, uniqueWorkspaceId(), 'caller-key') ).rejects.toThrow('Configured BYOK credentials are unavailable') }) + + it('never falls back to a platform key when neither key is present', async () => { + dbChainMockFns.orderBy.mockResolvedValue([]) + await expect(getApiKeyWithBYOK(provider, model, uniqueWorkspaceId())).rejects.toThrow( + `API key is required for ${name} ${model}` + ) + expect(mockGetRotatingApiKey).not.toHaveBeenCalled() + }) }) describe('BYOK lookup retry lifetime', () => { diff --git a/apps/sim/lib/api-key/byok.ts b/apps/sim/lib/api-key/byok.ts index 30cd02e0a00..063cf8e5f3c 100644 --- a/apps/sim/lib/api-key/byok.ts +++ b/apps/sim/lib/api-key/byok.ts @@ -232,6 +232,23 @@ async function resolveBYOKKey( ) } +/** + * Providers Sim never serves on a platform key, hosted or self-hosted: a request runs on the + * workspace's BYOK key, else the caller's own key, else fails. Values are display names. + */ +const BYOK_ONLY_PROVIDERS = { + nebius: 'Nebius', + thinkingmachines: 'Thinking Machines', + minimax: 'MiniMax', + alibaba: 'Alibaba Cloud', + 'ollama-cloud': 'Ollama Cloud', + kie: 'Kie', +} as const satisfies Partial> + +function isBYOKOnlyProvider(provider: string): provider is keyof typeof BYOK_ONLY_PROVIDERS { + return Object.hasOwn(BYOK_ONLY_PROVIDERS, provider) +} + /** * Serves a catalogued hosted model: Sim's key from `keyPool` when the run's payer may use it * ({@link mayUseHostedKey}), otherwise the caller's own key. A caller's key is not Sim's, so it is @@ -298,12 +315,12 @@ export async function getApiKeyWithBYOK( } /** - * On hosted Sim the platform Fireworks key backs the static catalog (the - * sim-auto pool) and nothing else, exactly as the platform Anthropic and - * OpenAI keys back only their catalogued models. A dynamic `fireworks/*` - * id a workspace configured itself carries no catalog pricing, so - * `shouldBillModelUsage` would return false for it — serving it on Sim's - * key would be unmetered inference. + * On hosted Sim the platform Fireworks key backs the static hosted catalog + * (a superset of the sim-auto pool) and nothing else, exactly as the + * platform Anthropic and OpenAI keys back only their catalogued models. A + * dynamic `fireworks/*` id a workspace configured itself carries no catalog + * pricing, so `shouldBillModelUsage` would return false for it — serving it + * on Sim's key would be unmetered inference. */ if (isHosted) { const isModelHosted = getHostedModels().some((m) => m.toLowerCase() === model.toLowerCase()) @@ -332,6 +349,12 @@ export async function getApiKeyWithBYOK( throw new Error(`API key is required for Fireworks ${model}`) } + /** + * Together AI and Baseten are BYOK-only on hosted Sim: none of their models is + * hosted-billable, so `shouldBillModelUsage` is false for every one of them and + * serving `TOGETHER_API_KEY` / `BASETEN_API_KEY` there would be unmetered + * inference on Sim's account. Self-hosted, the env key is the operator's own. + */ if (provider === 'together') { if (workspaceId) { const byokResult = await getBYOKKey(workspaceId, 'together', { signal }) @@ -347,7 +370,7 @@ export async function getApiKeyWithBYOK( if (userProvidedKey) { return { apiKey: userProvidedKey, isBYOK: false } } - if (env.TOGETHER_API_KEY) { + if (!isHosted && env.TOGETHER_API_KEY) { return { apiKey: env.TOGETHER_API_KEY, isBYOK: false } } throw new Error(`API key is required for Together AI ${model}`) @@ -364,63 +387,20 @@ export async function getApiKeyWithBYOK( if (userProvidedKey) { return { apiKey: userProvidedKey, isBYOK: false } } - if (env.BASETEN_API_KEY) { + if (!isHosted && env.BASETEN_API_KEY) { return { apiKey: env.BASETEN_API_KEY, isBYOK: false } } throw new Error(`API key is required for Baseten ${model}`) } - if (provider === 'nebius') { - const byokResult = await getBYOKKey(workspaceId, 'nebius', { signal }) - if (byokResult) return byokResult - if (userProvidedKey) return { apiKey: userProvidedKey, isBYOK: false } - throw new Error(`API key is required for Nebius ${model}`) - } - - if (provider === 'thinkingmachines') { - const byokResult = await getBYOKKey(workspaceId, 'thinkingmachines', { signal }) + if (isBYOKOnlyProvider(provider)) { + const byokResult = await getBYOKKey(workspaceId, provider, { signal }) if (byokResult) { - logger.info('Using BYOK key for Thinking Machines', { - model, - workspaceId, - scope: byokResult.scope, - }) + logger.info('Using BYOK key', { provider, model, workspaceId, scope: byokResult.scope }) return byokResult } if (userProvidedKey) return { apiKey: userProvidedKey, isBYOK: false } - throw new Error(`API key is required for Thinking Machines ${model}`) - } - - if (provider === 'ollama-cloud') { - if (workspaceId) { - const byokResult = await getBYOKKey(workspaceId, 'ollama-cloud', { signal }) - if (byokResult) { - logger.info('Using BYOK key for Ollama Cloud', { - model, - workspaceId, - scope: byokResult.scope, - }) - return byokResult - } - } - if (userProvidedKey) { - return { apiKey: userProvidedKey, isBYOK: false } - } - throw new Error(`API key is required for Ollama Cloud ${model}`) - } - - if (provider === 'kie') { - if (workspaceId) { - const byokResult = await getBYOKKey(workspaceId, 'kie', { signal }) - if (byokResult) { - logger.info('Using BYOK key for Kie', { model, workspaceId, scope: byokResult.scope }) - return byokResult - } - } - if (userProvidedKey) { - return { apiKey: userProvidedKey, isBYOK: false } - } - throw new Error(`API key is required for Kie ${model}`) + throw new Error(`API key is required for ${BYOK_ONLY_PROVIDERS[provider]} ${model}`) } if (provider === 'bedrock') { diff --git a/apps/sim/lib/api/contracts/byok-keys.ts b/apps/sim/lib/api/contracts/byok-keys.ts index a5498313fff..594839866c7 100644 --- a/apps/sim/lib/api/contracts/byok-keys.ts +++ b/apps/sim/lib/api/contracts/byok-keys.ts @@ -18,6 +18,8 @@ export const byokProviderIdSchema = z.enum([ 'ollama-cloud', 'kie', 'thinkingmachines', + 'minimax', + 'alibaba', 'falai', 'firecrawl', 'exa', diff --git a/apps/sim/lib/core/config/env.ts b/apps/sim/lib/core/config/env.ts index de165c68ebc..d57228c8215 100644 --- a/apps/sim/lib/core/config/env.ts +++ b/apps/sim/lib/core/config/env.ts @@ -284,12 +284,12 @@ export const env = createEnv({ VLLM_API_KEY: z.string().optional(), // Optional bearer token for vLLM LITELLM_BASE_URL: z.string().url().optional(), // LiteLLM proxy base URL (OpenAI-compatible) LITELLM_API_KEY: z.string().optional(), // Optional bearer token for LiteLLM - FIREWORKS_API_KEY: z.string().optional(), // Platform Fireworks AI key backing the hosted sim-auto pool (and self-hosted model listing/inference) + FIREWORKS_API_KEY: z.string().optional(), // Platform Fireworks AI key backing the hosted Fireworks catalog (and self-hosted model listing/inference) FIREWORKS_API_KEY_1: z.string().min(1).optional(), // Primary Fireworks API key for load balancing FIREWORKS_API_KEY_2: z.string().min(1).optional(), // Additional Fireworks API key for load balancing FIREWORKS_API_KEY_3: z.string().min(1).optional(), // Additional Fireworks API key for load balancing - TOGETHER_API_KEY: z.string().optional(), // Optional Together AI API key for model listing and inference - BASETEN_API_KEY: z.string().optional(), // Optional Baseten API key for model listing and inference + TOGETHER_API_KEY: z.string().optional(), // Self-hosted only: Together AI key for model listing and inference (never used on hosted Sim) + BASETEN_API_KEY: z.string().optional(), // Self-hosted only: Baseten key for model listing and inference (never used on hosted Sim) COHERE_API_KEY: z.string().min(1).optional(), // Cohere API key for reranker (rerank-v4.0-pro, rerank-v4.0-fast, rerank-v3.5) COHERE_API_KEY_1: z.string().min(1).optional(), // Primary Cohere API key for rotation COHERE_API_KEY_2: z.string().min(1).optional(), // Additional Cohere API key for load balancing diff --git a/apps/sim/lib/provider-models/application/list-models.ts b/apps/sim/lib/provider-models/application/list-models.ts index be4a83dcfe0..858af4ac9fc 100644 --- a/apps/sim/lib/provider-models/application/list-models.ts +++ b/apps/sim/lib/provider-models/application/list-models.ts @@ -16,6 +16,8 @@ import { scopedOutboundFetch } from '@/lib/core/network/outbound-fetch.server' import { OrchestrationError } from '@/lib/core/orchestration/types' import { providerModelOperations } from '@/lib/provider-models/application/operations' import { resolveActiveWorkspaceApplicationContext } from '@/lib/workspaces/application/context' +import { toFireworksCatalogModelId } from '@/providers/fireworks/utils' +import { getStaticProviderModels } from '@/providers/models' import { filterBlacklistedModels } from '@/providers/utils' const logger = createLogger('ProviderModelsList') @@ -42,25 +44,29 @@ interface ModelCatalogSource { const MODEL_CATALOGS = { baseten: { url: 'https://inference.baseten.co/v1/models', - platformKey: () => env.BASETEN_API_KEY, + /** BYOK-only on hosted Sim (see `getApiKeyWithBYOK`), so its key never lists the catalog there. */ + platformKey: () => (isHosted ? undefined : env.BASETEN_API_KEY), parse: (body) => basetenUpstreamResponseSchema.parse(body).data.map((model) => `baseten/${model.id}`), }, fireworks: { url: 'https://api.fireworks.ai/inference/v1/models', /** - * On hosted Sim the platform key is the sim-auto pool's inference key, not a workspace - * credential: enumerating the whole Fireworks catalog from it would offer every serverless + * On hosted Sim the platform key serves only the static hosted Fireworks catalog, not a + * workspace credential: enumerating the whole Fireworks catalog from it would offer every serverless * model as selectable when no key can actually run it (`getApiKeyWithBYOK` serves the platform * key to catalog models only). */ platformKey: () => (isHosted ? undefined : env.FIREWORKS_API_KEY), parse: (body) => - fireworksUpstreamResponseSchema.parse(body).data.map((model) => `fireworks/${model.id}`), + fireworksUpstreamResponseSchema + .parse(body) + .data.map((model) => toFireworksCatalogModelId(model.id)), }, together: { url: 'https://api.together.ai/v1/models', - platformKey: () => env.TOGETHER_API_KEY, + /** BYOK-only on hosted Sim (see `getApiKeyWithBYOK`), so its key never lists the catalog there. */ + platformKey: () => (isHosted ? undefined : env.TOGETHER_API_KEY), parse: (body) => togetherUpstreamResponseSchema .parse(body) @@ -148,6 +154,19 @@ function isOutsideWorkspace(error: unknown): boolean { ) } +/** + * The provider's static catalog entries, then the discovered ids they do not already cover. The + * static entries are listed whether or not a key can read the upstream catalog, the same way a + * static provider's models always list. + */ +function withStaticCatalog(provider: ModelCatalogProvider, discovered: string[]): string[] { + const staticIds = filterBlacklistedModels( + getStaticProviderModels(provider).map((model) => model.id) + ) + const listed = new Set(staticIds.map((id) => id.toLowerCase())) + return [...staticIds, ...discovered.filter((id) => !listed.has(id.toLowerCase()))] +} + /** * The models a provider offers to the caller. A signed-in workspace member reads them with the * workspace's key through its egress route; anyone else gets Sim's own catalog, read directly. @@ -158,18 +177,20 @@ export async function listProviderModels( ): Promise { if (principal && workspaceId) { try { - return await listWorkspaceProviderModels.execute({ + const discovered = await listWorkspaceProviderModels.execute({ principal, input: { provider, workspaceId }, }) + return withStaticCatalog(provider, discovered) } catch (error) { if (!isOutsideWorkspace(error)) throw error } } - return fetchModelCatalog( + const discovered = await fetchModelCatalog( provider, MODEL_CATALOGS[provider].platformKey(), // egress-direct: no authorized workspace, so a platform request made with Sim's own key fetch ) + return withStaticCatalog(provider, discovered) } diff --git a/apps/sim/lib/tokenization/constants.ts b/apps/sim/lib/tokenization/constants.ts index d12c5b094f7..9639e27d8fa 100644 --- a/apps/sim/lib/tokenization/constants.ts +++ b/apps/sim/lib/tokenization/constants.ts @@ -81,6 +81,16 @@ export const TOKENIZATION_CONFIG = { confidence: 'medium', supportedMethods: ['heuristic', 'fallback'], }, + minimax: { + avgCharsPerToken: 4, + confidence: 'medium', + supportedMethods: ['heuristic', 'fallback'], + }, + alibaba: { + avgCharsPerToken: 4, + confidence: 'medium', + supportedMethods: ['heuristic', 'fallback'], + }, kie: { avgCharsPerToken: 4, confidence: 'medium', diff --git a/apps/sim/providers/alibaba/index.live.test.ts b/apps/sim/providers/alibaba/index.live.test.ts new file mode 100644 index 00000000000..432bfe80589 --- /dev/null +++ b/apps/sim/providers/alibaba/index.live.test.ts @@ -0,0 +1,232 @@ +import { writeFile } from 'node:fs/promises' +import { getErrorMessage } from '@sim/utils/errors' +import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' +import type { StreamingExecution } from '@/executor/types' +import { executeProviderRequest } from '@/providers' +import { getProviderModels } from '@/providers/models' +import type { AgentStreamEvent } from '@/providers/stream-events' +import type { ProviderRequest, ProviderResponse, ProviderToolConfig } from '@/providers/types' + +vi.hoisted(() => { + process.env.MAX_TOOL_ITERATIONS = '1' +}) +vi.unmock('@/tools/registry') +vi.unmock('@/tools/metadata') +vi.unmock('@/tools/metadata-outputs') + +const results: Array<{ + name: string + status: 'passed' | 'failed' + durationMs: number + error?: string +}> = [] +const apiKey = process.env.ALIBABA_API_KEY +const reportPath = process.env.ALIBABA_REPORT_PATH +const model = 'qwen4-max' +/** Thinks only on streaming calls, so Sim turns its thinking off on every other call. */ +const streamOnlyThinkingModel = 'qwen3.8-27b' + +const FETCH_TOOL: ProviderToolConfig = { + id: 'http_request', + description: 'Fetch a URL over HTTP GET', + usageControl: 'auto', + params: { method: 'GET' }, + parameters: { + type: 'object', + properties: { url: { type: 'string', description: 'The URL to fetch' } }, + required: ['url'], + }, +} + +async function check(name: string, run: () => Promise) { + const start = Date.now() + try { + await run() + results.push({ name, status: 'passed', durationMs: Date.now() - start }) + } catch (error) { + results.push({ + name, + status: 'failed', + durationMs: Date.now() - start, + error: getErrorMessage(error), + }) + throw error + } +} + +async function execute(request: Partial = {}) { + expect(vi.isMockFunction(globalThis.fetch)).toBe(false) + return executeProviderRequest('alibaba', { + model, + apiKey, + maxTokens: 4096, + abortSignal: AbortSignal.timeout(90_000), + messages: [{ role: 'user', content: 'Reply with only the result of 6 times 7.' }], + ...request, + }) +} + +async function readEvents(result: StreamingExecution): Promise { + const events: AgentStreamEvent[] = [] + const reader = result.stream.getReader() + for (let next = await reader.read(); !next.done; next = await reader.read()) { + events.push(next.value as AgentStreamEvent) + } + return events +} + +beforeAll(async () => { + await check('configuration', async () => { + if (!reportPath) throw new Error('Set ALIBABA_REPORT_PATH to a writable JSON report path') + if (!apiKey) + throw new Error('Set ALIBABA_API_KEY to a funded Model Studio key from the Singapore region') + }) +}) + +afterAll(async () => { + if (reportPath) + await writeFile( + reportPath, + JSON.stringify({ recordedAt: new Date().toISOString(), results }, null, 2) + ) +}) + +describe('Alibaba Cloud Model Studio live acceptance', () => { + it('rejects invalid credentials over the real API', async () => { + await check('invalid-credentials', async () => { + await expect(execute({ apiKey: 'invalid-model-studio-test-key' })).rejects.toThrow(/401|403/) + }) + }, 60_000) + + it.each(getProviderModels('alibaba'))( + 'serves catalog model %s without streaming', + async (catalogModel) => { + await check(`catalog:${catalogModel}`, async () => { + const result = (await execute({ model: catalogModel })) as ProviderResponse + expect(result.content).toContain('42') + expect(result.content).not.toMatch(//i) + expect(result.tokens?.total).toBeGreaterThan(0) + expect(result.model).toBe(catalogModel) + }) + }, + 120_000 + ) + + it.each([model, streamOnlyThinkingModel])( + 'streams %s thinking separately from the answer', + async (streamModel) => { + await check(`stream-thinking:${streamModel}`, async () => { + const result = (await execute({ + model: streamModel, + stream: true, + reasoningEffort: 'low', + })) as StreamingExecution + const events = await readEvents(result) + const thinking = events.filter((event) => event.type === 'thinking_delta') + const text = events.map((event) => (event.type === 'text_delta' ? event.text : '')).join('') + expect(thinking.length).toBeGreaterThan(0) + expect(text).toContain('42') + const execution = await result.execution + expect(execution.output.content).toContain('42') + expect(execution.output.tokens?.total).toBeGreaterThan(0) + }) + }, + 90_000 + ) + + it('turns thinking off for effort none', async () => { + await check('effort-none', async () => { + const result = (await execute({ + stream: true, + reasoningEffort: 'none', + })) as StreamingExecution + const events = await readEvents(result) + expect(events.some((event) => event.type === 'thinking_delta')).toBe(false) + expect((await result.execution).output.content).toContain('42') + }) + }, 60_000) + + it.each(getProviderModels('alibaba'))( + 'returns a JSON-schema answer from %s through the prompt', + async (catalogModel) => { + await check(`structured-output:${catalogModel}`, async () => { + const result = (await execute({ + model: catalogModel, + responseFormat: { + name: 'answer', + schema: { + type: 'object', + properties: { answer: { type: 'integer' } }, + required: ['answer'], + additionalProperties: false, + }, + }, + })) as ProviderResponse + expect(JSON.parse(result.content)).toEqual({ answer: 42 }) + }) + }, + 120_000 + ) + + it('runs an automatic tool loop on the stream-only-thinking model without streaming', async () => { + await check('tool-loop:auto', async () => { + const result = (await execute({ + model: streamOnlyThinkingModel, + messages: [ + { + role: 'user', + content: 'Fetch https://example.com using the tool, then report the HTTP status code.', + }, + ], + tools: [FETCH_TOOL], + })) as ProviderResponse + expect(result.toolCalls?.some((call) => call.name === 'http_request' && call.success)).toBe( + true + ) + expect(result.content).toContain('200') + }) + }, 120_000) + + it('runs a forced tool loop on the stream-only-thinking model while streaming', async () => { + await check('tool-loop:force', async () => { + const result = (await execute({ + model: streamOnlyThinkingModel, + stream: true, + messages: [ + { + role: 'user', + content: 'Fetch https://example.com using the tool, then report the HTTP status code.', + }, + ], + tools: [{ ...FETCH_TOOL, usageControl: 'force' }], + })) as StreamingExecution + await readEvents(result) + const { output } = await result.execution + expect( + output.toolCalls?.list.some((call) => call.name === 'http_request' && !call.error) + ).toBe(true) + expect(output.content).toContain('200') + }) + }, 120_000) + + it('answers with tool_choice none once the tool loop reaches its cap', async () => { + await check('iteration-cap', async () => { + const result = (await execute({ + messages: [ + { + role: 'user', + content: + 'Use the tool to fetch https://example.com. Then use the tool again to fetch the URL of the first link on that page. Then report both HTTP status codes.', + }, + ], + tools: [FETCH_TOOL], + })) as ProviderResponse + expect( + result.timing?.timeSegments?.some( + (segment) => segment.name === 'Final answer after tool iteration limit' + ) + ).toBe(true) + expect(result.content).toContain('200') + }) + }, 180_000) +}) diff --git a/apps/sim/providers/alibaba/index.test.ts b/apps/sim/providers/alibaba/index.test.ts new file mode 100644 index 00000000000..17e3d205996 --- /dev/null +++ b/apps/sim/providers/alibaba/index.test.ts @@ -0,0 +1,117 @@ +import { collectStream } from '@sim/testing/helpers/async' +import { jsonResponse } from '@sim/testing/helpers/http' +import { providersMock } from '@sim/testing/mocks/providers.mock' +import { providersTraceEnrichmentMock } from '@sim/testing/mocks/providers-trace-enrichment.mock' +import { beforeEach, describe, expect, it, vi } from 'vitest' +import type { StreamingExecution } from '@/executor/types' +import { alibabaProvider } from '@/providers/alibaba' +import type { ProviderRequest, ProviderToolConfig } from '@/providers/types' + +vi.mock('@/providers', () => providersMock) +vi.mock('@/providers/trace-enrichment', () => providersTraceEnrichmentMock) + +const REQUEST = { + apiKey: 'model-studio-test-key', + messages: [{ role: 'user' as const, content: 'Return the answer.' }], +} + +const TOOL: ProviderToolConfig = { + id: 'http_request', + description: 'Fetch a URL', + params: {}, + parameters: { type: 'object', properties: {}, required: [] }, + usageControl: 'auto', +} + +function completion(content: string) { + return { + id: 'chatcmpl-alibaba', + object: 'chat.completion', + created: 1, + model: 'qwen', + choices: [{ index: 0, message: { role: 'assistant', content }, finish_reason: 'stop' }], + usage: { prompt_tokens: 10, completion_tokens: 5, total_tokens: 15 }, + } +} + +function sse() { + const chunks = [ + { choices: [{ index: 0, delta: { content: '42' }, finish_reason: 'stop' }] }, + { choices: [], usage: { prompt_tokens: 10, completion_tokens: 5, total_tokens: 15 } }, + ] + return new Response( + `${chunks.map((chunk) => `data: ${JSON.stringify(chunk)}\n\n`).join('')}data: [DONE]\n\n`, + { headers: { 'content-type': 'text/event-stream' } } + ) +} + +/** Runs one request and returns every Chat Completions payload it sent. */ +async function capturePayloads(request: Partial & { model: string }) { + const payloads: Array> = [] + vi.mocked(fetch).mockImplementation(async (_url, init) => { + const payload = JSON.parse(String(init?.body)) + payloads.push(payload) + return payload.stream ? sse() : jsonResponse(completion('{"answer":42}')) + }) + const result = await alibabaProvider.executeRequest({ ...REQUEST, ...request }) + if ('stream' in result) await collectStream((result as StreamingExecution).stream) + return payloads +} + +describe('Alibaba Model Studio thinking and structured-output wire contract', () => { + beforeEach(() => { + vi.stubGlobal('fetch', vi.fn()) + }) + + it('turns thinking off on a non-streaming call to a stream-only-thinking model', async () => { + const payloads = await capturePayloads({ model: 'qwen3.8-27b' }) + expect(payloads).toHaveLength(1) + expect(payloads[0].enable_thinking).toBe(false) + }) + + it('turns thinking off on the tool-loop calls of a streaming request', async () => { + const payloads = await capturePayloads({ model: 'qwen3.8-27b', stream: true, tools: [TOOL] }) + expect(payloads.length).toBeGreaterThan(0) + for (const payload of payloads) { + expect(payload.stream).toBeFalsy() + expect(payload.enable_thinking).toBe(false) + } + }) + + it('keeps thinking on when a stream-only-thinking model streams', async () => { + const payloads = await capturePayloads({ + model: 'qwen3.8-27b', + stream: true, + reasoningEffort: 'low', + }) + expect(payloads).toHaveLength(1) + expect(payloads[0].stream).toBe(true) + expect(payloads[0].enable_thinking).toBeUndefined() + expect(payloads[0].reasoning_effort).toBe('low') + }) + + it.each(['qwen4-max', 'qwen3.8-flash'])( + 'sends effort none on %s as enable_thinking false', + async (model) => { + const payloads = await capturePayloads({ model, reasoningEffort: 'none' }) + expect(payloads[0].enable_thinking).toBe(false) + expect(payloads[0]).not.toHaveProperty('reasoning_effort') + } + ) + + it.each(['qwen4-max', 'qwen3.7-plus', 'qwen3.8-flash'])( + 'requests structured output on %s through the prompt, never response_format', + async (model) => { + const payloads = await capturePayloads({ + model, + responseFormat: { + name: 'answer', + schema: { type: 'object', properties: { answer: { type: 'integer' } } }, + }, + }) + expect(payloads[0]).not.toHaveProperty('response_format') + const messages = payloads[0].messages as Array<{ content: string }> + expect(messages.at(-1)?.content).toContain('JSON Schema') + } + ) +}) diff --git a/apps/sim/providers/alibaba/index.ts b/apps/sim/providers/alibaba/index.ts new file mode 100644 index 00000000000..2e9db5c36e8 --- /dev/null +++ b/apps/sim/providers/alibaba/index.ts @@ -0,0 +1,109 @@ +import { createLogger } from '@sim/logger' +import OpenAI from 'openai' +import { outboundFetch } from '@/lib/core/network/outbound-fetch.server' +import type { StreamingExecution } from '@/executor/types' +import { + getModelCapabilities, + getProviderDefaultModel, + getProviderModels, +} from '@/providers/models' +import { + type ChatCompletionPayload, + executeChatCompletionRequest, +} from '@/providers/openai-compat/chat-completions' +import { applyPromptSchema } from '@/providers/openai-compat/prompt-schema' +import { openAICompatTransport } from '@/providers/transport' +import type { ProviderConfig, ProviderRequest, ProviderResponse } from '@/providers/types' + +const logger = createLogger('AlibabaProvider') + +/** + * Model Studio's Singapore (International) OpenAI-compatible endpoint. API keys are bound to + * the region they were created in, so only Singapore keys authenticate here. + */ +const MODEL_STUDIO_BASE_URL = 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1' + +type ReasoningEffort = NonNullable + +/** + * Open-weight Qwen models that think only on streaming calls: Model Studio rejects a + * non-streaming call with thinking on ("parameter.enable_thinking only support stream call"). + * Their non-streaming calls (the tool loop, the structured-output and iteration-cap final + * calls, and every `stream: false` request) turn thinking off, trading reasoning on those + * calls for a request that cannot fail on the mode. + */ +const STREAM_ONLY_THINKING_MODELS: ReadonlySet = new Set(['qwen3.8-27b']) + +/** + * Maps the Agent block's thinking settings onto Model Studio's request fields for one call. + * Qwen models reject a named `tool_choice` while thinking, so a request that forces a tool + * turns thinking off for every call it makes. Effort `none` always becomes + * `enable_thinking: false`, never `reasoning_effort: 'none'`. + */ +function buildThinkingFields( + request: ProviderRequest, + forcesTool: boolean, + stream: boolean +): { enable_thinking?: boolean; reasoning_effort?: ReasoningEffort } { + if (forcesTool) return { enable_thinking: false } + if (!stream && STREAM_ONLY_THINKING_MODELS.has(request.model.toLowerCase())) { + return { enable_thinking: false } + } + + const capabilities = getModelCapabilities(request.model) + const effort = request.reasoningEffort + if (effort && capabilities?.reasoningEffort?.values.includes(effort)) { + if (effort === 'none') return { enable_thinking: false } + return { reasoning_effort: effort as ReasoningEffort } + } + if (capabilities?.thinking) { + if (request.thinkingLevel === 'none') return { enable_thinking: false } + if (request.thinkingLevel === 'enabled') return { enable_thinking: true } + } + return {} +} + +/** + * Alibaba Cloud Model Studio (DashScope) Qwen models over the shared Chat Completions path. + * Thinking streams on `reasoning_content`, separate from the answer in `content`. + * + * Structured output always travels as prompt instructions, never `response_format`: Model + * Studio's structured-output guide says JSON Schema is not yet supported for Singapore-region + * models (the only region this endpoint serves), contradicting the per-model pages, and + * image input silently downgrades `json_schema` to unconstrained `json_object`. + */ +export const alibabaProvider: ProviderConfig = { + id: 'alibaba', + name: 'Alibaba Cloud', + description: 'Qwen models via Alibaba Cloud Model Studio', + version: '1.0.0', + models: getProviderModels('alibaba'), + defaultModel: getProviderDefaultModel('alibaba'), + executeRequest: async ( + request: ProviderRequest + ): Promise => { + if (!request.apiKey) throw new Error('API key is required for Alibaba Cloud') + const client = new OpenAI({ + ...openAICompatTransport(), + fetch: outboundFetch, + apiKey: request.apiKey, + baseURL: MODEL_STUDIO_BASE_URL, + }) + const forcesTool = Boolean(request.tools?.some((tool) => tool.usageControl === 'force')) + if (forcesTool) { + logger.info('Disabling Qwen thinking for a forced-tool request', { model: request.model }) + } + return executeChatCompletionRequest(request, { + providerId: 'alibaba', + providerName: 'Alibaba Cloud', + client, + requestedModel: request.model, + reportedModel: request.model, + logger, + applyResponseFormat: applyPromptSchema, + reasoningFields: ['reasoning_content'], + recordPendingUsage: true, + requestFields: ({ stream }) => buildThinkingFields(request, forcesTool, stream), + }) + }, +} diff --git a/apps/sim/providers/attachments.ts b/apps/sim/providers/attachments.ts index 9592791c333..bf13bd146ca 100644 --- a/apps/sim/providers/attachments.ts +++ b/apps/sim/providers/attachments.ts @@ -48,6 +48,8 @@ export type AttachmentProvider = | 'zai' | 'kimi' | 'thinkingmachines' + | 'minimax' + | 'alibaba' export interface PreparedProviderAttachment { file: UserFile @@ -189,6 +191,8 @@ const PROVIDER_SUPPORTED_LABELS: Record = { zai: 'no file attachments in the current API adapter', kimi: 'images through image_url message parts on multimodal models', thinkingmachines: 'no file attachments in the current API adapter', + minimax: 'images through image_url message parts', + alibaba: 'images through image_url message parts on multimodal models', } export function getAttachmentProvider(providerId: ProviderId | string): AttachmentProvider | null { @@ -215,6 +219,8 @@ export function getAttachmentProvider(providerId: ProviderId | string): Attachme if (providerId === 'zai') return 'zai' if (providerId === 'kimi') return 'kimi' if (providerId === 'thinkingmachines') return 'thinkingmachines' + if (providerId === 'minimax') return 'minimax' + if (providerId === 'alibaba') return 'alibaba' return null } @@ -424,6 +430,8 @@ function isMimeTypeSupportedByProvider( case 'litellm': case 'xai': case 'kimi': + case 'minimax': + case 'alibaba': return isImageMimeType(mimeType) case 'deepseek': case 'cerebras': diff --git a/apps/sim/providers/fireworks/utils.test.ts b/apps/sim/providers/fireworks/utils.test.ts index 02ddc5e6bf4..d4f94a59e72 100644 --- a/apps/sim/providers/fireworks/utils.test.ts +++ b/apps/sim/providers/fireworks/utils.test.ts @@ -1,5 +1,6 @@ import { describe, expect, it } from 'vitest' -import { resolveFireworksWireModel } from '@/providers/fireworks/utils' +import { resolveFireworksWireModel, toFireworksCatalogModelId } from '@/providers/fireworks/utils' +import { getStaticProviderModels } from '@/providers/models' describe('resolveFireworksWireModel', () => { it('maps the static hosted catalog ids to their serverless resource paths', () => { @@ -10,9 +11,33 @@ describe('resolveFireworksWireModel', () => { ) }) + it('resolves every static catalog id to a serverless resource path', () => { + for (const { id } of getStaticProviderModels('fireworks')) { + expect(resolveFireworksWireModel(id.replace(/^fireworks\//, ''))).toMatch( + /^accounts\/fireworks\/models\// + ) + } + }) + it('passes user-configured dynamic ids through untouched', () => { expect(resolveFireworksWireModel('accounts/acme/models/custom')).toBe( 'accounts/acme/models/custom' ) }) }) + +describe('toFireworksCatalogModelId', () => { + it('lists a discovered serverless model under the catalog id that already covers it', () => { + for (const { id } of getStaticProviderModels('fireworks')) { + expect( + toFireworksCatalogModelId(resolveFireworksWireModel(id.replace(/^fireworks\//, ''))) + ).toBe(id) + } + }) + + it('prefixes a model the catalog does not cover with its wire name', () => { + expect(toFireworksCatalogModelId('accounts/acme/models/custom')).toBe( + 'fireworks/accounts/acme/models/custom' + ) + }) +}) diff --git a/apps/sim/providers/fireworks/utils.ts b/apps/sim/providers/fireworks/utils.ts index f205c2c2ee5..edbb89230ec 100644 --- a/apps/sim/providers/fireworks/utils.ts +++ b/apps/sim/providers/fireworks/utils.ts @@ -1,11 +1,15 @@ /** - * Wire model names for the static hosted Fireworks catalog entries (the - * sim-auto pool). Catalog ids are the short `fireworks/` form; the - * Fireworks API requires the full serverless resource path. User-configured - * dynamic ids are sent verbatim after prefix-stripping, exactly as before — - * only ids in this map are rewritten. + * Wire model names for the static hosted Fireworks catalog entries. Catalog + * ids are the short `fireworks/` form; the Fireworks API requires the + * full serverless resource path. User-configured dynamic ids are sent verbatim + * after prefix-stripping; only ids in this map are rewritten. */ const FIREWORKS_WIRE_NAMES: Record = { + 'minimax-m3.1-flash': 'accounts/fireworks/models/minimax-m3p1-flash', + 'hy4-flash': 'accounts/fireworks/models/hy4-flash', + 'deepseek-v4.1-flash-1017': 'accounts/fireworks/models/deepseek-v4p1-flash-1017', + 'deepseek-v4.1-flash': 'accounts/fireworks/models/deepseek-v4p1-flash', + 'glm-5.3-flash': 'accounts/fireworks/models/glm-5p3-flash', 'glm-5.3': 'accounts/fireworks/models/glm-5p3', 'glm-5.2': 'accounts/fireworks/models/glm-5p2', 'kimi-k3.1-pro': 'accounts/fireworks/models/kimi-k3p1-pro', @@ -19,3 +23,16 @@ const FIREWORKS_WIRE_NAMES: Record = { export function resolveFireworksWireModel(strippedModel: string): string { return FIREWORKS_WIRE_NAMES[strippedModel] ?? strippedModel } + +const CATALOG_NAMES_BY_WIRE_NAME: ReadonlyMap = new Map( + Object.entries(FIREWORKS_WIRE_NAMES).map(([catalogName, wireName]) => [wireName, catalogName]) +) + +/** + * The model id Sim lists for a model the Fireworks API names `wireName`: the static catalog's + * short `fireworks/` id when the catalog covers it, so a discovered model and its catalog + * entry list once; otherwise the provider-prefixed wire name. + */ +export function toFireworksCatalogModelId(wireName: string): string { + return `fireworks/${CATALOG_NAMES_BY_WIRE_NAME.get(wireName) ?? wireName}` +} diff --git a/apps/sim/providers/history-adapters.ts b/apps/sim/providers/history-adapters.ts index 82108983141..48464de29ad 100644 --- a/apps/sim/providers/history-adapters.ts +++ b/apps/sim/providers/history-adapters.ts @@ -118,6 +118,8 @@ export const providerHistoryProtocols: Record< baseten: 'chat-completions', nebius: 'chat-completions', thinkingmachines: 'chat-completions', + minimax: 'chat-completions', + alibaba: 'chat-completions', vllm: 'chat-completions', litellm: 'chat-completions', } diff --git a/apps/sim/providers/kimi/index.ts b/apps/sim/providers/kimi/index.ts index e4a7afebfb4..512db5cf10a 100644 --- a/apps/sim/providers/kimi/index.ts +++ b/apps/sim/providers/kimi/index.ts @@ -62,6 +62,12 @@ const THINKING_TOGGLE_MODELS = new Set( ) ) +/** + * The K3 series, which accepts `tool_choice: "required"` (Kimi's Model Parameter Reference), so a + * named tool is forced by offering only that tool. + */ +const REQUIRED_TOOL_CHOICE_MODELS = new Set(['kimi-k3', 'kimi-k3.1-pro']) + function buildRequiredToolPayload( tools: OpenAI.Chat.Completions.ChatCompletionTool[], name: string @@ -94,7 +100,7 @@ function buildResponseFormatPayload( * rejected), so the adapter never sends `temperature` and no model declares the capability. * - Output length is capped via `max_completion_tokens` (Kimi's documented parameter). * - `thinking: { type }` maps from `request.thinkingLevel` on the models whose definition - * declares the toggle (currently kimi-k2.6); always-reasoning models (kimi-k3, + * declares the toggle (currently kimi-k2.6); always-reasoning models (the K3 series, * kimi-k2.7-code) take no toggle, so the parameter is never sent for them. * - `response_format: json_schema` structured output is supported natively (`name`/`strict`/ * `schema` nesting per Kimi's API reference). @@ -102,7 +108,7 @@ function buildResponseFormatPayload( * rejects the object form whenever thinking is enabled ("tool_choice 'specified' is * incompatible with thinking enabled", verified live). On models with a thinking toggle the * adapter therefore sends `thinking: { type: "disabled" }` for the duration of a forced-tool - * request. K3 supports `required`, so it forces a named tool by offering only that tool; + * request. The K3 series supports `required`, so it forces a named tool by offering only that tool; * K2.7 Code falls back to `auto` because it supports neither forcing mechanism. */ export const kimiProvider: ProviderConfig = { @@ -190,7 +196,7 @@ export const kimiProvider: ProviderConfig = { hasActiveTools = true if (typeof toolChoice === 'object') { - if (request.model === 'kimi-k3' && toolChoice.type === 'function') { + if (REQUIRED_TOOL_CHOICE_MODELS.has(request.model) && toolChoice.type === 'function') { Object.assign( payload, buildRequiredToolPayload(filteredTools, toolChoice.function.name) @@ -266,8 +272,9 @@ export const kimiProvider: ProviderConfig = { } const initialCallTime = Date.now() - const originalToolChoice = - request.model === 'kimi-k3' ? preparedTools?.toolChoice : payload.tool_choice + const originalToolChoice = REQUIRED_TOOL_CHOICE_MODELS.has(request.model) + ? preparedTools?.toolChoice + : payload.tool_choice const forcedTools = preparedTools?.forcedTools || [] let usedForcedTools: string[] = [] @@ -512,7 +519,7 @@ export const kimiProvider: ProviderConfig = { if ( typeof originalToolChoice === 'object' && - (hasUsedForcedTool || request.model === 'kimi-k3') && + (hasUsedForcedTool || REQUIRED_TOOL_CHOICE_MODELS.has(request.model)) && forcedTools.length > 0 ) { const remainingTools = forcedTools.filter((tool) => !usedForcedTools.includes(tool)) @@ -522,7 +529,7 @@ export const kimiProvider: ProviderConfig = { type: 'function', function: { name: remainingTools[0] }, } - if (request.model === 'kimi-k3') { + if (REQUIRED_TOOL_CHOICE_MODELS.has(request.model)) { Object.assign( nextPayload, buildRequiredToolPayload(preparedTools?.tools || [], remainingTools[0]) diff --git a/apps/sim/providers/minimax/index.live.test.ts b/apps/sim/providers/minimax/index.live.test.ts new file mode 100644 index 00000000000..55f0a414b70 --- /dev/null +++ b/apps/sim/providers/minimax/index.live.test.ts @@ -0,0 +1,182 @@ +import { writeFile } from 'node:fs/promises' +import { getErrorMessage } from '@sim/utils/errors' +import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' +import type { StreamingExecution } from '@/executor/types' +import { executeProviderRequest } from '@/providers' +import { getProviderModels } from '@/providers/models' +import type { AgentStreamEvent } from '@/providers/stream-events' +import type { ProviderRequest, ProviderResponse, ProviderToolConfig } from '@/providers/types' + +vi.hoisted(() => { + process.env.MAX_TOOL_ITERATIONS = '1' +}) +vi.unmock('@/tools/registry') +vi.unmock('@/tools/metadata') +vi.unmock('@/tools/metadata-outputs') + +const results: Array<{ + name: string + status: 'passed' | 'failed' + durationMs: number + error?: string +}> = [] +const apiKey = process.env.MINIMAX_API_KEY +const reportPath = process.env.MINIMAX_REPORT_PATH +const model = 'minimax/minimax-m3.1-flash' + +const FETCH_TOOL: ProviderToolConfig = { + id: 'http_request', + description: 'Fetch a URL over HTTP GET', + usageControl: 'auto', + params: { method: 'GET' }, + parameters: { + type: 'object', + properties: { url: { type: 'string', description: 'The URL to fetch' } }, + required: ['url'], + }, +} + +async function check(name: string, run: () => Promise) { + const start = Date.now() + try { + await run() + results.push({ name, status: 'passed', durationMs: Date.now() - start }) + } catch (error) { + results.push({ + name, + status: 'failed', + durationMs: Date.now() - start, + error: getErrorMessage(error), + }) + throw error + } +} + +async function execute(request: Partial = {}) { + expect(vi.isMockFunction(globalThis.fetch)).toBe(false) + return executeProviderRequest('minimax', { + model, + apiKey, + maxTokens: 4096, + abortSignal: AbortSignal.timeout(90_000), + messages: [{ role: 'user', content: 'Reply with only the result of 6 times 7.' }], + ...request, + }) +} + +async function readEvents(result: StreamingExecution): Promise { + const events: AgentStreamEvent[] = [] + const reader = result.stream.getReader() + for (let next = await reader.read(); !next.done; next = await reader.read()) { + events.push(next.value as AgentStreamEvent) + } + return events +} + +beforeAll(async () => { + await check('configuration', async () => { + if (!reportPath) throw new Error('Set MINIMAX_REPORT_PATH to a writable JSON report path') + if (!apiKey) throw new Error('Set MINIMAX_API_KEY to a funded platform.minimax.io API key') + }) +}) + +afterAll(async () => { + if (reportPath) + await writeFile( + reportPath, + JSON.stringify({ recordedAt: new Date().toISOString(), results }, null, 2) + ) +}) + +describe('MiniMax live acceptance', () => { + it('rejects invalid credentials over the real API', async () => { + await check('invalid-credentials', async () => { + await expect(execute({ apiKey: 'invalid-minimax-test-key' })).rejects.toThrow(/401|403/) + }) + }, 60_000) + + it.each(getProviderModels('minimax'))( + 'serves catalog model %s without streaming', + async (catalogModel) => { + await check(`catalog:${catalogModel}`, async () => { + const result = (await execute({ model: catalogModel })) as ProviderResponse + expect(result.content).toContain('42') + expect(result.content).not.toMatch(//i) + expect(result.tokens?.total).toBeGreaterThan(0) + expect(result.model).toBe(catalogModel) + }) + }, + 120_000 + ) + + it('streams thinking separately from the answer', async () => { + await check('stream-thinking', async () => { + const result = (await execute({ stream: true, reasoningEffort: 'low' })) as StreamingExecution + const events = await readEvents(result) + const thinking = events.filter((event) => event.type === 'thinking_delta') + const text = events.map((event) => (event.type === 'text_delta' ? event.text : '')).join('') + expect(thinking.length).toBeGreaterThan(0) + expect(text).toContain('42') + expect(text).not.toMatch(//i) + const execution = await result.execution + expect(execution.output.content).toContain('42') + expect(execution.output.tokens?.total).toBeGreaterThan(0) + }) + }, 90_000) + + it('returns a JSON-schema answer through the prompt fallback', async () => { + await check('structured-output', async () => { + const result = (await execute({ + responseFormat: { + name: 'answer', + schema: { + type: 'object', + properties: { answer: { type: 'integer' } }, + required: ['answer'], + additionalProperties: false, + }, + }, + })) as ProviderResponse + expect(JSON.parse(result.content)).toEqual({ answer: 42 }) + }) + }, 90_000) + + it('executes an HTTP tool with automatic tool choice and feeds its result back', async () => { + await check('tool-loop', async () => { + const result = (await execute({ + messages: [ + { + role: 'user', + content: 'Fetch https://example.com using the tool, then report the HTTP status code.', + }, + ], + tools: [FETCH_TOOL], + })) as ProviderResponse + expect(result.toolCalls?.some((call) => call.name === 'http_request' && call.success)).toBe( + true + ) + expect(result.content).toContain('200') + }) + }, 120_000) + + it('answers with tool_choice none once the tool loop reaches its cap', async () => { + await check('iteration-cap', async () => { + const result = (await execute({ + messages: [ + { + role: 'user', + content: + 'Use the tool to fetch https://example.com. Then use the tool again to fetch the URL of the first link on that page. Then report both HTTP status codes.', + }, + ], + tools: [FETCH_TOOL], + })) as ProviderResponse + expect( + result.timing?.timeSegments?.some( + (segment) => segment.name === 'Final answer after tool iteration limit' + ) + ).toBe(true) + expect(result.content).toContain('200') + }) + }, 180_000) +}) diff --git a/apps/sim/providers/minimax/index.ts b/apps/sim/providers/minimax/index.ts new file mode 100644 index 00000000000..f28c2d7bd22 --- /dev/null +++ b/apps/sim/providers/minimax/index.ts @@ -0,0 +1,82 @@ +import { createLogger } from '@sim/logger' +import OpenAI from 'openai' +import type { ReasoningEffort } from 'openai/resources/shared' +import { outboundFetch } from '@/lib/core/network/outbound-fetch.server' +import type { StreamingExecution } from '@/executor/types' +import { + getModelCapabilities, + getProviderDefaultModel, + getProviderModels, + supportsForcedToolUse, +} from '@/providers/models' +import { executeChatCompletionRequest } from '@/providers/openai-compat/chat-completions' +import { applyPromptSchema } from '@/providers/openai-compat/prompt-schema' +import { openAICompatTransport } from '@/providers/transport' +import type { ProviderConfig, ProviderRequest, ProviderResponse } from '@/providers/types' + +const logger = createLogger('MiniMaxProvider') + +/** MiniMax international platform (platform.minimax.io) Chat Completions endpoint. */ +const MINIMAX_BASE_URL = 'https://api.minimax.io/v1' + +/** Catalog ids mapped to the model names MiniMax's Chat Completions endpoint accepts. */ +const MINIMAX_MODELS: Record = { + 'minimax/minimax-m3.1-flash': 'MiniMax-M3.1-Flash', + 'minimax/minimax-m3': 'MiniMax-M3', +} + +function resolveMiniMaxModel(model: string): string { + return MINIMAX_MODELS[model.toLowerCase()] ?? model.replace(/^minimax\//i, '') +} + +/** The effort the request asks for, when the model declares that level. */ +function resolveReasoningEffort(request: ProviderRequest): ReasoningEffort | undefined { + const effort = request.reasoningEffort + if (!effort || effort === 'auto') return undefined + const levels = getModelCapabilities(request.model)?.reasoningEffort?.values + return levels?.includes(effort) ? (effort as ReasoningEffort) : undefined +} + +export const minimaxProvider: ProviderConfig = { + id: 'minimax', + name: 'MiniMax', + description: "MiniMax's M-series models via an OpenAI-compatible API", + version: '1.0.0', + models: getProviderModels('minimax'), + defaultModel: getProviderDefaultModel('minimax'), + executeRequest: async ( + request: ProviderRequest + ): Promise => { + if (!request.apiKey) throw new Error('API key is required for MiniMax') + const client = new OpenAI({ + ...openAICompatTransport(), + fetch: outboundFetch, + apiKey: request.apiKey, + baseURL: MINIMAX_BASE_URL, + }) + const tools = supportsForcedToolUse(request.model) + ? request.tools + : request.tools?.map((tool) => + tool.usageControl === 'force' ? { ...tool, usageControl: 'auto' as const } : tool + ) + const reasoningEffort = resolveReasoningEffort(request) + return executeChatCompletionRequest( + { ...request, tools }, + { + providerId: 'minimax', + providerName: 'MiniMax', + client, + requestedModel: resolveMiniMaxModel(request.model), + reportedModel: request.model, + logger, + applyResponseFormat: applyPromptSchema, + reasoningFields: ['reasoning_content'], + recordPendingUsage: true, + requestFields: { + reasoning_split: true, + ...(reasoningEffort ? { reasoning_effort: reasoningEffort } : {}), + }, + } + ) + }, +} diff --git a/apps/sim/providers/models.test.ts b/apps/sim/providers/models.test.ts index c5b5df6109c..f21bea35546 100644 --- a/apps/sim/providers/models.test.ts +++ b/apps/sim/providers/models.test.ts @@ -13,8 +13,10 @@ import { isModelDeprecated, orderModelIdsByReleaseDate, PROVIDER_DEFINITIONS, + updateBasetenModels, updateFireworksModels, updateOllamaModels, + updateTogetherModels, } from '@/providers/models' describe('custom cloud model routing', () => { @@ -305,6 +307,7 @@ describe('zai provider definition', () => { describe('kimi provider definition', () => { const expectedModels = [ + { id: 'kimi-k3.1-pro', contextWindow: 1048576 }, { id: 'kimi-k3', contextWindow: 1048576 }, { id: 'kimi-k2.7-code', contextWindow: 262144 }, { id: 'kimi-k2.7-code-highspeed', contextWindow: 262144 }, @@ -319,16 +322,20 @@ describe('kimi provider definition', () => { }) }) -describe('fireworks static catalog (the sim-auto pool)', () => { - const poolModels = ['fireworks/glm-5.3', 'fireworks/kimi-k3.1-pro', 'fireworks/kimi-k3'] - - it('prices every pool model so hosted usage is billable', () => { - for (const model of poolModels) { +describe('hosted models', () => { + it('prices every hosted model, so platform-key inference is always billed', () => { + const unpriced = getHostedModels().filter((model) => { const pricing = getModelPricing(model) - expect(pricing?.input).toBeGreaterThan(0) - expect(pricing?.output).toBeGreaterThan(0) - } + // Evaluation models return a score, not generated text, so they bill input only. + const billsOutput = !getModelCapabilities(model)?.evaluation + return !(pricing && pricing.input > 0 && (pricing.output > 0 || !billsOutput)) + }) + expect(unpriced).toEqual([]) }) +}) + +describe('fireworks static catalog (the hosted catalog)', () => { + const poolModels = ['fireworks/glm-5.3', 'fireworks/kimi-k3.1-pro', 'fireworks/kimi-k3'] it('survives a dynamic model sync, which merges rather than replaces', () => { updateFireworksModels(['fireworks/accounts/acme/models/custom']) @@ -350,6 +357,35 @@ describe('fireworks static catalog (the sim-auto pool)', () => { }) }) +describe.each([ + { + provider: 'together', + update: updateTogetherModels, + catalogModel: 'together/moonshotai/Kimi-K3.1-Pro', + }, + { + provider: 'baseten', + update: updateBasetenModels, + catalogModel: 'baseten/moonshotai/Kimi-K3.1-Pro', + }, +] as const)('$provider static catalog (BYOK-only)', ({ provider, update, catalogModel }) => { + it('keeps its priced entries across a dynamic sync and appends discovered ids once', () => { + const originalModels = PROVIDER_DEFINITIONS[provider].models + try { + update([catalogModel.toLowerCase(), `${provider}/acme/custom`]) + + const ids = getProviderModels(provider) + expect(ids.filter((id) => id.toLowerCase() === catalogModel.toLowerCase())).toEqual([ + catalogModel, + ]) + expect(ids).toContain(`${provider}/acme/custom`) + expect(getModelPricing(catalogModel)?.input).toBeGreaterThan(0) + } finally { + PROVIDER_DEFINITIONS[provider].models = originalModels + } + }) +}) + describe('getStaticProviderModels', () => { it('retains public built-in models after private models are discovered', () => { const originalModels = PROVIDER_DEFINITIONS.fireworks.models diff --git a/apps/sim/providers/models.ts b/apps/sim/providers/models.ts index c196b87526c..7fea1d087f8 100644 --- a/apps/sim/providers/models.ts +++ b/apps/sim/providers/models.ts @@ -35,9 +35,12 @@ import { xAIIcon, ZaiIcon, } from '@/components/icons' +import { MiniMaxIcon } from '@/components/icons/minimax' import { NebiusIcon } from '@/components/icons/nebius' +import { QwenIcon } from '@/components/icons/qwen' import { ThinkingMachinesIcon } from '@/components/icons/thinking-machines' import { LARGE_VALUE_THRESHOLD_BYTES } from '@/lib/execution/payloads/large-value-ref' +import type { OpenModelId } from '@/providers/open-models' import type { ModelPricing, ProviderId } from '@/providers/types' /** How a model's thinking appears on the agent-events stream. */ @@ -114,6 +117,12 @@ interface ModelDefinition { featured?: boolean recommended?: boolean speedOptimized?: boolean + /** + * The open-weight model this entry serves when other providers serve the same weights. + * Presentation only: pickers group the hosts under one readable name (`open-models.ts`); + * the id, routing, and billing are unchanged. + */ + openModel?: OpenModelId /** * Post-availability lifecycle, mirroring `BlockConfig.sunset`. `legacy` — * superseded but still callable (amber); `deprecated` — the provider retired @@ -225,16 +234,25 @@ export const PROVIDER_DEFINITIONS: Record = { }, contextInformationAvailable: false, /** - * Static Fireworks serverless entries: the sim-auto routing pool. These are - * hosted-billable (platform FIREWORKS_API_KEY) and priced at the Fireworks - * serverless rate, which differs from the vendors' native rates. The GLM - * models are text-only; the Kimi models also take images through - * `image_url` parts. User-configured `fireworks/` ids stay - * dynamic/BYO-key. + * Static Fireworks serverless entries: the hosted catalog. Each is + * hosted-billable on the platform `FIREWORKS_API_KEY` and priced at the + * Fireworks serverless rate, which differs from the vendor's native rate. + * User-configured `fireworks/` ids stay dynamic and BYOK. + * + * Image input is decided per provider, not per model: Sim sends image + * attachments to every Fireworks model as `image_url` parts. Fireworks + * serves images on all of these except GLM-5.3 and GLM-5.2, which are + * text-only and reject an image request. + * + * The sim-auto routing pool is a separate, explicit subset (`POOL` in + * `lib/model-router/resolve.ts`), so adding an entry here never changes + * routing. Each short id needs its serverless path in + * `providers/fireworks/utils.ts`. */ models: [ { id: 'fireworks/glm-5.3', + openModel: 'glm-5.3', pricing: { input: 1.4, cachedInput: 0.26, @@ -245,12 +263,82 @@ export const PROVIDER_DEFINITIONS: Record = { toolUsageControl: true, maxOutputTokens: 1040000, }, - contextWindow: 1040000, + contextWindow: 1048576, releaseDate: '2026-08-18', recommended: true, }, + { + id: 'fireworks/minimax-m3.1-flash', + openModel: 'minimax-m3.1-flash', + pricing: { + input: 0.15, + cachedInput: 0.015, + output: 0.6, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048576, + }, + { + id: 'fireworks/hy4-flash', + pricing: { + input: 0.07, + cachedInput: 0.003, + output: 0.281, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 524288, + }, + { + id: 'fireworks/deepseek-v4.1-flash-1017', + openModel: 'deepseek-v4.1-flash-1017', + pricing: { + input: 0.3, + cachedInput: 0.006, + output: 1.2, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048576, + }, + { + id: 'fireworks/deepseek-v4.1-flash', + openModel: 'deepseek-v4.1-flash', + pricing: { + input: 0.3, + cachedInput: 0.006, + output: 1.2, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048576, + }, + { + id: 'fireworks/glm-5.3-flash', + openModel: 'glm-5.3-flash', + pricing: { + input: 0.15, + cachedInput: 0.03, + output: 0.5, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048576, + }, { id: 'fireworks/glm-5.2', + openModel: 'glm-5.2', pricing: { input: 1.4, cachedInput: 0.14, @@ -267,6 +355,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'fireworks/kimi-k3.1-pro', + openModel: 'kimi-k3.1-pro', pricing: { input: 2.0, cachedInput: 0.2, @@ -278,11 +367,12 @@ export const PROVIDER_DEFINITIONS: Record = { maxOutputTokens: 1048576, }, contextWindow: 1048576, - releaseDate: '2026-11-14', + releaseDate: '2026-10-23', recommended: true, }, { id: 'fireworks/kimi-k3', + openModel: 'kimi-k3', pricing: { input: 3.0, cachedInput: 0.3, @@ -315,6 +405,7 @@ export const PROVIDER_DEFINITIONS: Record = { models: [ { id: 'nebius/deepseek-ai/DeepSeek-V4.1-Flash', + openModel: 'deepseek-v4.1-flash', pricing: { input: 0.3, output: 1.2, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: false, nativeStructuredOutputs: false }, contextWindow: 1048000, @@ -348,6 +439,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nebius/MiniMaxAI/MiniMax-M3', + openModel: 'minimax-m3', pricing: { input: 0.3, output: 1.2, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 1048576, @@ -368,6 +460,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nebius/moonshotai/Kimi-K3', + openModel: 'kimi-k3', pricing: { input: 3, output: 15, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 1024000, @@ -394,6 +487,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nebius/nvidia/Nemotron-3-Ultra-550b-a55b', + openModel: 'nemotron-3-ultra', pricing: { input: 1, output: 3, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 1048576, @@ -406,6 +500,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nebius/openai/gpt-oss-120b', + openModel: 'gpt-oss-120b', pricing: { input: 0.15, output: 0.6, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: true }, contextWindow: 131072, @@ -439,6 +534,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nebius/Qwen/Qwen3.8-27B', + openModel: 'qwen3.8-27b', pricing: { input: 0.45, output: 3, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 262144, @@ -452,18 +548,21 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nebius/zai-org/GLM-5.2', + openModel: 'glm-5.2', pricing: { input: 1.4, output: 4.4, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 1048576, }, { id: 'nebius/zai-org/GLM-5.3', + openModel: 'glm-5.3', pricing: { input: 1.4, output: 4.4, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 1024000, }, { id: 'nebius/zai-org/GLM-5.3-Flash', + openModel: 'glm-5.3-flash', pricing: { input: 0.15, output: 0.5, updatedAt: '2026-10-07' }, capabilities: { toolUsageControl: true, nativeStructuredOutputs: false }, contextWindow: 1024000, @@ -506,6 +605,116 @@ export const PROVIDER_DEFINITIONS: Record = { }, ], }, + minimax: { + id: 'minimax', + name: 'MiniMax', + description: "MiniMax's M-series models via an OpenAI-compatible API", + defaultModel: 'minimax/minimax-m3.1-flash', + modelPatterns: [/^minimax\//], + icon: MiniMaxIcon, + color: '#E21680', + capabilities: { + toolUsageControl: true, + forcedToolUse: false, + }, + models: [ + { + id: 'minimax/minimax-m3.1-flash', + openModel: 'minimax-m3.1-flash', + pricing: { input: 0.15, cachedInput: 0.015, output: 0.6, updatedAt: '2026-12-01' }, + capabilities: { + reasoningEffort: { + values: ['low', 'medium', 'high', 'xhigh', 'max'], + }, + maxOutputTokens: 524288, + }, + contextWindow: 1000000, + releaseDate: '2026-10-19', + recommended: true, + }, + { + id: 'minimax/minimax-m3', + openModel: 'minimax-m3', + pricing: { + input: 0.3, + cachedInput: 0.06, + output: 1.2, + tiers: [{ aboveInputTokens: 512000, input: 0.6, cachedInput: 0.12, output: 2.4 }], + updatedAt: '2026-12-01', + }, + capabilities: { + maxOutputTokens: 524288, + }, + contextWindow: 1000000, + releaseDate: '2026-06-01', + }, + ], + }, + alibaba: { + id: 'alibaba', + name: 'Alibaba Cloud', + description: 'Qwen models via Alibaba Cloud Model Studio', + defaultModel: 'qwen4-max', + // No fallback pattern: a `/^qwen/` match would claim Qwen weights other providers host. + modelPatterns: [], + icon: QwenIcon, + color: '#082DFF', + capabilities: { + temperature: { min: 0, max: 1.5 }, + toolUsageControl: true, + }, + models: [ + { + id: 'qwen4-max', + pricing: { input: 1.5, output: 4.5, updatedAt: '2026-12-01' }, + capabilities: { + reasoningEffort: { values: ['none', 'low', 'high', 'xhigh'] }, + maxOutputTokens: 262144, + }, + contextWindow: 1000000, + releaseDate: '2026-11-16', + recommended: true, + }, + { + id: 'qwen3.7-plus', + pricing: { + input: 0.4, + cachedInput: 0.08, + output: 1.6, + tiers: [{ aboveInputTokens: 256000, input: 1.2, cachedInput: 0.24, output: 4.8 }], + updatedAt: '2026-12-01', + }, + capabilities: { + thinking: { levels: ['enabled'], default: 'enabled' }, + maxOutputTokens: 131072, + }, + contextWindow: 1000000, + releaseDate: '2026-06-01', + }, + { + id: 'qwen3.8-flash', + pricing: { input: 0.15, cachedInput: 0.016, output: 0.47, updatedAt: '2026-12-01' }, + capabilities: { + reasoningEffort: { values: ['none', 'low', 'medium', 'xhigh'] }, + maxOutputTokens: 131072, + }, + contextWindow: 1000000, + releaseDate: '2026-08-26', + speedOptimized: true, + }, + { + id: 'qwen3.8-27b', + openModel: 'qwen3.8-27b', + pricing: { input: 0.5, cachedInput: 0.1, output: 3.0, updatedAt: '2026-12-01' }, + capabilities: { + reasoningEffort: { values: ['none', 'low', 'medium', 'xhigh'] }, + maxOutputTokens: 131072, + }, + contextWindow: 1000000, + releaseDate: '2026-08-17', + }, + ], + }, together: { id: 'together', fileAttachment: { maxBytes: 50 * 1024 * 1024, strategy: 'remote-url' }, @@ -521,7 +730,97 @@ export const PROVIDER_DEFINITIONS: Record = { toolUsageControl: true, }, contextInformationAvailable: false, - models: [], + /** + * Static priced Together serverless entries, merged ahead of the workspace's + * dynamic listing by `updateTogetherModels`. BYOK-only: Together is never in + * `getHostedModels()`, so these are never billed or served on Sim's key. + */ + models: [ + { + id: 'together/moonshotai/Kimi-K3.1-Pro', + openModel: 'kimi-k3.1-pro', + pricing: { + input: 2.0, + cachedInput: 0.2, + output: 10.0, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048576, + }, + { + id: 'together/MiniMaxAI/MiniMax-M3.1-Flash', + openModel: 'minimax-m3.1-flash', + pricing: { + input: 0.15, + cachedInput: 0.015, + output: 0.6, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048576, + }, + { + id: 'together/deepseek-ai/DeepSeek-V4.1-Flash-1017', + openModel: 'deepseek-v4.1-flash-1017', + pricing: { + input: 0.3, + cachedInput: 0.006, + output: 1.2, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1000000, + }, + { + id: 'together/deepseek-ai/DeepSeek-V4.1-Flash', + openModel: 'deepseek-v4.1-flash', + pricing: { + input: 0.3, + cachedInput: 0.006, + output: 1.2, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1000000, + }, + { + id: 'together/zai-org/GLM-5.3', + openModel: 'glm-5.3', + pricing: { + input: 1.4, + cachedInput: 0.26, + output: 4.4, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048575, + }, + { + id: 'together/zai-org/GLM-5.3-Flash', + openModel: 'glm-5.3-flash', + pricing: { + input: 0.15, + cachedInput: 0.03, + output: 0.5, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1048575, + }, + ], }, baseten: { id: 'baseten', @@ -538,7 +837,74 @@ export const PROVIDER_DEFINITIONS: Record = { toolUsageControl: true, }, contextInformationAvailable: false, - models: [], + /** + * Static priced Baseten Model API entries, merged ahead of the workspace's + * dynamic listing by `updateBasetenModels`. BYOK-only: Baseten is never in + * `getHostedModels()`, so these are never billed or served on Sim's key. + * Baseten documents limits in thousands of tokens (`1048k`), so context and + * output caps are the documented figure, a floor of the exact limit. + */ + models: [ + { + id: 'baseten/moonshotai/Kimi-K3.1-Pro', + openModel: 'kimi-k3.1-pro', + pricing: { + input: 2.0, + cachedInput: 0.2, + output: 10.0, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + }, + contextWindow: 1000000, + }, + { + id: 'baseten/deepseek-ai/DeepSeek-V4.1-Flash-1017', + openModel: 'deepseek-v4.1-flash-1017', + pricing: { + input: 0.3, + cachedInput: 0.007, + output: 1.2, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + maxOutputTokens: 262000, + }, + contextWindow: 1048000, + }, + { + id: 'baseten/zai-org/GLM-5.3', + openModel: 'glm-5.3', + pricing: { + input: 1.4, + cachedInput: 0.14, + output: 4.4, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + maxOutputTokens: 262000, + }, + contextWindow: 1048000, + }, + { + id: 'baseten/zai-org/GLM-5.3-Flash', + openModel: 'glm-5.3-flash', + pricing: { + input: 0.15, + cachedInput: 0.03, + output: 0.5, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + maxOutputTokens: 262000, + }, + contextWindow: 1048000, + }, + ], }, openrouter: { id: 'openrouter', @@ -4027,6 +4393,7 @@ export const PROVIDER_DEFINITIONS: Record = { models: [ { id: 'cerebras/qwen-3.8-27b', + openModel: 'qwen3.8-27b', pricing: { input: 0.99, output: 1.49, @@ -4044,6 +4411,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'cerebras/gpt-oss-120b', + openModel: 'gpt-oss-120b', pricing: { input: 0.35, output: 0.75, @@ -4128,6 +4496,7 @@ export const PROVIDER_DEFINITIONS: Record = { models: [ { id: 'groq/openai/gpt-oss-120b', + openModel: 'gpt-oss-120b', pricing: { input: 0.15, cachedInput: 0.075, @@ -4146,6 +4515,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'groq/openai/gpt-oss-20b', + openModel: 'gpt-oss-20b', pricing: { input: 0.075, cachedInput: 0.0375, @@ -4198,6 +4568,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'groq/qwen/qwen3.8-27b', + openModel: 'qwen3.8-27b', pricing: { input: 0.8, output: 4.0, @@ -4493,6 +4864,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'nvidia/nemotron-3-ultra-550b-a55b', + openModel: 'nemotron-3-ultra', pricing: { input: 0.5, output: 2.2, @@ -4571,8 +4943,28 @@ export const PROVIDER_DEFINITIONS: Record = { toolUsageControl: true, }, models: [ + { + id: 'kimi-k3.1-pro', + openModel: 'kimi-k3.1-pro', + pricing: { + input: 2.0, + cachedInput: 0.2, + output: 10.0, + updatedAt: '2026-12-01', + }, + capabilities: { + toolUsageControl: true, + reasoningEffort: { + values: ['low', 'high', 'max'], + }, + maxOutputTokens: 1048576, + }, + contextWindow: 1048576, + releaseDate: '2026-10-23', + }, { id: 'kimi-k3', + openModel: 'kimi-k3', pricing: { input: 3.0, cachedInput: 0.3, @@ -5088,6 +5480,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'kie/kimi-k3', + openModel: 'kimi-k3', pricing: { input: 2.4, cachedInput: 0.24, @@ -5121,6 +5514,7 @@ export const PROVIDER_DEFINITIONS: Record = { models: [ { id: 'glm-5.3', + openModel: 'glm-5.3', pricing: { input: 1.4, cachedInput: 0.26, @@ -5162,6 +5556,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'glm-5.3-flash', + openModel: 'glm-5.3-flash', pricing: { input: 0.15, cachedInput: 0.03, @@ -5183,6 +5578,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'glm-5.2', + openModel: 'glm-5.2', pricing: { input: 1.4, cachedInput: 0.26, @@ -5222,6 +5618,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'glm-5', + openModel: 'glm-5', pricing: { input: 1.0, cachedInput: 0.2, @@ -5469,6 +5866,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'zai-glm-5-3', + openModel: 'glm-5.3', pricing: { input: 1.4, cachedInput: 0.14, @@ -5484,6 +5882,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'zai-glm-5-2', + openModel: 'glm-5.2', pricing: { input: 1.4, cachedInput: 0.14, @@ -6271,6 +6670,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'bedrock/openai.gpt-oss-120b-1:0', + openModel: 'gpt-oss-120b', pricing: { input: 0.15, output: 0.6, @@ -6285,6 +6685,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'bedrock/openai.gpt-oss-20b-1:0', + openModel: 'gpt-oss-20b', pricing: { input: 0.07, output: 0.3, @@ -6313,6 +6714,7 @@ export const PROVIDER_DEFINITIONS: Record = { }, { id: 'bedrock/zai.glm-5', + openModel: 'glm-5', pricing: { input: 1, output: 3.2, @@ -7047,7 +7449,7 @@ export function getHostedModels(): string[] { ...getProviderModels('zai'), ...getProviderModels('xai'), ...getProviderModels('kimi'), - // The STATIC Fireworks catalog only (the sim-auto pool, platform key) — + // The STATIC Fireworks catalog only (the hosted catalog, platform key) — // deliberately not the live provider list, which `updateFireworksModels` // merges a workspace's own dynamic ids into. Those must never enter the // hosted set: it gates both billing and the platform-key handout. @@ -7105,29 +7507,41 @@ export function updateLiteLLMModels(models: string[]): void { PROVIDER_DEFINITIONS.litellm.models = toUnpricedModels(models) } +/** The static priced entries followed by the discovered ids they do not already cover. */ +function mergeDiscoveredModels( + staticModels: ModelDefinition[], + discovered: string[] +): ModelDefinition[] { + const staticIds = new Set(staticModels.map((model) => model.id.toLowerCase())) + return [ + ...staticModels, + ...toUnpricedModels(discovered.filter((modelId) => !staticIds.has(modelId.toLowerCase()))), + ] +} + /** - * The static Fireworks catalog (the hosted sim-auto pool), captured at module - * load before any dynamic sync runs. Hosted billing, pricing, and the agent - * block's API-key condition all key on these ids, so a workspace's own - * Fireworks models are merged on top of them rather than replacing them — - * unlike the other dynamic providers, whose static list is empty. + * The static Fireworks catalog (the hosted catalog the sim-auto pool draws + * from), captured at module load before any dynamic sync runs. Hosted billing, + * pricing, and the agent block's API-key condition all key on these ids, so a + * workspace's own Fireworks models are merged on top of them rather than + * replacing them. */ const STATIC_FIREWORKS_MODELS = PROVIDER_DEFINITIONS.fireworks.models +/** Static priced Together and Baseten entries (BYOK-only), kept across dynamic syncs. */ +const STATIC_TOGETHER_MODELS = PROVIDER_DEFINITIONS.together.models +const STATIC_BASETEN_MODELS = PROVIDER_DEFINITIONS.baseten.models + export function updateFireworksModels(models: string[]): void { - const staticIds = new Set(STATIC_FIREWORKS_MODELS.map((model) => model.id.toLowerCase())) - PROVIDER_DEFINITIONS.fireworks.models = [ - ...STATIC_FIREWORKS_MODELS, - ...toUnpricedModels(models.filter((modelId) => !staticIds.has(modelId.toLowerCase()))), - ] + PROVIDER_DEFINITIONS.fireworks.models = mergeDiscoveredModels(STATIC_FIREWORKS_MODELS, models) } export function updateTogetherModels(models: string[]): void { - PROVIDER_DEFINITIONS.together.models = toUnpricedModels(models) + PROVIDER_DEFINITIONS.together.models = mergeDiscoveredModels(STATIC_TOGETHER_MODELS, models) } export function updateBasetenModels(models: string[]): void { - PROVIDER_DEFINITIONS.baseten.models = toUnpricedModels(models) + PROVIDER_DEFINITIONS.baseten.models = mergeDiscoveredModels(STATIC_BASETEN_MODELS, models) } export function updateOllamaCloudModels(models: string[]): void { diff --git a/apps/sim/providers/nebius/index.ts b/apps/sim/providers/nebius/index.ts index 10f6e167ef6..566e256040b 100644 --- a/apps/sim/providers/nebius/index.ts +++ b/apps/sim/providers/nebius/index.ts @@ -13,10 +13,10 @@ import { type ChatCompletionPayload, executeChatCompletionRequest, } from '@/providers/openai-compat/chat-completions' +import { applyPromptSchema } from '@/providers/openai-compat/prompt-schema' import { buildJsonSchemaResponseFormat } from '@/providers/response-format' import { openAICompatTransport } from '@/providers/transport' import type { ProviderConfig, ProviderRequest, ProviderResponse } from '@/providers/types' -import { generateSchemaInstructions } from '@/providers/utils' const logger = createLogger('NebiusProvider') @@ -31,13 +31,7 @@ async function applyResponseFormat( payload.response_format = buildJsonSchemaResponseFormat(responseFormat) return messages } - return [ - ...messages, - { - role: 'user', - content: generateSchemaInstructions(responseFormat.schema, responseFormat.name), - }, - ] + return applyPromptSchema(payload, messages, responseFormat) } export const nebiusProvider: ProviderConfig = { diff --git a/apps/sim/providers/open-models.test.ts b/apps/sim/providers/open-models.test.ts new file mode 100644 index 00000000000..0a53c5ae470 --- /dev/null +++ b/apps/sim/providers/open-models.test.ts @@ -0,0 +1,88 @@ +/** + * @vitest-environment node + */ +import { describe, expect, it } from 'vitest' +import { getBaseModelProviders, PROVIDER_DEFINITIONS } from '@/providers/models' +import { + clusterOpenModelHosts, + getOpenModelPresentation, + OPEN_MODELS, + type OpenModelId, +} from '@/providers/open-models' + +const membersByOpenModel = new Map() +for (const [providerId, provider] of Object.entries(PROVIDER_DEFINITIONS)) { + for (const model of provider.models) { + if (!model.openModel) continue + const members = membersByOpenModel.get(model.openModel) ?? [] + members.push({ providerId, modelId: model.id }) + membersByOpenModel.set(model.openModel, members) + } +} + +describe('open model registry', () => { + it('serves every open model from at least two providers, so a group always has hosts to tell apart', () => { + const ungrouped = Object.keys(OPEN_MODELS).filter((id) => { + const members = membersByOpenModel.get(id as OpenModelId) ?? [] + return new Set(members.map((member) => member.providerId)).size < 2 + }) + expect(ungrouped).toEqual([]) + }) + + it('gives each open model at most one member per provider, so hosts read apart', () => { + const clashes = [...membersByOpenModel].flatMap(([openModelId, members]) => { + const providers = members.map((member) => member.providerId) + return providers.length === new Set(providers).size ? [] : [openModelId] + }) + expect(clashes).toEqual([]) + }) + + it('names a lab provider only when the catalog defines it', () => { + const unknown = Object.entries(OPEN_MODELS).flatMap(([id, openModel]) => + 'labProviderId' in openModel && !PROVIDER_DEFINITIONS[openModel.labProviderId] ? [id] : [] + ) + expect(unknown).toEqual([]) + }) + + it('gives every open model a distinct name', () => { + const names = Object.values(OPEN_MODELS).map((openModel) => openModel.name) + expect(names.length).toBe(new Set(names).size) + }) + + it('presents a member under the lowercased id the base model list delivers', () => { + const listedIds = new Set(Object.keys(getBaseModelProviders())) + const unpresented = [...membersByOpenModel.values()] + .flat() + .map((member) => member.modelId.toLowerCase()) + .filter((id) => listedIds.has(id) && !getOpenModelPresentation(id)) + expect(unpresented).toEqual([]) + }) + + it("finds every member by its provider's name, the lab's own provider included", () => { + const unfindable = [...membersByOpenModel.values()].flat().filter(({ providerId, modelId }) => { + const providerName = PROVIDER_DEFINITIONS[providerId].name + return !getOpenModelPresentation(modelId)?.searchTerms.includes(providerName) + }) + expect(unfindable).toEqual([]) + }) +}) + +describe('clusterOpenModelHosts', () => { + it("gathers an open model's hosts at its first host, lab first, leaving every other option in place", () => { + const options = [ + { id: 'nebius/moonshotai/kimi-k3' }, + { id: 'gpt-4o' }, + { id: 'kimi-k3' }, + { id: 'claude-sonnet-5-5' }, + { id: 'fireworks/kimi-k3' }, + ] + + expect(clusterOpenModelHosts(options).map((option) => option.id)).toEqual([ + 'kimi-k3', + 'nebius/moonshotai/kimi-k3', + 'fireworks/kimi-k3', + 'gpt-4o', + 'claude-sonnet-5-5', + ]) + }) +}) diff --git a/apps/sim/providers/open-models.ts b/apps/sim/providers/open-models.ts new file mode 100644 index 00000000000..0feb8710020 --- /dev/null +++ b/apps/sim/providers/open-models.ts @@ -0,0 +1,136 @@ +import { PROVIDER_DEFINITIONS } from '@/providers/models' +import type { ProviderId } from '@/providers/types' + +/** + * One open-weight model that more than one provider serves. Membership is not listed + * here: a catalog entry joins by naming the model in its `openModel` field in + * `models.ts`, so a member is always an exact, static model id and can belong to one + * open model at most. + */ +interface OpenModelDefinition { + /** Readable model name shown in pickers in place of the host-prefixed ids. */ + name: string + /** The lab that publishes the weights. */ + lab: string + /** + * The lab's own provider. Its member is tagged with the lab name; every other + * member is tagged `via `. + */ + labProviderId?: ProviderId +} + +/** + * Open-weight models grouped across hosts in model pickers. Group two catalog entries + * only when they serve the same weights: a snapshot, a size, or a speed tier of the same + * family is a different model and stays ungrouped. + */ +export const OPEN_MODELS = { + 'glm-5.3': { name: 'GLM 5.3', lab: 'Z.ai', labProviderId: 'zai' }, + 'glm-5.3-flash': { name: 'GLM 5.3 Flash', lab: 'Z.ai', labProviderId: 'zai' }, + 'glm-5.2': { name: 'GLM 5.2', lab: 'Z.ai', labProviderId: 'zai' }, + 'glm-5': { name: 'GLM 5', lab: 'Z.ai', labProviderId: 'zai' }, + 'kimi-k3.1-pro': { name: 'Kimi K3.1 Pro', lab: 'Moonshot', labProviderId: 'kimi' }, + 'kimi-k3': { name: 'Kimi K3', lab: 'Moonshot', labProviderId: 'kimi' }, + 'minimax-m3.1-flash': { name: 'MiniMax M3.1 Flash', lab: 'MiniMax', labProviderId: 'minimax' }, + 'minimax-m3': { name: 'MiniMax M3', lab: 'MiniMax', labProviderId: 'minimax' }, + 'deepseek-v4.1-flash-1017': { name: 'DeepSeek V4.1 Flash 1017', lab: 'DeepSeek' }, + 'deepseek-v4.1-flash': { name: 'DeepSeek V4.1 Flash', lab: 'DeepSeek' }, + 'gpt-oss-120b': { name: 'gpt-oss-120b', lab: 'OpenAI' }, + 'gpt-oss-20b': { name: 'gpt-oss-20b', lab: 'OpenAI' }, + 'qwen3.8-27b': { name: 'Qwen3.8 27B', lab: 'Qwen', labProviderId: 'alibaba' }, + 'nemotron-3-ultra': { name: 'Nemotron 3 Ultra', lab: 'NVIDIA', labProviderId: 'nvidia' }, +} as const satisfies Record + +export type OpenModelId = keyof typeof OPEN_MODELS + +/** How a picker presents one host's offering of an open model. */ +interface OpenModelPresentation { + /** Readable model name, shared by every host of the model. */ + name: string + /** The lab name on the lab's own provider, otherwise `via `. */ + host: string + /** Lab and host names, so a search for either finds the option. */ + searchTerms: readonly string[] +} + +interface OpenModelMember { + openModelId: OpenModelId + /** Served by the lab's own provider rather than a re-host. */ + onLabProvider: boolean + presentation: OpenModelPresentation +} + +/** + * Lowercased model id → its open model, built once from the static catalog. Runtime-discovered + * ids carry no `openModel` field, so they are never members. + */ +const OPEN_MODEL_MEMBERS: ReadonlyMap = new Map( + Object.entries(PROVIDER_DEFINITIONS).flatMap(([providerId, provider]) => + provider.models.flatMap((model): [string, OpenModelMember][] => { + if (!model.openModel) return [] + const openModel: OpenModelDefinition = OPEN_MODELS[model.openModel] + const isLabProvider = openModel.labProviderId === providerId + return [ + [ + model.id.toLowerCase(), + { + openModelId: model.openModel, + onLabProvider: isLabProvider, + presentation: { + name: openModel.name, + host: isLabProvider ? openModel.lab : `via ${provider.name}`, + searchTerms: [...new Set([openModel.lab, provider.name])], + }, + }, + ], + ] + }) + ) +) + +type PickerOption = string | { id: string } + +function idOf(option: PickerOption): string { + return typeof option === 'string' ? option : option.id +} + +function getOpenModelMember(modelId: string): OpenModelMember | undefined { + return OPEN_MODEL_MEMBERS.get(modelId.toLowerCase()) +} + +/** Picker presentation for an open-model member, or `null` to show the raw id as before. */ +export function getOpenModelPresentation(modelId: string): OpenModelPresentation | null { + return getOpenModelMember(modelId)?.presentation ?? null +} + +/** + * Reorders picker options so every open model's hosts sit together, at the position of its + * first host in `options`, with the lab's own provider first. Every other option keeps its + * place, so the list reads as it did apart from the clustered hosts. Presentation only: the + * published option order (block catalog, Copilot) is never clustered. + */ +export function clusterOpenModelHosts(options: readonly T[]): T[] { + const hostsByModel = new Map() + for (const option of options) { + const member = getOpenModelMember(idOf(option)) + if (!member) continue + const hosts = hostsByModel.get(member.openModelId) + if (hosts) hosts.push(option) + else hostsByModel.set(member.openModelId, [option]) + } + + const clustered: T[] = [] + for (const option of options) { + const member = getOpenModelMember(idOf(option)) + if (!member) { + clustered.push(option) + continue + } + const hosts = hostsByModel.get(member.openModelId) + if (!hosts) continue + hostsByModel.delete(member.openModelId) + const labHost = hosts.find((host) => getOpenModelMember(idOf(host))?.onLabProvider) + clustered.push(...(labHost ? [labHost, ...hosts.filter((host) => host !== labHost)] : hosts)) + } + return clustered +} diff --git a/apps/sim/providers/openai-compat/chat-completions.ts b/apps/sim/providers/openai-compat/chat-completions.ts index ceb93363731..ef0a3a60adf 100644 --- a/apps/sim/providers/openai-compat/chat-completions.ts +++ b/apps/sim/providers/openai-compat/chat-completions.ts @@ -56,10 +56,27 @@ import { export type ChatCompletionPayload = ChatCompletionCreateParamsNonStreaming & { provider?: { require_parameters?: boolean } + /** MiniMax: return thinking on `reasoning_content` instead of `` tags in `content`. */ + reasoning_split?: boolean + /** Alibaba Model Studio: switches a hybrid Qwen model's thinking mode on or off. */ + enable_thinking?: boolean } +type ChatCompletionRequestFields = Pick< + ChatCompletionPayload, + 'reasoning_effort' | 'reasoning_split' | 'enable_thinking' +> + interface ChatCompletionExecutionConfig { - providerId: 'baseten' | 'together' | 'fireworks' | 'openrouter' | 'nebius' | 'thinkingmachines' + providerId: + | 'baseten' + | 'together' + | 'fireworks' + | 'openrouter' + | 'nebius' + | 'thinkingmachines' + | 'minimax' + | 'alibaba' providerName: string client: OpenAI requestedModel: string @@ -74,8 +91,22 @@ interface ChatCompletionExecutionConfig { ) => Promise reasoningFields: readonly OpenAICompatReasoningField[] preserveReasoningDetails?: boolean - /** Together and OpenRouter account for the pending turn when their tool loop reaches its cap. */ + /** Records the pending turn's usage in conversation history when the tool loop hits its cap. */ recordPendingUsage?: boolean + /** + * Vendor fields sent on every model call of the request, the final ones included. A function + * receives whether the call streams, for hosts whose fields differ between the two. + */ + requestFields?: + | ChatCompletionRequestFields + | ((call: { stream: boolean }) => ChatCompletionRequestFields) +} + +function resolveRequestFields( + requestFields: ChatCompletionExecutionConfig['requestFields'], + stream: boolean +): ChatCompletionRequestFields | undefined { + return typeof requestFields === 'function' ? requestFields({ stream }) : requestFields } /** Runs the shared Chat Completions request, tool loop and settled-stream lifecycle. */ @@ -150,6 +181,7 @@ export async function executeChatCompletionRequest( if (request.stream && (!tools || tools.length === 0 || !hasActiveTools)) { const streamingParams: ChatCompletionCreateParamsStreaming = { ...payload, + ...resolveRequestFields(config.requestFields, true), stream: true, stream_options: { include_usage: true }, } @@ -185,6 +217,7 @@ export async function executeChatCompletionRequest( return streamingResult } + Object.assign(payload, resolveRequestFields(config.requestFields, false)) const initialCallTime = Date.now() const originalToolChoice = payload.tool_choice const forcedTools = preparedTools?.forcedTools || [] @@ -548,6 +581,7 @@ export async function executeChatCompletionRequest( const finalPayload: ChatCompletionPayload = { model: payload.model, messages: [...currentMessages], + ...resolveRequestFields(config.requestFields, false), } if (payload.temperature !== undefined) { finalPayload.temperature = payload.temperature diff --git a/apps/sim/providers/openai-compat/prompt-schema.ts b/apps/sim/providers/openai-compat/prompt-schema.ts new file mode 100644 index 00000000000..1ad5a1342a4 --- /dev/null +++ b/apps/sim/providers/openai-compat/prompt-schema.ts @@ -0,0 +1,22 @@ +import type { ChatCompletionMessageParam } from 'openai/resources/chat/completions' +import type { ChatCompletionPayload } from '@/providers/openai-compat/chat-completions' +import type { ProviderRequest } from '@/providers/types' +import { generateSchemaInstructions } from '@/providers/utils' + +/** + * Structured output for a Chat Completions host without a usable `response_format`: the + * schema travels as a trailing user message, and the payload gets no `response_format`. + */ +export async function applyPromptSchema( + _payload: ChatCompletionPayload, + messages: ChatCompletionMessageParam[], + responseFormat: NonNullable +): Promise { + return [ + ...messages, + { + role: 'user', + content: generateSchemaInstructions(responseFormat.schema, responseFormat.name), + }, + ] +} diff --git a/apps/sim/providers/registry.ts b/apps/sim/providers/registry.ts index 9d9fab67fb1..638a2fc1472 100644 --- a/apps/sim/providers/registry.ts +++ b/apps/sim/providers/registry.ts @@ -1,4 +1,5 @@ import { createLogger } from '@sim/logger' +import { alibabaProvider } from '@/providers/alibaba' import { anthropicProvider } from '@/providers/anthropic' import { azureAnthropicProvider } from '@/providers/azure-anthropic' import { azureOpenAIProvider } from '@/providers/azure-openai' @@ -13,6 +14,7 @@ import { kieProvider } from '@/providers/kie' import { kimiProvider } from '@/providers/kimi' import { litellmProvider } from '@/providers/litellm' import { metaProvider } from '@/providers/meta' +import { minimaxProvider } from '@/providers/minimax' import { mistralProvider } from '@/providers/mistral' import { nebiusProvider } from '@/providers/nebius' import { nvidiaProvider } from '@/providers/nvidia' @@ -59,6 +61,8 @@ const providerRegistry: Record = { baseten: basetenProvider, nebius: nebiusProvider, thinkingmachines: thinkingMachinesProvider, + minimax: minimaxProvider, + alibaba: alibabaProvider, ollama: ollamaProvider, 'ollama-cloud': ollamaCloudProvider, bedrock: bedrockProvider, diff --git a/apps/sim/providers/thinkingmachines/index.ts b/apps/sim/providers/thinkingmachines/index.ts index 8eb07ba1aba..857c64bb7b0 100644 --- a/apps/sim/providers/thinkingmachines/index.ts +++ b/apps/sim/providers/thinkingmachines/index.ts @@ -1,6 +1,5 @@ import { createLogger } from '@sim/logger' import OpenAI from 'openai' -import type { ChatCompletionMessageParam } from 'openai/resources/chat/completions' import { outboundFetch } from '@/lib/core/network/outbound-fetch.server' import type { StreamingExecution } from '@/executor/types' import { @@ -8,13 +7,10 @@ import { getProviderModels, supportsForcedToolUse, } from '@/providers/models' -import { - type ChatCompletionPayload, - executeChatCompletionRequest, -} from '@/providers/openai-compat/chat-completions' +import { executeChatCompletionRequest } from '@/providers/openai-compat/chat-completions' +import { applyPromptSchema } from '@/providers/openai-compat/prompt-schema' import { openAICompatTransport } from '@/providers/transport' import type { ProviderConfig, ProviderRequest, ProviderResponse } from '@/providers/types' -import { generateSchemaInstructions } from '@/providers/utils' const logger = createLogger('ThinkingMachinesProvider') @@ -38,21 +34,6 @@ function resolveTinkerModel(model: string): string { return remainder.startsWith('tinker://') ? remainder : model } -/** Tinker documents no response_format support, so schemas travel as prompt instructions. */ -async function applyResponseFormat( - _payload: ChatCompletionPayload, - messages: ChatCompletionMessageParam[], - responseFormat: NonNullable -): Promise { - return [ - ...messages, - { - role: 'user', - content: generateSchemaInstructions(responseFormat.schema, responseFormat.name), - }, - ] -} - export const thinkingMachinesProvider: ProviderConfig = { id: 'thinkingmachines', name: 'Thinking Machines', @@ -84,7 +65,7 @@ export const thinkingMachinesProvider: ProviderConfig = { requestedModel: resolveTinkerModel(request.model), reportedModel: request.model, logger, - applyResponseFormat, + applyResponseFormat: applyPromptSchema, reasoningFields: ['reasoning_content'], recordPendingUsage: true, } diff --git a/apps/sim/providers/types.ts b/apps/sim/providers/types.ts index 0dcd6b567f4..a424c868abb 100644 --- a/apps/sim/providers/types.ts +++ b/apps/sim/providers/types.ts @@ -31,6 +31,8 @@ export type ProviderId = | 'baseten' | 'nebius' | 'thinkingmachines' + | 'minimax' + | 'alibaba' | 'vllm' | 'litellm' | 'bedrock' diff --git a/apps/sim/providers/utils.ts b/apps/sim/providers/utils.ts index 3faeeb5ff7b..4b4ca66d7be 100644 --- a/apps/sim/providers/utils.ts +++ b/apps/sim/providers/utils.ts @@ -172,6 +172,8 @@ export const providers: Record = { baseten: buildProviderMetadata('baseten'), nebius: buildProviderMetadata('nebius'), thinkingmachines: buildProviderMetadata('thinkingmachines'), + minimax: buildProviderMetadata('minimax'), + alibaba: buildProviderMetadata('alibaba'), } export function updateOllamaProviderModels(models: string[]): void { diff --git a/apps/sim/tools/types.ts b/apps/sim/tools/types.ts index 62ec21ac6f9..3500a81d200 100644 --- a/apps/sim/tools/types.ts +++ b/apps/sim/tools/types.ts @@ -22,6 +22,8 @@ export type BYOKProviderId = | 'ollama-cloud' | 'kie' | 'thinkingmachines' + | 'minimax' + | 'alibaba' | 'falai' | 'firecrawl' | 'exa' diff --git a/packages/emcn/src/components/combobox/combobox.tsx b/packages/emcn/src/components/combobox/combobox.tsx index 7f1e2fcbb00..b41f28385d5 100644 --- a/packages/emcn/src/components/combobox/combobox.tsx +++ b/packages/emcn/src/components/combobox/combobox.tsx @@ -68,6 +68,36 @@ export type ComboboxOption = { keepOpen?: boolean /** Optional element rendered at the trailing end of the option (e.g. chevron for folders) */ suffixElement?: ReactNode + /** + * Muted secondary text after the label, such as the host serving a model. Lets options + * share a label and still read apart; search matches it. + */ + detail?: string + /** Additional search-only terms. These are never rendered. */ + searchTerms?: readonly string[] +} + +/** Whether an option's label, value, detail, or search terms contain the lowercased query. */ +function optionMatchesQuery(option: ComboboxOption, query: string): boolean { + return [option.label, option.value, option.detail, ...(option.searchTerms ?? [])].some((term) => + term?.toLowerCase().includes(query) + ) +} + +interface OptionDetailProps extends HTMLAttributes { + detail: string +} + +/** + * Muted secondary text rendered after an option's label, such as the host serving a model. + * Exported for editable fields that draw their own `overlayContent`. + */ +export function OptionDetail({ detail, className, ...props }: OptionDetailProps) { + return ( + + {detail} + + ) } /** @@ -240,6 +270,7 @@ const Combobox = memo( ref ) => { const listboxId = useId() + const selectedDetailId = useId() const [open, setOpen] = useState(false) const [highlightedIndex, setHighlightedIndex] = useState(-1) const [searchQuery, setSearchQueryState] = useState('') @@ -385,29 +416,37 @@ const Combobox = memo( if (filterOptions && value && open) { const currentValue = value.toString().toLowerCase() - const exactMatch = result.find( - (opt) => opt.value === value || opt.label.toLowerCase() === currentValue - ) - if (!exactMatch) { - result = result.filter((option) => { - const label = option.label.toLowerCase() - const optionValue = option.value.toLowerCase() - return label.includes(currentValue) || optionValue.includes(currentValue) - }) + /* + * Text naming the selection shows the whole list. A label shared by several + * options (told apart by `detail`) names the selection only when the selected + * option is one of them; otherwise it filters like any other text. + */ + const labelMatches = result.filter((opt) => opt.label.toLowerCase() === currentValue) + const namesSelection = + result.some((opt) => opt.value === value) || + labelMatches.length === 1 || + labelMatches.some((opt) => opt.value === effectiveSelectedValue) + if (!namesSelection) { + result = result.filter((option) => optionMatchesQuery(option, currentValue)) } } if (searchable && searchMode === 'local' && searchQuery) { const query = searchQuery.toLowerCase() - result = result.filter((option) => { - const label = option.label.toLowerCase() - const optionValue = option.value.toLowerCase() - return label.includes(query) || optionValue.includes(query) - }) + result = result.filter((option) => optionMatchesQuery(option, query)) } return result - }, [allOptions, value, open, filterOptions, searchable, searchMode, searchQuery]) + }, [ + allOptions, + value, + open, + filterOptions, + searchable, + searchMode, + searchQuery, + effectiveSelectedValue, + ]) /** * Filter groups based on search query (preserves group structure) @@ -428,11 +467,7 @@ const Combobox = memo( return baseGroups .map((group) => ({ ...group, - items: group.items.filter((option) => { - const label = option.label.toLowerCase() - const optionValue = option.value.toLowerCase() - return label.includes(query) || optionValue.includes(query) - }), + items: group.items.filter((option) => optionMatchesQuery(option, query)), })) .filter((group) => group.items.length > 0) }, [groups, searchable, searchMode, searchQuery]) @@ -698,6 +733,14 @@ const Combobox = memo( }, [effectiveHighlightedIndex, optionVirtualizer, virtualizeOptions]) const SelectedIcon = selectedOption?.icon + /** + * An editable field's visible detail sits in an overlay the input does not own, so the + * selection's detail is announced through `aria-describedby` while the input names it. + */ + const describedDetail = + editable && selectedOption?.detail && value === selectedOption.label + ? selectedOption.detail + : undefined const visualLabel = overlayLabel ?? multiSelectLabel ?? (selectedOption ? selectedOption.label : placeholder) const isLoadingContinuation = isLoadingMore || isLoadingAll @@ -781,6 +824,7 @@ const Combobox = memo( )} + {option.detail && } {option.suffixElement} {isSelected && } @@ -805,7 +849,11 @@ const Combobox = memo( disabled={disabled} aria-label={ariaLabel} aria-labelledby={ariaLabelledBy} - aria-describedby={ariaDescribedBy} + aria-describedby={ + [ariaDescribedBy, describedDetail && selectedDetailId] + .filter(Boolean) + .join(' ') || undefined + } aria-required={ariaRequired} aria-invalid={ariaInvalid} {...inputProps} @@ -823,6 +871,11 @@ const Combobox = memo( aria-controls={listboxId} aria-autocomplete='list' /> + {describedDetail && ( + + {describedDetail} + + )} {(overlayContent || SelectedIcon) && (
+ {selectedOption?.detail && ( + + )} )}
@@ -888,6 +948,9 @@ const Combobox = memo( overlayContent && 'text-transparent' )} /> + {!overlayContent && !multiSelectLabel && selectedOption?.detail && ( + + )} + {option.detail && } {option.suffixElement} {isSelected && ( diff --git a/packages/emcn/src/components/index.ts b/packages/emcn/src/components/index.ts index 7f0b4135ff2..92844e494c8 100644 --- a/packages/emcn/src/components/index.ts +++ b/packages/emcn/src/components/index.ts @@ -81,6 +81,7 @@ export { Combobox, type ComboboxOption, type ComboboxOptionGroup, + OptionDetail, } from './combobox/combobox' export { ComposerActionButton } from './composer-action-button/composer-action-button' export { DetailsPanel } from './details-panel/details-panel' diff --git a/packages/testing/src/mocks/providers-attachments.mock.ts b/packages/testing/src/mocks/providers-attachments.mock.ts index 566bd0ecd2e..aa609b60c68 100644 --- a/packages/testing/src/mocks/providers-attachments.mock.ts +++ b/packages/testing/src/mocks/providers-attachments.mock.ts @@ -30,6 +30,8 @@ const ATTACHMENT_PROVIDER_BY_ID: Record = { zai: 'zai', kimi: 'kimi', thinkingmachines: 'thinkingmachines', + minimax: 'minimax', + alibaba: 'alibaba', } const UNSUPPORTED_FILE_PROVIDERS = new Set([ diff --git a/packages/workflow-sdk/test/fixtures/catalog.json b/packages/workflow-sdk/test/fixtures/catalog.json index a1908fdd0ca..8e0f471bfcb 100644 --- a/packages/workflow-sdk/test/fixtures/catalog.json +++ b/packages/workflow-sdk/test/fixtures/catalog.json @@ -116,6 +116,30 @@ "id": "thinkingmachines/inkling-2-small", "label": "thinkingmachines/inkling-2-small" }, + { + "id": "minimax/minimax-m3.1-flash", + "label": "minimax/minimax-m3.1-flash" + }, + { + "id": "minimax/minimax-m3", + "label": "minimax/minimax-m3" + }, + { + "id": "qwen4-max", + "label": "qwen4-max" + }, + { + "id": "qwen3.8-flash", + "label": "qwen3.8-flash" + }, + { + "id": "qwen3.8-27b", + "label": "qwen3.8-27b" + }, + { + "id": "qwen3.7-plus", + "label": "qwen3.7-plus" + }, { "id": "gpt-6.2-astra", "label": "gpt-6.2-astra" @@ -660,6 +684,10 @@ "id": "muse-spark-1.1", "label": "muse-spark-1.1" }, + { + "id": "kimi-k3.1-pro", + "label": "kimi-k3.1-pro" + }, { "id": "kimi-k3", "label": "kimi-k3" @@ -1129,6 +1157,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -1265,6 +1299,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -1415,6 +1450,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -1551,6 +1592,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -1694,6 +1736,12 @@ "thinkingmachines/inkling-small": true, "thinkingmachines/inkling": true, "thinkingmachines/inkling-2-small": true, + "minimax/minimax-m3.1-flash": true, + "minimax/minimax-m3": true, + "qwen4-max": true, + "qwen3.8-flash": true, + "qwen3.8-27b": true, + "qwen3.7-plus": true, "gpt-6.2-astra": true, "gpt-6.2-sol": true, "gpt-6.1-terra": true, @@ -1830,6 +1878,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": true, "muse-spark-1.3": true, "muse-spark-1.1": true, + "kimi-k3.1-pro": true, "kimi-k3": true, "kimi-k2.7-code": true, "kimi-k2.7-code-highspeed": true, @@ -1974,6 +2023,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -2110,6 +2165,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -2253,6 +2309,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -2389,6 +2451,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -2531,6 +2594,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -2667,6 +2736,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -2811,6 +2881,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -2947,6 +3023,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -3089,6 +3166,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -3225,6 +3308,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -3382,6 +3466,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -3518,6 +3608,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -3621,6 +3712,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -3757,6 +3854,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -3853,6 +3951,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -3989,6 +4093,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -4086,6 +4191,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -4222,6 +4333,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -4319,6 +4431,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -4455,6 +4573,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -4598,6 +4717,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -4734,6 +4859,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -4877,6 +5003,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -5013,6 +5145,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -5198,6 +5331,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": true, + "minimax/minimax-m3": false, + "qwen4-max": true, + "qwen3.8-flash": true, + "qwen3.8-27b": true, + "qwen3.7-plus": false, "gpt-6.2-astra": true, "gpt-6.2-sol": true, "gpt-6.1-terra": true, @@ -5334,6 +5473,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": true, "muse-spark-1.1": true, + "kimi-k3.1-pro": true, "kimi-k3": true, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -5485,6 +5625,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": true, "gpt-6.1-terra": true, @@ -5621,6 +5767,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -5772,6 +5919,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": true, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -5908,6 +6061,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -6342,6 +6496,10 @@ "condition": { "field": "model", "value": [ + "qwen4-max", + "qwen3.7-plus", + "qwen3.8-flash", + "qwen3.8-27b", "mistral-large-4", "mistral-medium-3-5", "mistral-medium-3", @@ -11168,6 +11326,30 @@ "id": "thinkingmachines/inkling-2-small", "label": "thinkingmachines/inkling-2-small" }, + { + "id": "minimax/minimax-m3.1-flash", + "label": "minimax/minimax-m3.1-flash" + }, + { + "id": "minimax/minimax-m3", + "label": "minimax/minimax-m3" + }, + { + "id": "qwen4-max", + "label": "qwen4-max" + }, + { + "id": "qwen3.8-flash", + "label": "qwen3.8-flash" + }, + { + "id": "qwen3.8-27b", + "label": "qwen3.8-27b" + }, + { + "id": "qwen3.7-plus", + "label": "qwen3.7-plus" + }, { "id": "gpt-6.2-astra", "label": "gpt-6.2-astra" @@ -11712,6 +11894,10 @@ "id": "muse-spark-1.1", "label": "muse-spark-1.1" }, + { + "id": "kimi-k3.1-pro", + "label": "kimi-k3.1-pro" + }, { "id": "kimi-k3", "label": "kimi-k3" @@ -12178,6 +12364,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -12314,6 +12506,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -12461,6 +12654,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -12597,6 +12796,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -12737,6 +12937,12 @@ "thinkingmachines/inkling-small": true, "thinkingmachines/inkling": true, "thinkingmachines/inkling-2-small": true, + "minimax/minimax-m3.1-flash": true, + "minimax/minimax-m3": true, + "qwen4-max": true, + "qwen3.8-flash": true, + "qwen3.8-27b": true, + "qwen3.7-plus": true, "gpt-6.2-astra": true, "gpt-6.2-sol": true, "gpt-6.1-terra": true, @@ -12873,6 +13079,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": true, "muse-spark-1.3": true, "muse-spark-1.1": true, + "kimi-k3.1-pro": true, "kimi-k3": true, "kimi-k2.7-code": true, "kimi-k2.7-code-highspeed": true, @@ -13014,6 +13221,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -13150,6 +13363,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -13290,6 +13504,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -13426,6 +13646,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -13565,6 +13786,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -13701,6 +13928,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -13842,6 +14070,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -13978,6 +14212,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -14117,6 +14352,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -14253,6 +14494,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -14407,6 +14649,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -14543,6 +14791,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -14643,6 +14892,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -14779,6 +15034,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -14872,6 +15128,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -15008,6 +15270,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -15102,6 +15365,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -15238,6 +15507,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, @@ -15332,6 +15602,12 @@ "thinkingmachines/inkling-small": false, "thinkingmachines/inkling": false, "thinkingmachines/inkling-2-small": false, + "minimax/minimax-m3.1-flash": false, + "minimax/minimax-m3": false, + "qwen4-max": false, + "qwen3.8-flash": false, + "qwen3.8-27b": false, + "qwen3.7-plus": false, "gpt-6.2-astra": false, "gpt-6.2-sol": false, "gpt-6.1-terra": false, @@ -15468,6 +15744,7 @@ "nvidia/nemotron-3-ultra-550b-a55b": false, "muse-spark-1.3": false, "muse-spark-1.1": false, + "kimi-k3.1-pro": false, "kimi-k3": false, "kimi-k2.7-code": false, "kimi-k2.7-code-highspeed": false, diff --git a/scripts/check-test-types.baseline.json b/scripts/check-test-types.baseline.json index 93f529bc0a0..d47c20014b2 100644 --- a/scripts/check-test-types.baseline.json +++ b/scripts/check-test-types.baseline.json @@ -220,18 +220,12 @@ "TS2352": 1, "TS2554": 2 }, - "apps/sim/app/api/providers/baseten/models/route.test.ts": { - "TS2554": 2 - }, "apps/sim/app/api/providers/ollama-cloud/models/route.test.ts": { "TS2554": 2 }, "apps/sim/app/api/providers/ollama/models/route.test.ts": { "TS2554": 2 }, - "apps/sim/app/api/providers/together/models/route.test.ts": { - "TS2554": 2 - }, "apps/sim/app/api/providers/vllm/models/route.test.ts": { "TS2554": 2 },