2.1 KiB
2.1 KiB
Context
- The toolbox already hosts component-based tools (batch image, video analyzer). Provider routing/runtime discovery supply resolved
modelRef/providercontext. Task history imposes retention limits; mixing benchmark data there pollutes user tasks. - Requirements: per-modality benchmark sessions, lightweight result store, settings shortcut, ranking modes, default low-cost prompts, manual rating/categorization.
Goals
- Build a dedicated benchmark workbench tool that opens via toolbox or settings shortcut, orchestrates multiple supplier/model invocations per modality, and records the per-entry metrics needed for ranking.
- Keep benchmark data isolated from the core task queue while reusing adapter execution and caching preview URLs only long enough for comparison (no auto-insertion).
- Present default prompts optimized for fast, low-cost tests yet expose override points; allow sorting by speed/cost/composite and manual rating/heart to surface user favorites.
Non-Goals
- Do not reuse the main task queue for benchmark execution.
- Do not automatically insert benchmark outputs into the canvas or media history.
- Do not implement full AI scoring in V1—manual ratings drive “效果最好”.
Decisions
- The workbench stores
BenchmarkSession→BenchmarkEntryrecords in a new service backed byKVStorage(similar to prompt storage) keyed bysessionId. - Execution will call
resolveAdapterForInvocationwith the chosenmodelRef/modelId/routeTypeand rungenerateImage/Video/AudioorsendChatMessage(for text) via the existing adapters, capturing start/finish timestamps and HTTP duration. - Settings dialog renders quick buttons per provider/model entry; click triggers
toolWindowService.openToolwith component props selecting the session mode (“same model other providers”, etc.). - Sorting modes implemented as pure client filtering on
BenchmarkEntrymetadata; default ranking uses success rate + 90th percentile completion time to favor faster results, with cost as tiebreaker. - Manual rating (
score0-5) andfavorite/rejectflags are stored per entry; these influence composite ranking but do not change metrics.