waypoi 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/instructions/ui.instructions.md +42 -0
- package/.github/workflows/ci.yml +35 -0
- package/.github/workflows/publish.yml +71 -0
- package/.github/workflows/release.yml +48 -0
- package/.playwright-mcp/console-2026-04-04T01-41-10-746Z.log +2 -0
- package/.playwright-mcp/console-2026-04-04T01-41-28-799Z.log +3 -0
- package/.playwright-mcp/console-2026-04-05T02-26-51-909Z.log +76 -0
- package/.playwright-mcp/page-2026-04-04T01-41-10-816Z.yml +1 -0
- package/.playwright-mcp/page-2026-04-04T01-41-29-141Z.yml +77 -0
- package/.playwright-mcp/page-2026-04-04T01-41-42-633Z.yml +190 -0
- package/.playwright-mcp/page-2026-04-04T01-42-03-929Z.yml +262 -0
- package/.playwright-mcp/page-2026-04-04T02-12-54-813Z.yml +6 -0
- package/.playwright-mcp/page-2026-04-04T02-14-58-600Z.yml +190 -0
- package/.playwright-mcp/page-2026-04-04T02-15-03-923Z.yml +190 -0
- package/.playwright-mcp/page-2026-04-04T02-15-07-426Z.yml +190 -0
- package/.playwright-mcp/page-2026-04-04T02-15-25-729Z.yml +262 -0
- package/.playwright-mcp/page-2026-04-04T02-16-22-984Z.yml +262 -0
- package/.playwright-mcp/page-2026-04-04T02-17-00-599Z.yml +190 -0
- package/.playwright-mcp/page-2026-04-04T02-17-50-874Z.yml +190 -0
- package/.playwright-mcp/page-2026-04-05T02-26-55-570Z.yml +6 -0
- package/AGENTS.md +48 -0
- package/CHANGELOG.md +131 -0
- package/README.md +552 -0
- package/assets/agent-mode.png +0 -0
- package/assets/categorize.png +0 -0
- package/assets/dashboard.png +0 -0
- package/assets/endpoint-proxy.png +0 -0
- package/assets/icon.png +0 -0
- package/assets/mcp-generate-image.png +0 -0
- package/assets/mcp-understand-image.png +0 -0
- package/assets/peek-token-flow.png +0 -0
- package/assets/playground.png +0 -0
- package/assets/sankey.png +0 -0
- package/cli/index.ts +2805 -0
- package/cli/legacyRewrite.ts +108 -0
- package/cli/modelRef.ts +24 -0
- package/dist/cli/index.js +2536 -0
- package/dist/cli/legacyRewrite.js +92 -0
- package/dist/cli/modelRef.js +20 -0
- package/dist/src/benchmark/artifacts.js +131 -0
- package/dist/src/benchmark/capabilityClassifier.js +81 -0
- package/dist/src/benchmark/capabilityStore.js +144 -0
- package/dist/src/benchmark/config.js +238 -0
- package/dist/src/benchmark/gates.js +118 -0
- package/dist/src/benchmark/jobs.js +252 -0
- package/dist/src/benchmark/runner.js +1847 -0
- package/dist/src/benchmark/schema.js +353 -0
- package/dist/src/benchmark/suites.js +314 -0
- package/dist/src/benchmark/tinyQaDataset.js +422 -0
- package/dist/src/benchmark/types.js +25 -0
- package/dist/src/config.js +47 -0
- package/dist/src/index.js +178 -0
- package/dist/src/mcp/client.js +215 -0
- package/dist/src/mcp/discovery.js +226 -0
- package/dist/src/mcp/policy.js +65 -0
- package/dist/src/mcp/registry.js +129 -0
- package/dist/src/mcp/service.js +460 -0
- package/dist/src/middleware/auth.js +179 -0
- package/dist/src/middleware/requestCapture.js +192 -0
- package/dist/src/middleware/requestStats.js +118 -0
- package/dist/src/pools/builder.js +132 -0
- package/dist/src/pools/repository.js +69 -0
- package/dist/src/pools/scheduler.js +360 -0
- package/dist/src/pools/types.js +2 -0
- package/dist/src/protocols/adapters/dashscope.js +267 -0
- package/dist/src/protocols/adapters/inferenceV2.js +346 -0
- package/dist/src/protocols/adapters/openai.js +27 -0
- package/dist/src/protocols/registry.js +99 -0
- package/dist/src/protocols/types.js +2 -0
- package/dist/src/providers/health.js +153 -0
- package/dist/src/providers/importer.js +289 -0
- package/dist/src/providers/modelRegistry.js +313 -0
- package/dist/src/providers/repository.js +361 -0
- package/dist/src/providers/types.js +2 -0
- package/dist/src/routes/admin.js +531 -0
- package/dist/src/routes/audio.js +295 -0
- package/dist/src/routes/chat.js +240 -0
- package/dist/src/routes/embeddings.js +157 -0
- package/dist/src/routes/images.js +288 -0
- package/dist/src/routes/mcp.js +256 -0
- package/dist/src/routes/mcpService.js +100 -0
- package/dist/src/routes/models.js +48 -0
- package/dist/src/routes/responses.js +711 -0
- package/dist/src/routes/sessions.js +450 -0
- package/dist/src/routes/stats.js +270 -0
- package/dist/src/routes/ui.js +97 -0
- package/dist/src/routes/videos.js +107 -0
- package/dist/src/routing/router.js +338 -0
- package/dist/src/services/imageGeneration.js +280 -0
- package/dist/src/services/imageUnderstanding.js +352 -0
- package/dist/src/services/videoGeneration.js +79 -0
- package/dist/src/storage/captureRepository.js +1591 -0
- package/dist/src/storage/files.js +157 -0
- package/dist/src/storage/imageCache.js +346 -0
- package/dist/src/storage/repositories.js +388 -0
- package/dist/src/storage/sessionRepository.js +370 -0
- package/dist/src/storage/statsRepository.js +204 -0
- package/dist/src/transport/httpClient.js +126 -0
- package/dist/src/types.js +2 -0
- package/dist/src/utils/messageMedia.js +285 -0
- package/dist/src/utils/modelCapabilities.js +108 -0
- package/dist/src/utils/modelDiscovery.js +170 -0
- package/dist/src/version.js +5 -0
- package/dist/src/workers/captureRetention.js +25 -0
- package/dist/src/workers/configWatcher.js +91 -0
- package/dist/src/workers/healthChecker.js +21 -0
- package/dist/src/workers/statsRotation.js +41 -0
- package/docs/LLM/output_schema.md +312 -0
- package/docs/benchmark.md +208 -0
- package/docs/mcp-guidelines.md +125 -0
- package/docs/mcp-service.md +178 -0
- package/docs/opencode.md +86 -0
- package/docs/providers.md +79 -0
- package/examples/benchmark.config.yaml +28 -0
- package/examples/providers/alibaba-dashscope.yaml +88 -0
- package/examples/providers/alibaba-llm.yaml +64 -0
- package/examples/providers/alibaba-registry.yaml +7 -0
- package/examples/providers/inference-v2-ray.yaml +29 -0
- package/examples/scenarios/assets/omni-call-sample.wav +0 -0
- package/examples/scenarios/custom.jsonl +5 -0
- package/examples/scenarios/custom.yaml +40 -0
- package/model-form-v2.png +0 -0
- package/package.json +66 -0
- package/provider-form-v2.png +0 -0
- package/provider-form.png +0 -0
- package/scripts/manual-test.sh +11 -0
- package/scripts/version-from-git.js +23 -0
- package/src/benchmark/artifacts.ts +149 -0
- package/src/benchmark/capabilityClassifier.ts +99 -0
- package/src/benchmark/capabilityStore.ts +174 -0
- package/src/benchmark/config.ts +337 -0
- package/src/benchmark/gates.ts +164 -0
- package/src/benchmark/jobs.ts +312 -0
- package/src/benchmark/runner.ts +2519 -0
- package/src/benchmark/schema.ts +443 -0
- package/src/benchmark/suites.ts +323 -0
- package/src/benchmark/tinyQaDataset.ts +428 -0
- package/src/benchmark/types.ts +442 -0
- package/src/config.ts +44 -0
- package/src/index.ts +195 -0
- package/src/mcp/client.ts +305 -0
- package/src/mcp/discovery.ts +266 -0
- package/src/mcp/policy.ts +105 -0
- package/src/mcp/registry.ts +164 -0
- package/src/mcp/service.ts +611 -0
- package/src/middleware/auth.ts +251 -0
- package/src/middleware/requestCapture.ts +245 -0
- package/src/middleware/requestStats.ts +163 -0
- package/src/pools/builder.ts +159 -0
- package/src/pools/repository.ts +71 -0
- package/src/pools/scheduler.ts +425 -0
- package/src/pools/types.ts +117 -0
- package/src/protocols/adapters/dashscope.ts +335 -0
- package/src/protocols/adapters/inferenceV2.ts +428 -0
- package/src/protocols/adapters/openai.ts +32 -0
- package/src/protocols/registry.ts +117 -0
- package/src/protocols/types.ts +81 -0
- package/src/providers/health.ts +207 -0
- package/src/providers/importer.ts +402 -0
- package/src/providers/modelRegistry.ts +415 -0
- package/src/providers/repository.ts +439 -0
- package/src/providers/types.ts +113 -0
- package/src/routes/admin.ts +666 -0
- package/src/routes/audio.ts +372 -0
- package/src/routes/chat.ts +301 -0
- package/src/routes/embeddings.ts +197 -0
- package/src/routes/images.ts +356 -0
- package/src/routes/mcp.ts +320 -0
- package/src/routes/mcpService.ts +114 -0
- package/src/routes/models.ts +50 -0
- package/src/routes/responses.ts +872 -0
- package/src/routes/sessions.ts +558 -0
- package/src/routes/stats.ts +312 -0
- package/src/routes/ui.ts +96 -0
- package/src/routes/videos.ts +132 -0
- package/src/routing/router.ts +501 -0
- package/src/services/imageGeneration.ts +396 -0
- package/src/services/imageUnderstanding.ts +449 -0
- package/src/services/videoGeneration.ts +127 -0
- package/src/storage/captureRepository.ts +1835 -0
- package/src/storage/files.ts +178 -0
- package/src/storage/imageCache.ts +405 -0
- package/src/storage/repositories.ts +494 -0
- package/src/storage/sessionRepository.ts +419 -0
- package/src/storage/statsRepository.ts +238 -0
- package/src/transport/httpClient.ts +145 -0
- package/src/types.ts +322 -0
- package/src/utils/messageMedia.ts +293 -0
- package/src/utils/modelCapabilities.ts +161 -0
- package/src/utils/modelDiscovery.ts +203 -0
- package/src/workers/captureRetention.ts +25 -0
- package/src/workers/configWatcher.ts +115 -0
- package/src/workers/healthChecker.ts +22 -0
- package/src/workers/statsRotation.ts +49 -0
- package/tests/benchmarkAdminRoutes.test.ts +82 -0
- package/tests/benchmarkBasics.test.ts +116 -0
- package/tests/captureAdminRoutes.test.ts +420 -0
- package/tests/captureRepository.test.ts +797 -0
- package/tests/cliLegacyRewrite.test.ts +45 -0
- package/tests/imageGeneration.service.test.ts +107 -0
- package/tests/imageUnderstanding.service.test.ts +123 -0
- package/tests/mcpPolicy.test.ts +105 -0
- package/tests/mcpService.test.ts +1245 -0
- package/tests/modelRef.test.ts +23 -0
- package/tests/modelsRoutes.test.ts +154 -0
- package/tests/sessionMediaCache.test.ts +167 -0
- package/tests/statsRoutes.test.ts +323 -0
- package/tsconfig.json +15 -0
- package/ui/index.html +16 -0
- package/ui/package-lock.json +8521 -0
- package/ui/package.json +52 -0
- package/ui/postcss.config.js +6 -0
- package/ui/public/assets/apple-touch-icon.png +0 -0
- package/ui/public/assets/favicon-16.png +0 -0
- package/ui/public/assets/favicon-32.png +0 -0
- package/ui/public/assets/icon-192.png +0 -0
- package/ui/public/assets/icon-512.png +0 -0
- package/ui/src/App.tsx +27 -0
- package/ui/src/api/client.ts +1503 -0
- package/ui/src/components/EndpointUsageGuide.tsx +361 -0
- package/ui/src/components/Layout.tsx +124 -0
- package/ui/src/components/MessageContent.tsx +365 -0
- package/ui/src/components/ToolCallMessage.tsx +179 -0
- package/ui/src/components/ToolPicker.tsx +442 -0
- package/ui/src/components/messageContentParser.test.ts +41 -0
- package/ui/src/components/messageContentParser.ts +73 -0
- package/ui/src/components/thinkingPreview.test.ts +27 -0
- package/ui/src/components/thinkingPreview.ts +15 -0
- package/ui/src/components/toMermaidSankey.test.ts +78 -0
- package/ui/src/components/toMermaidSankey.ts +56 -0
- package/ui/src/components/ui/button.tsx +58 -0
- package/ui/src/components/ui/input.tsx +21 -0
- package/ui/src/components/ui/textarea.tsx +21 -0
- package/ui/src/lib/utils.ts +6 -0
- package/ui/src/main.tsx +9 -0
- package/ui/src/pages/AgentPlayground.tsx +2010 -0
- package/ui/src/pages/Benchmark.tsx +988 -0
- package/ui/src/pages/Dashboard.tsx +581 -0
- package/ui/src/pages/Peek.tsx +962 -0
- package/ui/src/pages/Settings.tsx +2013 -0
- package/ui/src/pages/agentPlaygroundPayload.test.ts +109 -0
- package/ui/src/pages/agentPlaygroundPayload.ts +97 -0
- package/ui/src/pages/agentThinkingContent.test.ts +50 -0
- package/ui/src/pages/agentThinkingContent.ts +57 -0
- package/ui/src/pages/dashboardTokenUsage.test.ts +66 -0
- package/ui/src/pages/dashboardTokenUsage.ts +36 -0
- package/ui/src/pages/imageUpload.test.ts +39 -0
- package/ui/src/pages/imageUpload.ts +71 -0
- package/ui/src/pages/peekFilters.test.ts +29 -0
- package/ui/src/pages/peekFilters.ts +13 -0
- package/ui/src/pages/peekMedia.test.ts +58 -0
- package/ui/src/pages/peekMedia.ts +148 -0
- package/ui/src/pages/sessionAutoTitle.test.ts +128 -0
- package/ui/src/pages/sessionAutoTitle.ts +106 -0
- package/ui/src/stores/settings.ts +58 -0
- package/ui/src/styles/globals.css +223 -0
- package/ui/src/vite-env.d.ts +8 -0
- package/ui/tailwind.config.js +106 -0
- package/ui/tsconfig.json +32 -0
- package/ui/vite.config.ts +37 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { BenchmarkScenario, BenchmarkScenarioSummary } from "./types";
|
|
2
|
+
import { TINY_QA_BENCHMARK, TinyQaRow } from "./tinyQaDataset";
|
|
3
|
+
|
|
4
|
+
const SHOWCASE_SUITE: BenchmarkScenario[] = TINY_QA_BENCHMARK.map((row) =>
|
|
5
|
+
toTinyQaShowcaseScenario(row)
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
const SUITES: Record<string, BenchmarkScenario[]> = {
|
|
9
|
+
showcase: SHOWCASE_SUITE,
|
|
10
|
+
smoke: [
|
|
11
|
+
{
|
|
12
|
+
id: "smoke-chat-exact",
|
|
13
|
+
mode: "chat",
|
|
14
|
+
prompt: "Reply exactly with: WAYPOI_SMOKE_OK",
|
|
15
|
+
assertions: {
|
|
16
|
+
contains: ["WAYPOI_SMOKE_OK"],
|
|
17
|
+
statusCode: 200,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "smoke-agent-loop",
|
|
22
|
+
mode: "agent",
|
|
23
|
+
prompt:
|
|
24
|
+
"If tools are available, call exactly one and summarize. If no tools are available, output NO_TOOLS_AVAILABLE. Prefix final answer with WAYPOI_AGENT_DONE:",
|
|
25
|
+
maxIterations: 4,
|
|
26
|
+
assertions: {
|
|
27
|
+
contains: ["WAYPOI_AGENT_DONE"],
|
|
28
|
+
statusCode: 200,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "smoke-embeddings-basic",
|
|
33
|
+
mode: "embeddings",
|
|
34
|
+
input: "waypoi benchmark smoke",
|
|
35
|
+
assertions: {
|
|
36
|
+
minItems: 1,
|
|
37
|
+
minVectorLength: 1,
|
|
38
|
+
statusCode: 200,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "smoke-image-generation",
|
|
43
|
+
mode: "image_generation",
|
|
44
|
+
prompt: "A tiny blue square on white background",
|
|
45
|
+
assertions: {
|
|
46
|
+
minImages: 1,
|
|
47
|
+
statusCode: 200,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "smoke-audio-speech",
|
|
52
|
+
mode: "audio_speech",
|
|
53
|
+
inputText: "Waypoi benchmark smoke",
|
|
54
|
+
voice: "alloy",
|
|
55
|
+
assertions: {
|
|
56
|
+
minBytes: 1,
|
|
57
|
+
statusCode: 200,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
proxy: [
|
|
62
|
+
{
|
|
63
|
+
id: "proxy-chat-short",
|
|
64
|
+
mode: "chat",
|
|
65
|
+
prompt: "Answer with one word: waypoi",
|
|
66
|
+
assertions: {
|
|
67
|
+
contains: ["waypoi"],
|
|
68
|
+
statusCode: 200,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "proxy-embeddings",
|
|
73
|
+
mode: "embeddings",
|
|
74
|
+
input: ["waypoi", "proxy", "benchmark"],
|
|
75
|
+
assertions: {
|
|
76
|
+
minItems: 3,
|
|
77
|
+
minVectorLength: 1,
|
|
78
|
+
statusCode: 200,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "proxy-image",
|
|
83
|
+
mode: "image_generation",
|
|
84
|
+
prompt: "A minimal icon of a gateway",
|
|
85
|
+
assertions: {
|
|
86
|
+
minImages: 1,
|
|
87
|
+
statusCode: 200,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
agent: [
|
|
92
|
+
{
|
|
93
|
+
id: "agent-tool-loop-basic",
|
|
94
|
+
mode: "agent",
|
|
95
|
+
prompt:
|
|
96
|
+
"Use available tools if useful, then provide a concise final answer prefixed with WAYPOI_AGENT_DONE:",
|
|
97
|
+
maxIterations: 6,
|
|
98
|
+
assertions: {
|
|
99
|
+
contains: ["WAYPOI_AGENT_DONE"],
|
|
100
|
+
statusCode: 200,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "agent-tool-required",
|
|
105
|
+
mode: "agent",
|
|
106
|
+
prompt: "Use at least one tool before answering.",
|
|
107
|
+
maxIterations: 6,
|
|
108
|
+
requiresAvailableTools: true,
|
|
109
|
+
assertions: {
|
|
110
|
+
minToolCalls: 1,
|
|
111
|
+
statusCode: 200,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
pool_smoke: [
|
|
116
|
+
{
|
|
117
|
+
id: "pool-smart-chat",
|
|
118
|
+
mode: "chat",
|
|
119
|
+
model: "smart",
|
|
120
|
+
prompt: "Reply exactly with: WAYPOI_POOL_SMOKE_OK",
|
|
121
|
+
assertions: {
|
|
122
|
+
contains: ["WAYPOI_POOL_SMOKE_OK"],
|
|
123
|
+
statusCode: 200,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "pool-smart-agent",
|
|
128
|
+
mode: "agent",
|
|
129
|
+
model: "smart",
|
|
130
|
+
prompt: "Answer with prefix WAYPOI_POOL_AGENT_DONE:",
|
|
131
|
+
assertions: {
|
|
132
|
+
contains: ["WAYPOI_POOL_AGENT_DONE:"],
|
|
133
|
+
statusCode: 200,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
omni_call_smoke: [
|
|
138
|
+
{
|
|
139
|
+
id: "omni-call-basic",
|
|
140
|
+
mode: "omni_call",
|
|
141
|
+
prompt: "Please transcribe this audio and summarize it in one sentence.",
|
|
142
|
+
audioFile: "examples/scenarios/assets/omni-call-sample.wav",
|
|
143
|
+
assertions: {
|
|
144
|
+
statusCode: 200,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
capabilities: [
|
|
149
|
+
{
|
|
150
|
+
id: "cap.chat_basic",
|
|
151
|
+
mode: "chat",
|
|
152
|
+
capability: "chat_basic",
|
|
153
|
+
prompt: "Reply exactly with: WAYPOI_CAP_CHAT_BASIC_OK",
|
|
154
|
+
assertions: {
|
|
155
|
+
contains: ["WAYPOI_CAP_CHAT_BASIC_OK"],
|
|
156
|
+
statusCode: 200,
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "cap.chat_streaming",
|
|
161
|
+
mode: "chat",
|
|
162
|
+
capability: "chat_streaming",
|
|
163
|
+
prompt: "Reply exactly with: WAYPOI_CAP_STREAMING_OK",
|
|
164
|
+
assertions: {
|
|
165
|
+
contains: ["WAYPOI_CAP_STREAMING_OK"],
|
|
166
|
+
statusCode: 200,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "cap.chat_tool_calls",
|
|
171
|
+
mode: "agent",
|
|
172
|
+
capability: "chat_tool_calls",
|
|
173
|
+
prompt: "Use at least one tool if available, then output WAYPOI_CAP_TOOL_CALLS_OK.",
|
|
174
|
+
maxIterations: 4,
|
|
175
|
+
requiresAvailableTools: true,
|
|
176
|
+
assertions: {
|
|
177
|
+
contains: ["WAYPOI_CAP_TOOL_CALLS_OK"],
|
|
178
|
+
minToolCalls: 1,
|
|
179
|
+
statusCode: 200,
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "cap.chat_vision_input",
|
|
184
|
+
mode: "chat",
|
|
185
|
+
capability: "chat_vision_input",
|
|
186
|
+
prompt: "Vision probe placeholder: reply with WAYPOI_CAP_VISION_UNKNOWN when image input is unavailable.",
|
|
187
|
+
assertions: {
|
|
188
|
+
statusCode: 200,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: "cap.images_generation",
|
|
193
|
+
mode: "image_generation",
|
|
194
|
+
capability: "images_generation",
|
|
195
|
+
prompt: "A monochrome square icon.",
|
|
196
|
+
assertions: {
|
|
197
|
+
minImages: 1,
|
|
198
|
+
statusCode: 200,
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: "cap.images_edit",
|
|
203
|
+
mode: "image_generation",
|
|
204
|
+
capability: "images_edit",
|
|
205
|
+
prompt: "Image edit probe placeholder",
|
|
206
|
+
assertions: {
|
|
207
|
+
statusCode: 200,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: "cap.embeddings",
|
|
212
|
+
mode: "embeddings",
|
|
213
|
+
capability: "embeddings",
|
|
214
|
+
input: "waypoi capability embeddings probe",
|
|
215
|
+
assertions: {
|
|
216
|
+
minItems: 1,
|
|
217
|
+
minVectorLength: 1,
|
|
218
|
+
statusCode: 200,
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: "cap.audio_transcription",
|
|
223
|
+
mode: "audio_transcription",
|
|
224
|
+
capability: "audio_transcription",
|
|
225
|
+
audioFile: "examples/scenarios/assets/omni-call-sample.wav",
|
|
226
|
+
assertions: {
|
|
227
|
+
statusCode: 200,
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: "cap.audio_speech",
|
|
232
|
+
mode: "audio_speech",
|
|
233
|
+
capability: "audio_speech",
|
|
234
|
+
inputText: "Waypoi capability speech probe",
|
|
235
|
+
voice: "alloy",
|
|
236
|
+
assertions: {
|
|
237
|
+
minBytes: 1,
|
|
238
|
+
statusCode: 200,
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: "cap.responses_compat",
|
|
243
|
+
mode: "responses",
|
|
244
|
+
capability: "responses_compat",
|
|
245
|
+
prompt: "Summarize why the Responses API compatibility route matters in one sentence.",
|
|
246
|
+
assertions: {
|
|
247
|
+
statusCode: 200,
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
function toTinyQaShowcaseScenario(row: TinyQaRow): BenchmarkScenario {
|
|
254
|
+
const padded = String(row.id).padStart(3, "0");
|
|
255
|
+
return {
|
|
256
|
+
id: `showcase-tinyqa-${padded}`,
|
|
257
|
+
mode: "chat",
|
|
258
|
+
title: `Tiny QA #${padded}`,
|
|
259
|
+
summary: "Single-question QA probe from vincentkoc/tiny_qa_benchmark.",
|
|
260
|
+
userVisibleGoal: "Answer a tiny QA question with a concise factual response.",
|
|
261
|
+
exampleSource: "huggingface",
|
|
262
|
+
inputPreview: row.question,
|
|
263
|
+
successCriteria: `HTTP 200 and answer includes: ${row.answer}`,
|
|
264
|
+
expectedHighlights: [`category:${row.category}`, `difficulty:${row.difficulty}`, "gold-answer check"],
|
|
265
|
+
prompt: [
|
|
266
|
+
"Answer with only the final short answer.",
|
|
267
|
+
`Question: ${row.question}`,
|
|
268
|
+
`Reference: ${row.context}`,
|
|
269
|
+
].join("\n"),
|
|
270
|
+
assertions: {
|
|
271
|
+
statusCode: 200,
|
|
272
|
+
contains: [row.answer],
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function builtInSuite(name: string): BenchmarkScenario[] {
|
|
278
|
+
const suite = SUITES[name];
|
|
279
|
+
if (!suite) {
|
|
280
|
+
const available = Object.keys(SUITES).sort().join(", ");
|
|
281
|
+
throw new Error(`Unknown benchmark suite '${name}'. Available: ${available}`);
|
|
282
|
+
}
|
|
283
|
+
return suite.map(cloneScenario);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export function listBuiltInSuites(): string[] {
|
|
287
|
+
return Object.keys(SUITES).sort();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function listSuiteExamples(name: string): BenchmarkScenarioSummary[] {
|
|
291
|
+
return builtInSuite(name).map((scenario) => toScenarioSummary(name, scenario));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function cloneScenario(scenario: BenchmarkScenario): BenchmarkScenario {
|
|
295
|
+
return {
|
|
296
|
+
...scenario,
|
|
297
|
+
assertions: { ...scenario.assertions },
|
|
298
|
+
expectedHighlights: scenario.expectedHighlights ? [...scenario.expectedHighlights] : undefined,
|
|
299
|
+
tools: scenario.tools ? [...scenario.tools] : undefined,
|
|
300
|
+
input: Array.isArray(scenario.input) ? [...scenario.input] : scenario.input,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function toScenarioSummary(suite: string, scenario: BenchmarkScenario): BenchmarkScenarioSummary {
|
|
305
|
+
return {
|
|
306
|
+
id: scenario.id,
|
|
307
|
+
suite,
|
|
308
|
+
mode: scenario.mode,
|
|
309
|
+
title: scenario.title ?? scenario.id,
|
|
310
|
+
summary: scenario.summary ?? "Built-in benchmark scenario.",
|
|
311
|
+
userVisibleGoal: scenario.userVisibleGoal ?? "Exercise the configured model path and inspect the result.",
|
|
312
|
+
exampleSource: scenario.exampleSource ?? "builtin",
|
|
313
|
+
inputPreview:
|
|
314
|
+
scenario.inputPreview ??
|
|
315
|
+
scenario.prompt ??
|
|
316
|
+
scenario.inputText ??
|
|
317
|
+
(typeof scenario.input === "string" ? scenario.input : Array.isArray(scenario.input) ? scenario.input.join(" | ") : ""),
|
|
318
|
+
successCriteria: scenario.successCriteria ?? "All configured assertions pass.",
|
|
319
|
+
expectedHighlights: scenario.expectedHighlights ?? [],
|
|
320
|
+
requiresAvailableTools: scenario.requiresAvailableTools === true,
|
|
321
|
+
model: scenario.model,
|
|
322
|
+
};
|
|
323
|
+
}
|