Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions packages/app/cypress/e2e/agentx-optimizations.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import { unlockAgenticGate } from '../support/e2e';

const FRAMEWORK_SLUGS = [
'vllm',
'sglang',
'tensorrt-llm',
'atom',
'aiter',
'dynamo',
'lmcache',
'mooncake',
];

describe('AgentX optimizations', () => {
beforeEach(() => {
cy.intercept('GET', '/api/v1/datasets', { statusCode: 200, body: [] });
});

it('links from /agentx to the optimizations index and to each project', () => {
cy.visit('/agentx', { onBeforeLoad: unlockAgenticGate });

cy.get('[data-testid="agentx-optimizations-callout"]').within(() => {
cy.contains('h2', 'Optimizations for Agentic Workloads').should('be.visible');
cy.contains('50+ upstream pull requests').should('be.visible');
cy.get('[data-testid="agentx-optimizations-framework-link"]').should(
'have.length',
FRAMEWORK_SLUGS.length,
);
// Direct route into one project, for a reader who knows which engine they run.
cy.get('[data-testid="agentx-optimizations-framework-link"][data-framework="sglang"]').should(
'have.attr',
'href',
'/agentx/optimizations/sglang',
);
cy.get('[data-testid="agentx-optimizations-cta"]')
.should('contain.text', 'Read the optimizations')
.click();
});

cy.location('pathname').should('eq', '/agentx/optimizations');
});

it('publishes the index with the ecosystem primer, every project, and sourced PRs', () => {
cy.visit('/agentx/optimizations', { onBeforeLoad: unlockAgenticGate });

cy.get('[data-testid="agentx-optimizations-index"]').within(() => {
cy.get('h1').should('have.text', 'Optimizations for Agentic Workloads');
cy.get('[data-testid="agentx-optimizations-card"]').should(
'have.length',
FRAMEWORK_SLUGS.length,
);
cy.get('[data-testid="agentx-optimizations-section-ecosystem"]').should(
'contain.text',
'A brief introduction to the distributed inference ecosystem',
);
cy.get('[data-testid="agentx-optimizations-figure-servingStack"] img').should('be.visible');
// The day-zero section keeps its own upstream references.
cy.get('[data-testid="agentx-optimizations-section-other"]')
.find('[data-testid="agentx-optimizations-pr"]')
.first()
.should('have.attr', 'href')
.and('match', /^https:\/\/github\.com\/vllm-project\/vllm\/pull\/\d+$/u);
cy.get('[data-testid="agentx-optimizations-card"][data-framework="vllm"]').click();
});

cy.location('pathname').should('eq', '/agentx/optimizations/vllm');
});

it('renders a project page with its measurements, figures, and PR links', () => {
cy.visit('/agentx/optimizations/vllm', { onBeforeLoad: unlockAgenticGate });

cy.get('[data-testid="agentx-optimizations-article"]')
.should('have.attr', 'data-framework', 'vllm')
.within(() => {
cy.get('h1').should('have.text', 'vLLM');
cy.contains('prefix-cache hit rate above 95%').should('be.visible');
cy.contains('81.7% higher output throughput').should('be.visible');
cy.get('[data-testid="agentx-optimizations-figure-vllmSelectiveRetention"] img').should(
'be.visible',
);
cy.get('[data-testid="agentx-optimizations-pr"]')
.should('have.length.greaterThan', 20)
.first()
.should('have.attr', 'href', 'https://github.com/vllm-project/vllm/pull/43447')
.and('contain.text', 'vLLM #43447');
// Sibling projects stay one click away.
cy.get('[data-testid="agentx-optimizations-card"]').should(
'have.length',
FRAMEWORK_SLUGS.length - 1,
);
});
});

it('serves every project page and pairs each with its Chinese sibling', () => {
for (const slug of FRAMEWORK_SLUGS) {
cy.request(`/agentx/optimizations/${slug}`).its('status').should('eq', 200);
cy.request(`/zh/agentx/optimizations/${slug}`).its('status').should('eq', 200);
}
});

it('returns 404 for a project that does not exist', () => {
cy.request({ url: '/agentx/optimizations/not-a-framework', failOnStatusCode: false })
.its('status')
.should('eq', 404);
});

it('ships the Simplified Chinese index and project pages', () => {
cy.visit('/zh/agentx', { onBeforeLoad: unlockAgenticGate });
cy.get('[data-testid="agentx-optimizations-callout"]').within(() => {
cy.contains('h2', '面向智能体负载的优化').should('be.visible');
cy.get('[data-testid="agentx-optimizations-cta"]')
.should('contain.text', '查看优化详情')
.and('have.attr', 'href', '/zh/agentx/optimizations');
});

cy.visit('/zh/agentx/optimizations', { onBeforeLoad: unlockAgenticGate });
cy.get('[data-testid="agentx-optimizations-index"]').within(() => {
cy.get('h1').should('have.text', '面向智能体负载的优化');
cy.contains('分布式推理生态简介').should('be.visible');
cy.get('[data-testid="agentx-optimizations-card"]').should(
'have.length',
FRAMEWORK_SLUGS.length,
);
cy.get('[data-testid="agentx-optimizations-card"][data-framework="lmcache"]').should(
'have.attr',
'href',
'/zh/agentx/optimizations/lmcache',
);
});
cy.get('link[rel="alternate"][hreflang="en"]').should(
'have.attr',
'href',
'https://inferencex.semianalysis.com/agentx/optimizations',
);

cy.visit('/zh/agentx/optimizations/sglang', { onBeforeLoad: unlockAgenticGate });
cy.get('[data-testid="agentx-optimizations-article"]').within(() => {
// Product names stay English; the prose around them is translated.
cy.get('h1').should('have.text', 'SGLang');
cy.contains('HiCache offload').should('be.visible');
cy.contains('并发 384 下输出吞吐量提升 26.75%').should('be.visible');
cy.get('[data-testid="agentx-optimizations-pr"]')
.first()
.should('have.attr', 'href')
.and('match', /^https:\/\/github\.com\/sgl-project\/sglang\/pull\/\d+$/u);
});
});
});
6 changes: 6 additions & 0 deletions packages/app/cypress/e2e/datasets-methodology.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ describe('AgentX dataset methodology', () => {
cy.get('[data-testid="agentx-methodology-cta"]')
.should('contain.text', 'Read the full methodology')
.and('have.attr', 'href', '/agentx/methodology');
cy.get('[data-testid="agentx-results-cta"]')
.should('contain.text', 'View AgentX Performance Results')
.and('have.attr', 'href', '/overview');
});
});

