Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
背景
Second)。
本次改动
tps_test_provider(src-tauri/src/commands/tps_test.rs)TpsTestService(src-tauri/src/services/tps_test.rs)usage统计输出 tokens;缺失时按 UTF-8 字节数估算(
ceil(bytes/4)),计算 TPSsrc/ components/providers/ProviderActions.tsx)错误)(
src/components/providers/ProviderCard.tsx)useTpsTest,按 providerId 维度管理测试中状态与最近一次结果;失败/异常弹 Toast(
src/hooks/useTpsTest.ts)invoke封装:tpsTestProvider、TpsTestResult(src/lib/ api/model-test.ts)src/i18n/locales/{zh,en,ja}.json风险与注意事项
usage时会走本地估算,精度有限。fix(proxy)提交移除了_前缀字段过滤相关逻辑(原注释意图为“防止内部信息泄露”);请确认该行为变化是否符合预期。
验证方式
cargo test --manifest-path src-tauri/Cargo.tomlcorepack pnpm typecheck、corepack pnpm test:unit时与失败提示。