= {
- short: { name: 'Short', lang: 'python', segments: ['hello()'] },
+const tabs = {
+ short: { name: 'Short', segments: ['hello()'] },
tall: {
name: 'Tall',
- lang: 'python',
segments: [
'run("',
{ values: ['model-a', 'model-b'], highlight: true },
@@ -23,80 +21,11 @@ describe('CodeTabs', () => {
render(CodeTabs, { props: { tabs, label: 'Samples' } })
expect(screen.getByRole('tablist', { name: 'Samples' })).toBeTruthy()
- expect(screen.getByRole('tabpanel')).toHaveTextContent('hello()')
+ expect(screen.getByText('hello()')).toBeTruthy()
await userEvent.click(screen.getByRole('tab', { name: 'Tall' }))
- expect(screen.getByRole('tabpanel')).toHaveTextContent('run("model-a")')
- expect(screen.getByRole('tabpanel')).not.toHaveTextContent('hello()')
- })
-
- it('switches panels from a dropdown when asked for one', async () => {
- const user = userEvent.setup()
- render(CodeTabs, { props: { tabs, label: 'Samples', picker: 'dropdown' } })
-
- expect(screen.queryByRole('tablist')).toBeNull()
- expect(screen.getByRole('tabpanel')).toHaveTextContent('hello()')
-
- await user.click(screen.getByRole('button', { name: 'Short' }))
- await user.click(await screen.findByRole('menuitemradio', { name: 'Tall' }))
-
- expect(screen.getByRole('button', { name: 'Tall' })).toBeTruthy()
- expect(screen.getByRole('tabpanel')).toHaveTextContent('run("model-a")')
- expect(screen.getByRole('tabpanel')).not.toHaveTextContent('hello()')
- })
-
- it('pins cycling segments to the selected index', async () => {
- render(CodeTabs, { props: { tabs, label: 'Samples', selectedIndex: 1 } })
-
- await userEvent.click(screen.getByRole('tab', { name: 'Tall' }))
-
- expect(screen.getByText('model-b')).toBeTruthy()
- expect(screen.queryByText('model-a')).toBeNull()
- })
-
- it('renders no copy button unless labels are given', () => {
- render(CodeTabs, { props: { tabs, label: 'Samples' } })
-
- expect(screen.queryByRole('button', { name: 'Copy' })).toBeNull()
- })
-
- it('copies the active sample with its cycling values filled in', async () => {
- const user = userEvent.setup()
- render(CodeTabs, {
- props: {
- tabs,
- label: 'Samples',
- copyLabel: 'Copy',
- copiedLabel: 'Copied'
- }
- })
-
- await user.click(screen.getByRole('tab', { name: 'Tall' }))
- await user.click(screen.getByRole('button', { name: 'Copy' }))
-
- expect(await navigator.clipboard.readText()).toBe(
- 'run("model-a")\nsecond\nthird'
- )
- expect(screen.getByRole('button', { name: 'Copied' })).toBeTruthy()
- expect(screen.queryByText('Copied')).toBeNull()
- })
-
- it('does not carry the copied state over to another tab', async () => {
- const user = userEvent.setup()
- render(CodeTabs, {
- props: {
- tabs,
- label: 'Samples',
- copyLabel: 'Copy',
- copiedLabel: 'Copied'
- }
- })
-
- await user.click(screen.getByRole('button', { name: 'Copy' }))
- await user.click(screen.getByRole('tab', { name: 'Tall' }))
-
- expect(screen.getByRole('button', { name: 'Copy' })).toBeTruthy()
- expect(screen.queryByRole('button', { name: 'Copied' })).toBeNull()
+ expect(screen.getByText('model-a')).toBeTruthy()
+ expect(screen.queryByText('hello()')).toBeNull()
})
})
diff --git a/apps/website/src/templates/platform/CodeTabs.vue b/apps/website/src/templates/platform/CodeTabs.vue
index ec6dff3be09..0e83043f0ef 100644
--- a/apps/website/src/templates/platform/CodeTabs.vue
+++ b/apps/website/src/templates/platform/CodeTabs.vue
@@ -1,27 +1,25 @@
@@ -146,52 +99,59 @@ const groupsByTab = computed(() =>
ref="root"
v-model="activeTab"
activation-mode="manual"
- :class="fill ? 'flex h-full flex-col' : 'block'"
+ class="block"
>
-
-
-
-
+
+
+ {{ tab.name }}
+
+
-
+ :style="{ '--code-panel-h': codePanelHeight }"
+ >{{ cycleValue(segment.values) }}{{ segment }}
diff --git a/apps/website/src/templates/platform/CodeTabsCode.vue b/apps/website/src/templates/platform/CodeTabsCode.vue
deleted file mode 100644
index eed6e3d0f6b..00000000000
--- a/apps/website/src/templates/platform/CodeTabsCode.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
- {{ token.content }}
-
diff --git a/apps/website/src/templates/platform/CodeTabsPicker.vue b/apps/website/src/templates/platform/CodeTabsPicker.vue
deleted file mode 100644
index 9fff0a566da..00000000000
--- a/apps/website/src/templates/platform/CodeTabsPicker.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
- {{ tabs[activeTab]?.name }}
-
-
-
-
-
-
- {{ tab.name }}
-
-
-
-
-
-
-
- {{ tab.name }}
-
-
-
diff --git a/apps/website/src/templates/platform/FeatureCard.vue b/apps/website/src/templates/platform/FeatureCard.vue
index 96b14b6d8e1..66ef302573e 100644
--- a/apps/website/src/templates/platform/FeatureCard.vue
+++ b/apps/website/src/templates/platform/FeatureCard.vue
@@ -42,9 +42,7 @@ const {
>
{{ title }}
-
+
{{ description
}} {
+ it('renders the supplied Models API value callouts', () => {
+ render(ModelsApiFeaturesSection, { props: { locale: 'en' } })
+
+ expect(
+ screen.getByRole('heading', {
+ name: t('platform.modelsFeatures.heading', 'en')
+ })
+ ).toBeTruthy()
+ expect(screen.getAllByRole('article')).toHaveLength(4)
+ expect(
+ screen.getByText(t('platform.modelsFeatures.1.title', 'en'))
+ ).toBeTruthy()
+ expect(
+ screen.getByText(t('platform.modelsFeatures.3.title', 'en'))
+ ).toBeTruthy()
+ expect(
+ screen.getByText(t('platform.modelsFeatures.5.title', 'en'))
+ ).toBeTruthy()
+ expect(
+ screen.getByText(t('platform.modelsFeatures.6.title', 'en'))
+ ).toBeTruthy()
+ expect(screen.queryByText(/never dropped/i)).toBeNull()
+ expect(screen.queryByText(/costs you can attribute/i)).toBeNull()
+ })
+})
diff --git a/apps/website/src/templates/platform/ModelsApiFeaturesSection.vue b/apps/website/src/templates/platform/ModelsApiFeaturesSection.vue
new file mode 100644
index 00000000000..df58100753b
--- /dev/null
+++ b/apps/website/src/templates/platform/ModelsApiFeaturesSection.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+ {{ t('platform.modelsFeatures.heading', locale) }}
+
+
+
+
+
+
diff --git a/apps/website/src/templates/platform/ModelsApiGallery.test.ts b/apps/website/src/templates/platform/ModelsApiGallery.test.ts
index d8f1f21a404..daaedc5aeee 100644
--- a/apps/website/src/templates/platform/ModelsApiGallery.test.ts
+++ b/apps/website/src/templates/platform/ModelsApiGallery.test.ts
@@ -17,9 +17,7 @@ describe('ModelsApiGallery', () => {
'cloud.aiModels.card.seedance25',
'cloud.aiModels.card.minimaxH3',
'cloud.aiModels.card.nanoBananaPro',
- 'cloud.aiModels.card.chatgptImages25',
- 'cloud.aiModels.card.klingAi30',
- 'cloud.aiModels.card.flux3'
+ 'cloud.aiModels.card.gptImage2'
] as const) {
expect(screen.getByText(t(titleKey, 'en'))).toBeTruthy()
}
diff --git a/apps/website/src/templates/platform/ModelsApiGallery.vue b/apps/website/src/templates/platform/ModelsApiGallery.vue
index 3a1ebb77cea..289576d4186 100644
--- a/apps/website/src/templates/platform/ModelsApiGallery.vue
+++ b/apps/website/src/templates/platform/ModelsApiGallery.vue
@@ -29,7 +29,7 @@ const isVideo = (media: GalleryMedia) => media.src.endsWith('.webm')
class="mx-auto max-w-9xl px-6 pb-16 md:pb-24 lg:px-16"
:aria-label="t('platform.modelsGallery.ariaLabel', locale)"
>
-
+
{
- it('presents the Comfy Router title, beta badge, and code tabs', () => {
+ it('presents the Models API title and code tabs', () => {
render(ModelsApiHero, { props: { locale: 'en' } })
- expect(screen.getByText('ROUTER', { exact: true })).toBeTruthy()
- expect(screen.queryByText('Comfy Router', { exact: true })).toBeNull()
expect(
screen.getByRole('heading', {
name: t('platform.modelsHero.heading', 'en')
})
).toBeTruthy()
+ expect(screen.getByText(/state-of-the-art models for image/)).toBeTruthy()
expect(
- screen.getByText(/Integrate frontier image, video, 3D and audio/)
- ).toBeTruthy()
- for (const panel of screen.getAllByRole('tabpanel'))
- expect(panel).toHaveTextContent('client.models.run')
- expect(
- screen.getAllByText(t('nav.badgeBeta', 'en')).length
+ screen.getAllByText('comfy.models.run', { exact: false }).length
).toBeGreaterThan(0)
- const browseModels = screen.getAllByRole('link', {
- name: routerT('platform.router.cta.browseModels', 'en')
- })
- expect(browseModels.length).toBeGreaterThan(0)
- for (const link of browseModels)
- expect(link.getAttribute('href')).toBe('/models')
+ expect(screen.queryByText(t('nav.badgeComingSoon', 'en'))).toBeNull()
+ expect(screen.queryByText(t('nav.badgeBeta', 'en'))).toBeNull()
})
})
diff --git a/apps/website/src/templates/platform/ModelsApiHero.vue b/apps/website/src/templates/platform/ModelsApiHero.vue
index b813b770061..d748e582d44 100644
--- a/apps/website/src/templates/platform/ModelsApiHero.vue
+++ b/apps/website/src/templates/platform/ModelsApiHero.vue
@@ -1,57 +1,45 @@
diff --git a/apps/website/src/templates/platform/RouterCapabilitiesSection.test.ts b/apps/website/src/templates/platform/RouterCapabilitiesSection.test.ts
deleted file mode 100644
index 629c4402cce..00000000000
--- a/apps/website/src/templates/platform/RouterCapabilitiesSection.test.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it } from 'vitest'
-
-import RouterCapabilitiesSection from './RouterCapabilitiesSection.vue'
-
-describe('RouterCapabilitiesSection', () => {
- it('presents each capability with an explanatory visual', () => {
- render(RouterCapabilitiesSection, { props: { locale: 'en' } })
-
- expect(
- screen.getByRole('img', { name: 'Integrate once. Add models as you go.' })
- ).toBeTruthy()
- expect(
- screen.getByRole('img', {
- name: 'Better availability. Better prices. No subscription.'
- })
- ).toBeTruthy()
- expect(
- screen.getByRole('img', {
- name: 'Hit a concurrency limit? Queue the job.'
- })
- ).toBeTruthy()
- })
-
- it('identifies supported providers with logos', () => {
- render(RouterCapabilitiesSection, { props: { locale: 'en' } })
-
- for (const provider of ['fal', 'Runware', 'WaveSpeed'])
- expect(screen.getAllByRole('img', { name: provider })).toHaveLength(1)
- })
-})
diff --git a/apps/website/src/templates/platform/RouterCapabilitiesSection.vue b/apps/website/src/templates/platform/RouterCapabilitiesSection.vue
deleted file mode 100644
index 6108f0d8427..00000000000
--- a/apps/website/src/templates/platform/RouterCapabilitiesSection.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
- {{ routerT('platform.router.section2.providersLabel', locale) }}
-
-
-
-
diff --git a/apps/website/src/templates/platform/RouterCodeSection.test.ts b/apps/website/src/templates/platform/RouterCodeSection.test.ts
deleted file mode 100644
index 03fae28262e..00000000000
--- a/apps/website/src/templates/platform/RouterCodeSection.test.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import userEvent from '@testing-library/user-event'
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it } from 'vitest'
-
-import RouterCodeSection from './RouterCodeSection.vue'
-
-describe('RouterCodeSection', () => {
- it('swaps the provider in the sample when a provider logo is chosen', async () => {
- render(RouterCodeSection, { props: { locale: 'en' } })
- const providers = screen.getByRole('radiogroup', { name: 'Provider' })
-
- expect(providers).toBeTruthy()
- expect(screen.getByText('comfy')).toBeTruthy()
-
- await userEvent.click(screen.getByRole('radio', { name: 'WaveSpeed' }))
-
- expect(screen.getByText('wavespeed')).toBeTruthy()
- expect(screen.queryByText('comfy')).toBeNull()
-
- await userEvent.click(screen.getByRole('radio', { name: 'Higgsfield' }))
-
- expect(screen.getByText('higgsfield')).toBeTruthy()
- expect(screen.queryByText('wavespeed')).toBeNull()
- })
-})
diff --git a/apps/website/src/templates/platform/RouterCodeSection.vue b/apps/website/src/templates/platform/RouterCodeSection.vue
deleted file mode 100644
index f04386a4e06..00000000000
--- a/apps/website/src/templates/platform/RouterCodeSection.vue
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
- {{ routerT('platform.router.code.heading', locale) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ routerT('platform.router.code.supporting', locale) }}
-
-
-
diff --git a/apps/website/src/templates/platform/RouterMigrationBanner.test.ts b/apps/website/src/templates/platform/RouterMigrationBanner.test.ts
deleted file mode 100644
index 922e5aef18d..00000000000
--- a/apps/website/src/templates/platform/RouterMigrationBanner.test.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import userEvent from '@testing-library/user-event'
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it } from 'vitest'
-
-import { ROUTER_MIGRATION_PROMPT } from '../../config/router-migration-prompt'
-import RouterMigrationBanner from './RouterMigrationBanner.vue'
-
-describe('RouterMigrationBanner', () => {
- it('copies the full migration prompt', async () => {
- const user = userEvent.setup()
- render(RouterMigrationBanner, { props: { locale: 'en' } })
-
- expect(screen.queryByRole('link')).toBeNull()
-
- await user.click(screen.getByRole('button', { name: 'COPY PROMPT' }))
-
- expect(await navigator.clipboard.readText()).toBe(ROUTER_MIGRATION_PROMPT)
- expect(screen.getByRole('button', { name: 'COPIED' })).toBeTruthy()
- })
-})
diff --git a/apps/website/src/templates/platform/RouterMigrationBanner.vue b/apps/website/src/templates/platform/RouterMigrationBanner.vue
deleted file mode 100644
index a68e93b27a9..00000000000
--- a/apps/website/src/templates/platform/RouterMigrationBanner.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
- {{ routerT('platform.router.migrate.title', locale) }}
-
-
- {{ routerT('platform.router.migrate.subtitle', locale) }}
-
-
-
-
-
-
- {{ routerT('platform.router.migrate.copyPrompt', locale) }}
-
-
- {{ routerT('platform.router.migrate.copied', locale) }}
-
-
- {{
- routerT(
- copied
- ? 'platform.router.migrate.copied'
- : 'platform.router.migrate.copyPrompt',
- locale
- )
- }}
-
-
-
-
-
-
-
-
diff --git a/apps/website/src/templates/platform/RouterProofStripSection.test.ts b/apps/website/src/templates/platform/RouterProofStripSection.test.ts
deleted file mode 100644
index 8382c065455..00000000000
--- a/apps/website/src/templates/platform/RouterProofStripSection.test.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it } from 'vitest'
-
-import RouterProofStripSection from './RouterProofStripSection.vue'
-
-describe('RouterProofStripSection', () => {
- it('keeps the proof caption without a model-logo banner', () => {
- render(RouterProofStripSection, { props: { locale: 'en' } })
-
- expect(
- screen.getByText(
- 'The same models 3M+ ComfyUI users already use, now behind one API.'
- )
- ).toBeTruthy()
- expect(screen.queryAllByRole('img')).toHaveLength(0)
- expect(screen.queryByText('More models coming soon.')).toBeNull()
- })
-})
diff --git a/apps/website/src/templates/platform/RouterProofStripSection.vue b/apps/website/src/templates/platform/RouterProofStripSection.vue
deleted file mode 100644
index eacd9f30aba..00000000000
--- a/apps/website/src/templates/platform/RouterProofStripSection.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- {{ routerT('platform.router.proof.caption', locale) }}
-
-
-
diff --git a/apps/website/src/templates/platform/RouterProviderLogoMarqueeRow.vue b/apps/website/src/templates/platform/RouterProviderLogoMarqueeRow.vue
deleted file mode 100644
index eb00d9126b1..00000000000
--- a/apps/website/src/templates/platform/RouterProviderLogoMarqueeRow.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
![]()
-
-
-
-
diff --git a/apps/website/src/templates/platform/RouterProviderLogoRow.test.ts b/apps/website/src/templates/platform/RouterProviderLogoRow.test.ts
deleted file mode 100644
index 366457e40e2..00000000000
--- a/apps/website/src/templates/platform/RouterProviderLogoRow.test.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it } from 'vitest'
-
-import RouterProviderLogoRow from './RouterProviderLogoRow.vue'
-
-const providers = [
- { name: 'fal', src: '/fal.svg' },
- { name: 'WaveSpeed', src: '/wavespeed.svg' }
-]
-
-describe('RouterProviderLogoRow', () => {
- it('lists each provider once when static', () => {
- render(RouterProviderLogoRow, { props: { providers, animated: false } })
-
- for (const { name } of providers)
- expect(screen.getAllByRole('img', { name })).toHaveLength(1)
- })
-
- it('hides the marquee duplicate of every logo from assistive technology', () => {
- render(RouterProviderLogoRow, { props: { providers, animated: true } })
-
- for (const { name } of providers) {
- const exposed = screen.getAllByRole('img', { name })
- const rendered = screen.getAllByAltText(name)
- expect(rendered).toHaveLength(exposed.length * 2)
- }
- })
-})
diff --git a/apps/website/src/templates/platform/RouterProviderLogoRow.vue b/apps/website/src/templates/platform/RouterProviderLogoRow.vue
deleted file mode 100644
index 1197ffd21f2..00000000000
--- a/apps/website/src/templates/platform/RouterProviderLogoRow.vue
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/website/src/templates/platform/RouterRoadmapIllustration.vue b/apps/website/src/templates/platform/RouterRoadmapIllustration.vue
deleted file mode 100644
index a9c6e0f6a22..00000000000
--- a/apps/website/src/templates/platform/RouterRoadmapIllustration.vue
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/apps/website/src/templates/platform/RouterRoadmapSection.test.ts b/apps/website/src/templates/platform/RouterRoadmapSection.test.ts
deleted file mode 100644
index bbdddb94ee1..00000000000
--- a/apps/website/src/templates/platform/RouterRoadmapSection.test.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import userEvent from '@testing-library/user-event'
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it, vi } from 'vitest'
-
-import { captureRouterRoadmapCardExpanded } from '../../scripts/posthog'
-import RouterRoadmapSection from './RouterRoadmapSection.vue'
-
-vi.mock(import('../../scripts/posthog'))
-
-describe('RouterRoadmapSection', () => {
- it('links to the Router documentation with one section-level call to action', () => {
- render(RouterRoadmapSection, { props: { locale: 'en' } })
-
- expect(screen.getAllByRole('link', { name: 'LEARN MORE' })).toHaveLength(1)
- })
-
- it('expands one card on its own and reports the expansion once', async () => {
- render(RouterRoadmapSection, { props: { locale: 'en' } })
- const workflows = screen.getByRole('button', {
- name: /read more.*comfy workflows/i
- })
- const strategies = screen.getByRole('button', {
- name: /read more.*routing strategies/i
- })
-
- await userEvent.click(workflows)
-
- expect(workflows.getAttribute('aria-expanded')).toBe('true')
- expect(strategies.getAttribute('aria-expanded')).toBe('false')
- expect(screen.getByText(/Workflows run today/)).toBeVisible()
- expect(screen.getByText(/Name the outcome you want/)).not.toBeVisible()
- expect(captureRouterRoadmapCardExpanded).toHaveBeenCalledExactlyOnceWith(
- 'workflow'
- )
-
- await userEvent.click(
- screen.getByRole('button', { name: /read less.*comfy workflows/i })
- )
-
- expect(workflows.getAttribute('aria-expanded')).toBe('false')
- expect(screen.getByText(/Workflows run today/)).not.toBeVisible()
- expect(captureRouterRoadmapCardExpanded).toHaveBeenCalledTimes(1)
- })
-
- it('names the panel each toggle controls', () => {
- render(RouterRoadmapSection, { props: { locale: 'en' } })
- const cards = [
- { title: /comfy workflows/i, details: /Workflows run today/ },
- { title: /routing strategies/i, details: /Name the outcome you want/ },
- { title: /route by use case/i, details: /Describe the task instead/ },
- { title: /byok/i, details: /Connect your own provider credentials/ }
- ]
-
- for (const card of cards) {
- const button = screen.getByRole('button', { name: card.title })
- expect(
- screen.getByText(card.details, {
- selector: `#${button.getAttribute('aria-controls')} *`
- })
- ).toBeTruthy()
- }
- })
-})
diff --git a/apps/website/src/templates/platform/RouterRoadmapSection.vue b/apps/website/src/templates/platform/RouterRoadmapSection.vue
deleted file mode 100644
index 2c6af8746b6..00000000000
--- a/apps/website/src/templates/platform/RouterRoadmapSection.vue
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
- {{ routerT('platform.router.roadmap.heading', locale) }}
-
-
- {{ routerT('platform.router.roadmap.subtitle', locale) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ card.details }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/website/src/templates/platform/RouterVideoSection.test.ts b/apps/website/src/templates/platform/RouterVideoSection.test.ts
deleted file mode 100644
index 4351054db1d..00000000000
--- a/apps/website/src/templates/platform/RouterVideoSection.test.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { render, screen } from '@testing-library/vue'
-import { describe, expect, it } from 'vitest'
-
-import { routerT } from './routerCopy'
-import RouterVideoSection from './RouterVideoSection.vue'
-
-describe('RouterVideoSection', () => {
- it('presents the explainer video with an accessible label', () => {
- render(RouterVideoSection, { props: { locale: 'en' } })
-
- const video = screen.getByLabelText(
- routerT('platform.router.video.alt', 'en')
- )
-
- expect(video).toBeTruthy()
- expect(video.hasAttribute('muted')).toBe(true)
- expect(video.hasAttribute('autoplay')).toBe(false)
- })
-})
diff --git a/apps/website/src/templates/platform/RouterVideoSection.vue b/apps/website/src/templates/platform/RouterVideoSection.vue
deleted file mode 100644
index 7948c508779..00000000000
--- a/apps/website/src/templates/platform/RouterVideoSection.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
diff --git a/apps/website/src/templates/platform/codeSamples.test.ts b/apps/website/src/templates/platform/codeSamples.test.ts
deleted file mode 100644
index 74b8b24d972..00000000000
--- a/apps/website/src/templates/platform/codeSamples.test.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { describe, expect, it } from 'vitest'
-
-import type { CodeSegment } from './codeTokens'
-import { routerCodeTabs } from './codeSamples'
-
-function resolve(segments: CodeSegment[], provider: number): string {
- return segments
- .map((segment) =>
- typeof segment === 'string' ? segment : segment.values[provider]
- )
- .join('')
-}
-
-describe('routerCodeTabs', () => {
- it('cycles every supported provider in each language sample', () => {
- const providers = ['comfy', 'fal', 'runware', 'wavespeed', 'higgsfield']
-
- for (const tab of Object.values(routerCodeTabs)) {
- const providerSegment = tab.segments.find(
- (segment) => typeof segment !== 'string' && segment.highlight
- )
-
- expect(providerSegment).toEqual({ values: providers, highlight: true })
- expect(tab.lang).toBeDefined()
- }
- })
-
- it('copies as a working Router request for the chosen provider', () => {
- expect(resolve(routerCodeTabs.curl.segments, 1)).toBe(
- 'curl -X POST "https://api.comfy.org/v2/models/openai/gpt-image-2?model_provider=fal" \\\n' +
- ' -H "X-API-Key: $COMFY_API_KEY" \\\n' +
- ' -H "Content-Type: application/json" \\\n' +
- ' -d \'{"prompt": "aerial view of a neon coral reef at dusk"}\''
- )
- expect(resolve(routerCodeTabs.python.segments, 4)).toContain(
- 'provider="higgsfield"'
- )
- })
-})
diff --git a/apps/website/src/templates/platform/codeSamples.ts b/apps/website/src/templates/platform/codeSamples.ts
index 127e0809182..869c22e086a 100644
--- a/apps/website/src/templates/platform/codeSamples.ts
+++ b/apps/website/src/templates/platform/codeSamples.ts
@@ -17,7 +17,6 @@ const CURL_INPUTS = [
export const modelsApiCodeTabs: Record = {
python: {
name: 'Python',
- lang: 'python',
segments: [
'result = comfy.models.run(\n "',
{ values: MODELS, highlight: true },
@@ -30,7 +29,6 @@ export const modelsApiCodeTabs: Record = {
},
typescript: {
name: 'TypeScript',
- lang: 'typescript',
segments: [
"const result = await comfy.models.run('",
{ values: MODELS, highlight: true },
@@ -45,7 +43,6 @@ export const modelsApiCodeTabs: Record = {
// (services/comfy-api/docs/router-quickstart.mdx in Comfy-Org/cloud).
curl: {
name: 'cURL',
- lang: 'shell',
segments: [
'curl -X POST https://api.comfy.org/v2/models/',
{ values: CURL_MODELS, highlight: true },
@@ -56,7 +53,6 @@ export const modelsApiCodeTabs: Record = {
},
cli: {
name: 'comfy-cli',
- lang: 'shell',
segments: [
'$ comfy generate --model ',
{ values: MODELS, highlight: true },
@@ -67,61 +63,3 @@ export const modelsApiCodeTabs: Record = {
]
}
}
-
-// Router code block: the model and prompt stay fixed while the provider
-// cycles, illustrating that switching providers only changes one argument.
-const ROUTER_MODEL = 'openai/gpt-image-2'
-const ROUTER_PROMPT = 'aerial view of a neon coral reef at dusk'
-export const ROUTER_PROVIDERS = [
- 'comfy',
- 'fal',
- 'runware',
- 'wavespeed',
- 'higgsfield'
-] as const
-export type RouterProvider = (typeof ROUTER_PROVIDERS)[number]
-
-export const routerCodeTabs: Record = {
- python: {
- name: 'Python',
- lang: 'python',
- segments: [
- 'from comfy_sdk import Comfy\n\nclient = Comfy(api_key="comfyui-...")\n\nresult = client.models.run(\n "' +
- ROUTER_MODEL +
- '",\n arguments={"prompt": "' +
- ROUTER_PROMPT +
- '"},\n provider="',
- { values: [...ROUTER_PROVIDERS], highlight: true },
- '",\n)'
- ]
- },
- typescript: {
- name: 'TypeScript',
- lang: 'typescript',
- segments: [
- "import { Comfy } from 'comfy-sdk'\n\nconst client = new Comfy({ apiKey: 'comfyui-...' })\n\nconst result = await client.models.run('" +
- ROUTER_MODEL +
- "', {\n arguments: { prompt: '" +
- ROUTER_PROMPT +
- "' },\n provider: '",
- { values: [...ROUTER_PROVIDERS], highlight: true },
- "',\n})"
- ]
- },
- // Router picks the serving provider from the model_provider query parameter;
- // the route and the model's native body stay the same (docs.comfy.org/development/comfy-router/providers).
- curl: {
- name: 'cURL',
- lang: 'shell',
- wrap: true,
- segments: [
- 'curl -X POST "https://api.comfy.org/v2/models/' +
- ROUTER_MODEL +
- '?model_provider=',
- { values: [...ROUTER_PROVIDERS], highlight: true },
- '" \\\n -H "X-API-Key: $COMFY_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d \'{"prompt": "' +
- ROUTER_PROMPT +
- '"}\''
- ]
- }
-}
diff --git a/apps/website/src/templates/platform/codeTokens.test.ts b/apps/website/src/templates/platform/codeTokens.test.ts
deleted file mode 100644
index 33e70dae027..00000000000
--- a/apps/website/src/templates/platform/codeTokens.test.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { describe, expect, it } from 'vitest'
-
-import { tokenizeSegments } from './codeTokens'
-
-const segments = [
- 'run(\n "',
- { values: ['model-a', 'model-b'], highlight: true },
- '",\n provider="',
- { values: ['fal', 'replicate'] },
- '",\n)'
-]
-
-function text(group: { tokens: readonly { content: string }[] }): string {
- return group.tokens.map((token) => token.content).join('')
-}
-
-describe('tokenizeSegments', () => {
- it('returns one group per segment whose text round-trips the picked sample', () => {
- const groups = tokenizeSegments(segments, 'python', (values) => values[1])
-
- expect(groups.map((group) => group.kind)).toEqual([
- 'static',
- 'cycle',
- 'static',
- 'cycle',
- 'static'
- ])
- expect(groups.map(text).join('')).toBe(
- 'run(\n "model-b",\n provider="replicate",\n)'
- )
- expect(groups[1]).toMatchObject({ value: 'model-b', highlight: true })
- expect(groups[3]).toMatchObject({ value: 'replicate', highlight: false })
- })
-
- it('colors tokens that straddle segment boundaries as one string literal', () => {
- const groups = tokenizeSegments(segments, 'python', (values) => values[0])
-
- const openingQuote = groups[0].tokens.at(-1)
- const cycledValue = groups[1].tokens[0]
- const closingQuote = groups[2].tokens[0]
-
- expect(openingQuote?.content).toBe('"')
- expect(cycledValue.color).toBeDefined()
- expect(cycledValue.color).toBe(openingQuote?.color)
- expect(cycledValue.color).toBe(closingQuote.color)
- })
-})
diff --git a/apps/website/src/templates/platform/codeTokens.ts b/apps/website/src/templates/platform/codeTokens.ts
deleted file mode 100644
index 7ebba958983..00000000000
--- a/apps/website/src/templates/platform/codeTokens.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import type { CodeLang, HighlightToken } from '../../lib/highlight'
-import { highlightTokens } from '../../lib/highlight'
-
-/**
- * A segment is either static code, or a set of values the tab cycles
- * through in lockstep with every other cycling segment (index-synced, so a
- * model id and its matching prompt/filename change together).
- */
-export type CodeSegment = string | { values: string[]; highlight?: boolean }
-
-export type CodeGroup =
- | { kind: 'static'; tokens: readonly HighlightToken[] }
- | {
- kind: 'cycle'
- value: string
- highlight: boolean
- tokens: readonly HighlightToken[]
- }
-
-function sliceTokens(
- tokens: readonly HighlightToken[],
- start: number,
- end: number
-): HighlightToken[] {
- const sliced: HighlightToken[] = []
- let position = 0
- for (const token of tokens) {
- const tokenStart = position
- const tokenEnd = position + token.content.length
- position = tokenEnd
- if (tokenEnd <= start || tokenStart >= end) continue
- const content = token.content.slice(
- Math.max(start, tokenStart) - tokenStart,
- Math.min(end, tokenEnd) - tokenStart
- )
- if (content) sliced.push({ content, color: token.color })
- }
- return sliced
-}
-
-/**
- * Highlights the whole sample as one program so string and call boundaries
- * that straddle segments still tokenize correctly, then hands each segment
- * back its own slice of the tokens so cycling segments can keep their
- * crossfade and emphasis.
- */
-export function tokenizeSegments(
- segments: readonly CodeSegment[],
- lang: CodeLang,
- pick: (values: string[]) => string
-): CodeGroup[] {
- const resolved = segments.map((segment) =>
- typeof segment === 'string'
- ? { text: segment }
- : { text: pick(segment.values), highlight: segment.highlight === true }
- )
- const tokens = highlightTokens(
- resolved.map(({ text }) => text).join(''),
- lang
- )
-
- let offset = 0
- return resolved.map((segment): CodeGroup => {
- const start = offset
- offset += segment.text.length
- const sliced = tokens
- ? sliceTokens(tokens, start, offset)
- : [{ content: segment.text }]
- return segment.highlight === undefined
- ? { kind: 'static', tokens: sliced }
- : {
- kind: 'cycle',
- value: segment.text,
- highlight: segment.highlight,
- tokens: sliced
- }
- })
-}
diff --git a/apps/website/src/templates/platform/modelsGalleryCards.ts b/apps/website/src/templates/platform/modelsGalleryCards.ts
index 65cd62370c3..2b7a9d478c8 100644
--- a/apps/website/src/templates/platform/modelsGalleryCards.ts
+++ b/apps/website/src/templates/platform/modelsGalleryCards.ts
@@ -58,7 +58,7 @@ export const modelsGalleryCards: ModelsGalleryCard[] = [
media: [{ src: `${AI_MODELS_BASE}/nano-banana-pro.webp` }]
},
{
- titleKey: 'cloud.aiModels.card.chatgptImages25',
+ titleKey: 'cloud.aiModels.card.gptImage2',
badgeIcon: '/icons/ai-models/openai.svg',
media: [
{
@@ -66,23 +66,5 @@ export const modelsGalleryCards: ModelsGalleryCard[] = [
trackSrc: `${AI_MODELS_BASE}/gpt-image-2.vtt`
}
]
- },
- {
- titleKey: 'cloud.aiModels.card.klingAi30',
- badgeIcon: '/icons/ai-models/kling.svg',
- media: [
- {
- src: 'https://media.comfy.org/website/router/kling-3-video.webp'
- }
- ]
- },
- {
- titleKey: 'cloud.aiModels.card.flux3',
- badgeIcon: '/icons/ai-models/bfl.svg',
- media: [
- {
- src: 'https://media.comfy.org/website/router/flux-3-t2v.webp'
- }
- ]
}
]
diff --git a/apps/website/src/templates/platform/routerCopy.ts b/apps/website/src/templates/platform/routerCopy.ts
deleted file mode 100644
index 22c62224ffe..00000000000
--- a/apps/website/src/templates/platform/routerCopy.ts
+++ /dev/null
@@ -1,303 +0,0 @@
-import type { FaqItem } from '../../components/common/FAQSection.vue'
-import type { Locale } from '../../i18n/translations'
-
-type LocalizedText = { readonly en: string } & Partial>
-
-// The Router landing page's copy lives with the page rather than in the
-// sitewide translations chunk, which every route pays for.
-const copy = {
- 'platform.router.badge.label': {
- en: 'ROUTER',
- 'zh-CN': 'ROUTER'
- },
- 'platform.router.cta.getApiKey': {
- en: 'Get an API Key',
- 'zh-CN': '获取 API 密钥'
- },
- 'platform.router.cta.browseModels': {
- en: 'Browse Models',
- 'zh-CN': '浏览模型'
- },
- 'platform.router.migrate.title': {
- en: 'Migrate to Comfy Router with your agent',
- 'zh-CN': '用你的智能体迁移到 Comfy Router'
- },
- 'platform.router.migrate.subtitle': {
- en: "Help me migrate this project's existing model integration to Comfy Router.",
- 'zh-CN': '帮我把这个项目现有的模型集成迁移到 Comfy Router。'
- },
- 'platform.router.migrate.copyPrompt': {
- en: 'COPY PROMPT',
- 'zh-CN': '复制提示词'
- },
- 'platform.router.migrate.copied': { en: 'COPIED', 'zh-CN': '已复制' },
- 'platform.router.proof.caption': {
- en: 'The same models 3M+ ComfyUI users already use, now behind one API.',
- 'zh-CN': '300 万+ ComfyUI 用户正在使用的同一批模型,现在都在一个 API 之后。'
- },
- 'platform.router.code.heading': {
- en: 'Choose the provider in one line.',
- 'zh-CN': '一行代码,选择供应商。'
- },
- 'platform.router.code.supporting': {
- en: 'Change the provider. Keep everything else.',
- 'zh-CN': '更换供应商,其余代码不变。'
- },
- 'platform.router.code.providerLabel': {
- en: 'Provider',
- 'zh-CN': '供应商'
- },
- 'platform.router.video.alt': {
- en: 'Comfy Router explained: one API, your choice of provider for every job',
- 'zh-CN': 'Comfy Router 介绍:一个 API,每个任务都由你选择供应商'
- },
- 'platform.router.section1.heading': {
- en: 'Integrate once. Add models as you go.',
- 'zh-CN': '集成一次,模型随时添加。'
- },
- 'platform.router.section1.body': {
- en: 'Every provider you add brings another SDK, another key, another job lifecycle, and another set of errors. Build that once through Comfy Router, and the next model is one line.',
- 'zh-CN':
- '每新增一个供应商,就多一套 SDK、一个密钥、一套任务生命周期和一组错误处理。通过 Comfy Router 一次性搭建好这些,之后每加一个模型只需一行代码。'
- },
- 'platform.router.section2.heading': {
- en: 'Better availability. Better prices. No subscription.',
- 'zh-CN': '更高可用性。更优价格。无需订阅。'
- },
- 'platform.router.section2.body': {
- en: 'Run the same model on fal, Runware, or Wavespeed, and switch with one parameter when one is rate limited or another is cheaper. Comfy never switches the route for you, and every job reports the provider that ran it.',
- 'zh-CN':
- '同一个模型可在 fal、Runware 或 Wavespeed 上运行,当某个供应商被限流或另一个更便宜时,只需改一个参数即可切换。Comfy 绝不会替你切换路由,每个任务都会报告实际运行它的供应商。'
- },
- 'platform.router.section2.providersLabel': {
- en: 'Supported providers',
- 'zh-CN': '受支持的供应商'
- },
- 'platform.router.section2.providers': {
- en: 'fal · Runware · Wavespeed',
- 'zh-CN': 'fal · Runware · Wavespeed'
- },
- 'platform.router.section3.heading': {
- en: 'Hit a concurrency limit? Queue the job.',
- 'zh-CN': '遇到并发限制?把任务排入队列。'
- },
- 'platform.router.section3.body': {
- en: 'And let Comfy handle the wait. Use `submit` to get a request ID immediately. The job runs when a slot opens, and you can use the ID to check progress and retrieve the result. Or use `subscribe` to submit the job and wait until it completes.',
- 'zh-CN':
- '让 Comfy 替你等待。使用 `submit` 立即获得请求 ID。任务会在有空闲槽位时运行,你可以用这个 ID 查询进度并获取结果。或者使用 `subscribe` 提交任务并等待其完成。'
- },
- 'platform.router.roadmap.eyebrow': {
- en: 'Roadmap',
- 'zh-CN': '路线图'
- },
- 'platform.router.roadmap.heading': {
- en: 'Coming soon to the same API.',
- 'zh-CN': '即将登陆同一个 API。'
- },
- 'platform.router.roadmap.subtitle': {
- en: 'Provider choice is the foundation. Everything below arrives on the integration you ship today.',
- 'zh-CN': '供应商选择是基础。以下所有能力都会加入到你今天集成的这个 API 上。'
- },
- 'platform.router.roadmap.1.title': {
- en: 'Comfy workflows',
- 'zh-CN': 'Comfy 工作流'
- },
- 'platform.router.roadmap.1.description': {
- en: 'Run a ComfyUI workflow from the same SDK. Just like models.',
- 'zh-CN': '用同一个 SDK 运行 ComfyUI 工作流,就像调用模型一样。'
- },
- 'platform.router.roadmap.1.details': {
- en: 'Workflows run today through the Comfy API on the Developer Platform. Router support brings them behind the same key, the same job surface, and the same credits as every model call, so a pipeline you build in ComfyUI ships to your app as one request.',
- 'zh-CN':
- '工作流目前通过开发者平台上的 Comfy API 运行。Router 支持将把它们纳入同一个密钥、同一个任务接口和同一份积分,你在 ComfyUI 中构建的流水线只需一次请求即可接入你的应用。'
- },
- 'platform.router.roadmap.2.title': {
- en: 'Routing strategies',
- 'zh-CN': '路由策略'
- },
- 'platform.router.roadmap.2.description': {
- en: 'Name the policy: reliable, fast_start, fast_finish, or lowest_cost.',
- 'zh-CN': '指定策略:reliable、fast_start、fast_finish 或 lowest_cost。'
- },
- 'platform.router.roadmap.2.details': {
- en: 'Name the outcome you want instead of a provider. Comfy picks a route that fits the policy, and every job still reports the provider that ran it. Ordered fallback arrives alongside: a backup list Comfy uses only when a retry is known to be safe.',
- 'zh-CN':
- '不再指定供应商,而是指定你想要的结果。Comfy 会选择符合策略的路由,每个任务仍会报告实际执行的供应商。有序回退也将同步推出:仅在确认可安全重试时才启用备用列表。'
- },
- 'platform.router.roadmap.3.title': {
- en: 'Route by use case',
- 'zh-CN': '按使用场景路由'
- },
- 'platform.router.roadmap.3.description': {
- en: 'Request an upscale, a background removal, or an animation, and Comfy picks a model or workflow that can do it.',
- 'zh-CN':
- '请求一次放大、抠图或动画生成,Comfy 会自动选择能完成任务的模型或工作流。'
- },
- 'platform.router.roadmap.3.details': {
- en: 'Describe the task instead of the model. Comfy matches it to a model or workflow that can do it, on a provider that is up, so new models slot in without a change on your side.',
- 'zh-CN':
- '描述任务而不是模型。Comfy 会匹配一个能完成该任务的模型或工作流,并在可用的供应商上运行,新模型上线时你无需改动任何代码。'
- },
- 'platform.router.roadmap.4.title': {
- en: 'BYOK',
- 'zh-CN': '自带密钥(BYOK)'
- },
- 'platform.router.roadmap.4.description': {
- en: 'Use your own provider key for supported models while keeping the same Comfy Router integration.',
- 'zh-CN':
- '在支持的模型上使用你自己的供应商密钥,同时保留同一套 Comfy Router 集成。'
- },
- 'platform.router.roadmap.4.details': {
- en: 'Connect your own provider credentials and run supported models through the same Comfy Router API. Keep one SDK and job lifecycle while usage and billing for those calls stay with your provider.',
- 'zh-CN':
- '接入你自己的供应商凭据,通过同一套 Comfy Router API 运行支持的模型。SDK 和任务生命周期保持不变,这些调用的用量与计费仍归属于你的供应商。'
- },
- 'platform.router.roadmap.learnMore': {
- en: 'LEARN MORE',
- 'zh-CN': '了解更多'
- },
- 'platform.router.faq.heading': {
- en: 'FAQ',
- 'zh-CN': '常见问题'
- },
- 'platform.router.faq.1.q': {
- en: 'Why not call fal, Runware, or Wavespeed directly?',
- 'zh-CN': '为什么不直接调用 fal、Runware 或 Wavespeed?'
- },
- 'platform.router.faq.1.a': {
- en: 'You can, and plenty of teams do. Comfy Router earns its place when you need more than one: the same model on more than one provider, one key and one job surface, and a route you pick. Each provider routes to itself. Comfy Router gives you one surface across them.',
- 'zh-CN':
- '你当然可以,很多团队也是这么做的。但当你需要不止一个供应商时,Comfy Router 就有了价值:同一个模型可在多个供应商上运行,只用一个密钥和一套任务接口,路由由你选择。每个供应商只路由到它自己,Comfy Router 让你用一套接口覆盖所有供应商。'
- },
- 'platform.router.faq.2.q': {
- en: 'Is Comfy Router “OpenRouter for media”?',
- 'zh-CN': 'Comfy Router 是“媒体版的 OpenRouter”吗?'
- },
- 'platform.router.faq.2.a': {
- en: 'OpenRouter is known for routing language models. Comfy Router is built for generative media: large assets, model-specific controls, and jobs that run for minutes.',
- 'zh-CN':
- 'OpenRouter 以路由语言模型著称。Comfy Router 则是为生成式媒体打造的:大体积资源、模型专属的控制参数,以及可能运行数分钟的任务。'
- },
- 'platform.router.faq.3.q': {
- en: 'Does Comfy pick the provider for me?',
- 'zh-CN': 'Comfy 会替我选择供应商吗?'
- },
- 'platform.router.faq.3.a': {
- en: 'Not at launch. You name the provider and Comfy runs it there. Nothing is swapped behind your back.',
- 'zh-CN':
- '目前发布阶段不会。你指定供应商,Comfy 就在那里运行,绝不会在背后替你更换。'
- },
- 'platform.router.faq.4.q': {
- en: 'What happens if my provider is unavailable?',
- 'zh-CN': '如果我指定的供应商不可用怎么办?'
- },
- 'platform.router.faq.4.a': {
- en: 'The request fails on the provider you chose, with no silent substitution. Ordered fallback is on the roadmap: a backup list, used only when a retry is known to be safe.',
- 'zh-CN':
- '请求会在你选择的供应商上失败,不会被静默替换。有序的故障转移已在路线图上:一份备用列表,仅在确认重试安全时才会启用。'
- },
- 'platform.router.faq.5.q': {
- en: 'What happens when I hit my concurrency limit?',
- 'zh-CN': '当我达到并发上限时会发生什么?'
- },
- 'platform.router.faq.5.a': {
- en: 'Queue the job instead of retrying on a 429. Use submit to send the job and receive a request ID immediately; use that ID to check progress and retrieve the result on your own terms. If you want Comfy to wait for the result, use subscribe, which submits the job and polls until it completes. Queueing is available for all supported models.\n\nLearn more about concurrency limits.',
- 'zh-CN':
- '把任务排入队列,而不是在收到 429 后自行重试。使用 submit 发送任务并立即获得请求 ID,之后可按自己的节奏用该 ID 查询进度、获取结果。如果希望 Comfy 代为等待结果,可使用 subscribe,它会提交任务并轮询直到完成。所有受支持的模型都支持排队。\n\n了解更多并发限制信息。'
- },
- 'platform.router.faq.6.q': {
- en: 'How long do you keep my inputs and outputs?',
- 'zh-CN': '我的输入和输出会保留多久?'
- },
- 'platform.router.faq.6.a': {
- en: 'Inputs are kept for 24 hours after upload and outputs for 24 hours after generation. Then they’re deleted.',
- 'zh-CN':
- '输入在上传后保留 24 小时,输出在生成后保留 24 小时,之后即被删除。'
- },
- 'platform.router.faq.7.q': {
- en: 'I already use ComfyUI. What does Comfy Router add?',
- 'zh-CN': '我已经在使用 ComfyUI 了,Comfy Router 还能带来什么?'
- },
- 'platform.router.faq.7.a': {
- en: 'More ways to run the models you use. Reach supported models across providers, choose where they run, and switch when price, speed, or availability changes.',
- 'zh-CN':
- '为你正在使用的模型提供更多运行方式。跨供应商调用受支持的模型,选择它们在哪里运行,并在价格、速度或可用性变化时随时切换。'
- },
- 'platform.router.faq.8.q': {
- en: 'Can I call Comfy workflows too?',
- 'zh-CN': '我也可以调用 Comfy 工作流吗?'
- },
- 'platform.router.faq.8.a': {
- en: 'Not through Comfy Router yet. Workflows run today through the Comfy API on the Developer Platform, and Router support is on the roadmap.',
- 'zh-CN':
- '目前还不能通过 Comfy Router 调用。工作流现在通过开发者平台上的 Comfy API 运行,Router 对工作流的支持已在路线图上。'
- },
- 'platform.router.faq.9.q': {
- en: 'Where do my API keys, usage, and billing live?',
- 'zh-CN': '我的 API 密钥、用量和账单在哪里管理?'
- },
- 'platform.router.faq.9.a': {
- en: 'On the Developer Platform. Your API keys, run history, credits, and payments live there.',
- 'zh-CN': '在开发者平台。你的 API 密钥、运行记录、积分和付款都在那里。'
- },
- 'platform.router.faq.10.q': {
- en: 'Can I bring my own provider key?',
- 'zh-CN': '我可以使用自己的供应商密钥吗?'
- },
- 'platform.router.faq.10.a': {
- en: 'BYOK is available for select models on Enterprise. Access is enabled by request.\n\nContact Enterprise Sales',
- 'zh-CN':
- '在企业版中,部分模型支持自带密钥(BYOK),需申请开通。\n\n联系企业销售'
- },
- 'platform.router.faq.11.q': {
- en: 'How is Comfy Router priced?',
- 'zh-CN': 'Comfy Router 如何计费?'
- },
- 'platform.router.faq.11.a': {
- en: 'Comfy Router uses the same Comfy credits that cover Partner Nodes, Comfy Cloud workflow runs, and other supported model calls. Per-model pricing is listed in the model catalog, so you can see the cost for each model before you run it.',
- 'zh-CN':
- 'Comfy Router 使用与 Partner Nodes、Comfy Cloud 工作流运行及其他受支持模型调用相同的 Comfy 积分。每个模型的价格都列在模型目录中,运行前即可查看费用。'
- },
- 'platform.router.faq.12.q': {
- en: 'Do I need a Comfy subscription?',
- 'zh-CN': '我需要订阅 Comfy 吗?'
- },
- 'platform.router.faq.12.a': {
- en: 'No. Router runs on credits. Add credits and start calling models.',
- 'zh-CN': '不需要。Router 使用积分运行。充值积分后即可开始调用模型。'
- },
- 'platform.router.closing.headingAfterBadge': {
- en: 'Start building with Comfy Router today.',
- 'zh-CN': '现在就开始使用 Comfy Router 构建。'
- },
- 'platform.router.closing.subtitle': {
- en: 'Call frontier media models, choose your provider, get better pricing and availability. All behind one API.',
- 'zh-CN':
- '调用前沿媒体模型,自由选择供应商,获得更好的价格与可用性,一切都在一个 API 之内。'
- }
-} satisfies Record
-
-export type RouterCopyKey = keyof typeof copy
-
-export function routerT(key: RouterCopyKey, locale: Locale = 'en'): string {
- const entry: LocalizedText = copy[key]
- return entry[locale] ?? entry.en
-}
-
-function isRouterCopyKey(key: string): key is RouterCopyKey {
- return key in copy
-}
-
-/** The FAQ entries, in order, for as many numbered pairs as the copy holds. */
-export function routerFaq(locale: Locale = 'en'): FaqItem[] {
- const items: FaqItem[] = []
- for (let n = 1; ; n += 1) {
- const question = `platform.router.faq.${n}.q`
- const answer = `platform.router.faq.${n}.a`
- if (!isRouterCopyKey(question) || !isRouterCopyKey(answer)) return items
- items.push({
- question: routerT(question, locale),
- answer: routerT(answer, locale)
- })
- }
-}