Expand All @@ -43,6 +46,9 @@ describe('AgentX dataset methodology', () => {
cy.get('[data-testid="agentx-methodology-cta"]')
.should('contain.text', '深入了解 AgentX 方法论')
.and('have.attr', 'href', '/zh/agentx/methodology');
cy.get('[data-testid="agentx-results-cta"]')
.should('contain.text', '查看 AgentX 性能结果')
.and('have.attr', 'href', '/zh/overview');
});
});

Expand Down
21 changes: 16 additions & 5 deletions packages/app/cypress/e2e/nudge-system.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ function clearAllNudgeStorage(win: Cypress.AUTWindow) {
}
}

/**
* Banner-only state: everything cleared except the launch modal, which stays
* dismissed. The modal is centered behind a full-screen backdrop, and that
* backdrop covers the banner — including its dismiss button — whenever both
* are eligible. These tests are about the banner, so keep the modal out.
*/
function clearBannerNudgeStorage(win: Cypress.AUTWindow) {
clearAllNudgeStorage(win);
win.localStorage.setItem('inferencex-agentic-results-modal-dismissed', '1');
}

// `cypress.config.ts` runs with `testIsolation: false` — the browser context
// (incl. localStorage / sessionStorage) survives across tests in this spec.
// Defensively clear before each test so a missed `onBeforeLoad` in any test
Expand Down Expand Up @@ -227,7 +238,7 @@ describe('Landing nudges — banner', () => {
it('shows launch banner on landing page', () => {
cy.visit('/', {
onBeforeLoad(win) {
clearAllNudgeStorage(win);
clearBannerNudgeStorage(win);
// Dismiss modals so the banner (highest priority at 60) is the active nudge.
// Actually the banner has priority 60 > launch modal 50, so it should show first.
// But the engine only shows one nudge at a time; the banner wins because of priority.
Expand All @@ -241,7 +252,7 @@ describe('Landing nudges — banner', () => {

it('banner renders within container constraints (not full-width)', () => {
cy.visit('/', {
onBeforeLoad: clearAllNudgeStorage,
onBeforeLoad: clearBannerNudgeStorage,
});
cy.get('[data-testid="launch-banner"]').should('be.visible');
// The banner's parent section has the container class for width constraints
Expand All @@ -250,7 +261,7 @@ describe('Landing nudges — banner', () => {

it('dismissing the banner persists across reloads', () => {
cy.visit('/', {
onBeforeLoad: clearAllNudgeStorage,
onBeforeLoad: clearBannerNudgeStorage,
});
cy.get('[data-testid="launch-banner"]').should('be.visible');
cy.get('[data-testid="launch-banner-dismiss"]').click();
Expand All @@ -262,7 +273,7 @@ describe('Landing nudges — banner', () => {

it('rendering the banner does not write its dismissal storage key', () => {
cy.visit('/', {
onBeforeLoad: clearAllNudgeStorage,
onBeforeLoad: clearBannerNudgeStorage,
});
cy.get('[data-testid="launch-banner"]').should('be.visible');
cy.window().then((win) => {
Expand All @@ -273,7 +284,7 @@ describe('Landing nudges — banner', () => {

it('clicking the banner body navigates without persisting dismissal', () => {
cy.visit('/', {
onBeforeLoad: clearAllNudgeStorage,
onBeforeLoad: clearBannerNudgeStorage,
});
cy.get('[data-testid="launch-banner"]').should('be.visible');
cy.get('[data-testid="launch-banner"]').click();
Expand Down
5 changes: 4 additions & 1 deletion packages/app/cypress/e2e/zh-pages.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ describe('Chinese (/zh) pages', () => {
});

it('footer renders in Chinese with zh-internal links', () => {
cy.get('[data-testid="footer-brand-description"]').should('contain.text', '智能体推理');
cy.get('[data-testid="footer-brand-description"]').should(
'contain.text',
'持续的开源推理基准测试',
);
cy.get('[data-testid="footer-link-supporters"]')
.should('contain.text', '支持者')
.and('have.attr', 'href', '/zh/quotes');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions packages/app/src/app/agentx/optimizations/[framework]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import type { Metadata } from 'next';
import { notFound } from 'next/navigation';

import { AgentXOptimizationsArticle } from '@/components/datasets/agentx-optimizations-article';
import { JsonLd } from '@/components/json-ld';
import {
AGENTX_OPTIMIZATION_FRAMEWORKS,
getOptimizationFramework,
} from '@/lib/agentx-optimizations';
import { enAlternates } from '@/lib/i18n';
import { SITE_URL } from '@semianalysisai/inferencex-constants';

interface Props {
params: Promise<{ framework: string }>;
}

export function generateStaticParams() {
return AGENTX_OPTIMIZATION_FRAMEWORKS.map((entry) => ({ framework: entry.slug }));
}

export const dynamicParams = false;

export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { framework: slug } = await params;
const framework = getOptimizationFramework(slug);
if (!framework) return {};
const title = `${framework.name} Agentic Optimizations`;
return {
title,
description: framework.summary,
alternates: enAlternates(`/agentx/optimizations/${slug}`),
openGraph: {
title: `${title} | InferenceX`,
description: framework.summary,
url: `${SITE_URL}/agentx/optimizations/${slug}`,
},
twitter: { title: `${title} | InferenceX`, description: framework.summary },
};
}

export default async function AgentXOptimizationsFrameworkPage({ params }: Props) {
const { framework: slug } = await params;
const framework = getOptimizationFramework(slug);
if (!framework) notFound();

const jsonLd = {
'@context': 'https://schema.org',
'@type': 'TechArticle',
headline: `${framework.name} Agentic Optimizations`,
description: framework.summary,
url: `${SITE_URL}/agentx/optimizations/${slug}`,
inLanguage: 'en',
isPartOf: { '@type': 'WebSite', name: 'InferenceX', url: SITE_URL },
};

return (
<main className="relative">
<JsonLd data={jsonLd} />
<div className="container mx-auto max-w-6xl px-4 pb-12 lg:px-8">
<AgentXOptimizationsArticle slug={slug} locale="en" />
</div>
</main>
);
}
45 changes: 45 additions & 0 deletions packages/app/src/app/agentx/optimizations/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import type { Metadata } from 'next';

import { AgentXOptimizationsIndex } from '@/components/datasets/agentx-optimizations-article';
import { JsonLd } from '@/components/json-ld';
import { OPTIMIZATIONS_OVERVIEW } from '@/lib/agentx-optimizations';
import { enAlternates } from '@/lib/i18n';
import { SITE_URL } from '@semianalysisai/inferencex-constants';

const TITLE = 'AgentX Industry Impact: Optimizations for Agentic Workloads';
const DESCRIPTION =
'The 50+ upstream pull requests AgentX drove across vLLM, SGLang, TensorRT-LLM, ATOM, AITER, Dynamo, LMCache, and Mooncake.';

export const metadata: Metadata = {
title: 'AgentX Industry Impact',
description: DESCRIPTION,
alternates: enAlternates('/agentx/optimizations'),
openGraph: {
title: `${TITLE} | InferenceX`,
description: DESCRIPTION,
url: `${SITE_URL}/agentx/optimizations`,
},
twitter: { title: `${TITLE} | InferenceX`, description: DESCRIPTION },
};

const jsonLd = {
'@context': 'https://schema.org',
'@type': 'TechArticle',
headline: TITLE,
description: DESCRIPTION,
url: `${SITE_URL}/agentx/optimizations`,
inLanguage: 'en',
about: OPTIMIZATIONS_OVERVIEW.title,
isPartOf: { '@type': 'WebSite', name: 'InferenceX', url: SITE_URL },
};

export default function AgentXOptimizationsPage() {
return (
<main className="relative">
<JsonLd data={jsonLd} />
<div className="container mx-auto max-w-6xl px-4 pb-12 lg:px-8">
<AgentXOptimizationsIndex locale="en" />
</div>
</main>
);
}
5 changes: 5 additions & 0 deletions packages/app/src/app/agentx/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';

import { AgentXMethodology } from '@/components/datasets/agentx-methodology';
import { AgentXOptimizationsCallout } from '@/components/datasets/agentx-optimizations-callout';
import { DatasetList } from '@/components/datasets/dataset-list';
import { JsonLd } from '@/components/json-ld';
import { enAlternates } from '@/lib/i18n';
Expand Down Expand Up @@ -38,6 +39,10 @@ export default function AgentXPage() {
<AgentXMethodology locale="en" />
</section>

<section>
<AgentXOptimizationsCallout locale="en" />
</section>

<section className="flex flex-col gap-3">
<h2 className="text-lg font-semibold text-foreground">Datasets</h2>
<DatasetList />
Expand Down
13 changes: 13 additions & 0 deletions packages/app/src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { MetadataRoute } from 'next';

import { AGENTX_OPTIMIZATION_SLUGS } from '@/lib/agentx-optimizations';
import { getAllPosts } from '@/lib/blog';
import { getAllComparableCompareSlugs } from '@/lib/compare-availability';
import { canonicalCompareSlug } from '@/lib/compare-slug';
Expand Down Expand Up @@ -100,6 +101,18 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
changeFrequency: 'monthly',
priority: 0.6,
}),
...localizedPair('/agentx/optimizations', {
lastModified: now,
changeFrequency: 'monthly',
priority: 0.7,
}),
...AGENTX_OPTIMIZATION_SLUGS.flatMap((slug) =>
localizedPair(`/agentx/optimizations/${slug}`, {
lastModified: now,
changeFrequency: 'monthly' as const,
priority: 0.6,
}),
),
...localizedPair('/api', { lastModified: now, changeFrequency: 'monthly', priority: 0.7 }),
...localizedPair('/blog', { lastModified: now, changeFrequency: 'weekly', priority: 0.8 }),
...localizedPair('/glossary', {
Expand Down
Loading