Skip to content

Remove Perplexity partner provider - #6086

Open
chrarnoldus wants to merge 1 commit into
mainfrom
remove-perplexity-partner-provider
Open

Remove Perplexity partner provider#6086
chrarnoldus wants to merge 1 commit into
mainfrom
remove-perplexity-partner-provider

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • remove percentage-routed Perplexity Kimi K3 inference and managed fallback retries
  • remove the partner routing configuration, admin controls, environment entry, and fallback pricing
  • retain unrelated Perplexity BYOK, embeddings, and web-search support
  • discard obsolete partner percentages when parsing persisted gateway configuration

Testing

  • CI only, as requested

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Sep 11, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

This PR cleanly removes the percentage-routed Perplexity partner provider; I verified that all removed symbols, config fields, and provider IDs have no remaining references and that the fallbackOnly removal does not change behavior for surviving custom-pricing models.

Files Reviewed (24 files)
  • ENVIRONMENT.md
  • apps/web/src/app/admin/gateway/RoutingContent.tsx
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts
  • apps/web/src/app/api/openrouter/[...path]/route.ts
  • apps/web/src/lib/ai-gateway/custom-pricing.test.ts
  • apps/web/src/lib/ai-gateway/custom-pricing.ts
  • apps/web/src/lib/ai-gateway/gateway-config.test.ts
  • apps/web/src/lib/ai-gateway/gateway-config.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts
  • apps/web/src/lib/ai-gateway/providers/partner/constants.ts (deleted)
  • apps/web/src/lib/ai-gateway/providers/partner/pricing.ts (deleted)
  • apps/web/src/lib/ai-gateway/providers/partner/providers.test.ts (deleted)
  • apps/web/src/lib/ai-gateway/providers/partner/providers.ts (deleted)
  • apps/web/src/lib/ai-gateway/providers/partner/routing.test.ts (deleted)
  • apps/web/src/lib/ai-gateway/providers/partner/routing.ts (deleted)
  • apps/web/src/lib/ai-gateway/providers/provider-definitions.test.ts
  • apps/web/src/lib/ai-gateway/providers/routing-config.ts
  • apps/web/src/lib/ai-gateway/providers/routing-percentage.ts
  • apps/web/src/lib/ai-gateway/providers/types.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts
  • apps/web/src/lib/ai-gateway/rewriteModelResponse.test.ts
  • apps/web/src/lib/ai-gateway/rewriteModelResponse.ts
  • apps/web/src/routers/admin/gateway-config-router.ts

Verification Notes

  • No remaining references to PERPLEXITY_KIMI_PUBLIC_ID, PERPLEXITY_KIMI_PROVIDER, partnerPricingByModelId, getPercentageRoutedPartnerProvider, PercentageRoutedPartnerInput, RoutingCohort, perplexity_routing_percentage, or DEFAULT_PERPLEXITY_PERCENTAGE anywhere in apps, packages, or services.
  • KIMI_CURRENT_MODEL_ID resolves to moonshotai/kimi-k3, the same value as the deleted PERPLEXITY_KIMI_PUBLIC_ID, so the thinking-default behavior in apply-provider-specific-logic.ts:223 is unchanged.
  • CustomPricing.fallbackOnly had no remaining producers after partner pricing was deleted, so the simplified checks in custom-pricing.ts and rewriteModelResponse.ts:937 are behavior-preserving. processUsage.ts:1207 reads the separate KiloExclusivePricing.fallbackOnly, unaffected by this change.
  • Removed after(...), clone(), and body.cancel() fallback code does not introduce memory leaks; after and GatewayRequest remain used elsewhere in route.ts.
  • PERPLEXITY_API_KEY had no remaining code or dotenv references, so the ENVIRONMENT.md removal is consistent, while BYOK, embedding, and web-search Perplexity usages are unrelated and retained.

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

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.

1 participant