Add provider sla#103
Conversation
|
@OG-wura is attempting to deploy a commit to the emrekayat's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@OG-wura Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks for the PR. I rechecked the merge ref from the maintainer account. The functional checks pass: git diff --check main...pr-103-merge
npm run test --workspace @query402/shared
npm run test --workspace @query402/api -- src/lib/pricing.test.ts src/providers/registry.test.ts src/routes/public.test.ts
npm run test --workspace @query402/agent-client -- src/validate-real.test.ts
npm run typecheck --workspace @query402/api
npm run typecheck --workspace @query402/web
npm run typecheck --workspace @query402/agent-clientResults: shared tests pass (20), API tests pass (38), validate-real tests pass (7), and all typechecks pass. I cannot merge this exact PR yet because the diff is too broad/noisy for #72:
Please remove the lockfile churn and keep the branch focused on provider SLA/catalog/shared/web changes. Once narrowed, the green checks above look promising. |
- Revert package-lock.json to main (no dependency changes, only metadata churn) - Revert apps/agent-client/src/validate-real.ts to main (unrelated to SLA badges) - Remove apps/agent-client/src/validate-real.test.ts (added by this PR, unrelated)
Resolved conflicts in public.ts (merged import of getSortedProviders with DemoScenarioManifest) and public.test.ts (kept all PR-added tests).
|
done |
Close #72
R description:
Summary
Adds lightweight SLA badge fields to provider catalog responses so
reviewers can assess provider safety and reliability at a glance
before paying for a query.
Changes
packages/shared/types.ts— NewLatencyBand,ReliabilityBand,PaymentModetypes;
SlaBadgesinterface with band enums + UI-safe label strings.Added
slaBadges: SlaBadgestoProviderDefinition.schemas.ts— NewlatencyBandSchema,reliabilityBandSchema,paymentModeSchema,slaBadgesSchema. ExtendedproviderSchemato require
slaBadges.apps/api/src/lib/pricing.ts—deriveSlaBadges()helper maps existingmetadata (
latencyEstimateMs→ fast/standard/slow,sourceType→live/fallback/demo). All 7 providers now include
slaBadges.apps/web/pages/ControlDeckPage.tsx— Provider cards render 3 badgesbelow metrics. Missing badges show "Not verified" fallback.
styles.css— Badge styles with color coding per band.Tests
/api/catalogand
/api/providers