Skip to content

Add provider sla#103

Open
OG-wura wants to merge 5 commits into
emrekayat:mainfrom
OG-wura:Add_provider_SLA
Open

Add provider sla#103
OG-wura wants to merge 5 commits into
emrekayat:mainfrom
OG-wura:Add_provider_SLA

Conversation

@OG-wura

@OG-wura OG-wura commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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 — New LatencyBand, ReliabilityBand, PaymentMode
    types; SlaBadges interface with band enums + UI-safe label strings.
    Added slaBadges: SlaBadges to ProviderDefinition.
  • schemas.ts — New latencyBandSchema, reliabilityBandSchema,
    paymentModeSchema, slaBadgesSchema. Extended providerSchema
    to require slaBadges.

apps/api/

  • src/lib/pricing.tsderiveSlaBadges() helper maps existing
    metadata (latencyEstimateMs → fast/standard/slow, sourceType
    live/fallback/demo). All 7 providers now include slaBadges.

apps/web/

  • pages/ControlDeckPage.tsx — Provider cards render 3 badges
    below metrics. Missing badges show "Not verified" fallback.
  • styles.css — Badge styles with color coding per band.

Tests

  • Shared schema tests for all 4 new schemas
  • Pricing badge shape/derivation tests for all 7 providers
  • Catalog response tests verifying badge shape on /api/catalog
    and /api/providers

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@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.

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@emrekayat

Copy link
Copy Markdown
Owner

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-client

Results: 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:

  • package-lock.json has large unrelated dependency metadata/version churn with no apparent dependency change.
  • The issue is provider SLA badge data, but the PR also changes apps/agent-client/src/validate-real.ts and adds validate-real.test.ts, which looks unrelated to catalog SLA badge rendering.

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.

OG-wura added 2 commits June 30, 2026 22:14
- 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).
@OG-wura

OG-wura commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add provider SLA badge data to catalog responses

2 participants