Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

test-matrix.ts

33 lines960 Bytes

1import type { Provider, Feature } from '../src/lib/types'
2import { isSupported } from '../src/lib/feature-support'
3​
4/**
5 * Provider × feature matrix for Playwright specs.
6 *
7 * The underlying `matrix` and `isSupported` are imported from
8 * `src/lib/feature-support.ts` — that file is the single source of truth.
9 * Any provider-exclusion notes (Gemini tool-approval, Gemini image-gen,
10 * Ollama text-tool-text) live there.
11 *
12 * The `providers` iteration order below is the order specs run in. Keep it
13 * stable to avoid unrelated churn in screenshots, logs, and grep filters.
14 */
15​
16export const providers: Provider[] = [
17 'openai',
18 'anthropic',
19 'gemini',
20 'ollama',
21 'groq',
22 'grok',
23 'openrouter',
24 'openrouter-responses',
25 'elevenlabs',
27​
28export { isSupported }
29​
30/** Get only the providers that support a given feature */
31export function providersFor(feature: Feature): Provider[] {
32 return providers.filter((p) => isSupported(p, feature))