From 1d8e6fcac3de93139b59afcd5d9adc6e8a9d8794 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Sun, 17 May 2026 12:35:11 +0100 Subject: [PATCH] chore: increase price weight in routing score Bump PRICE_WEIGHT from 0.3 to 0.6 and IMAGE_PRICE_WEIGHT from 0.5 to 1.0 so price has a larger influence than any single other factor (uptime, throughput, latency, cache) in weighted routing. Co-Authored-By: Claude Opus 4.7 --- packages/actions/src/get-cheapest-from-available-providers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/actions/src/get-cheapest-from-available-providers.ts b/packages/actions/src/get-cheapest-from-available-providers.ts index 6a7bc22b1d..b6aeb2ed26 100644 --- a/packages/actions/src/get-cheapest-from-available-providers.ts +++ b/packages/actions/src/get-cheapest-from-available-providers.ts @@ -22,8 +22,8 @@ interface ProviderScore { // With ratio-based scoring, throughput/latency differences are naturally amplified // (e.g., 6x faster = score of 5.0), so these weights are kept low to avoid // dominating price and uptime. Price/uptime differences are typically smaller ratios. -const PRICE_WEIGHT = 0.3; -const IMAGE_PRICE_WEIGHT = 0.5; // Higher weight for image generation models +const PRICE_WEIGHT = 0.6; +const IMAGE_PRICE_WEIGHT = 1.0; // Higher weight for image generation models const UPTIME_WEIGHT = 0.5; const THROUGHPUT_WEIGHT = 0.05; const LATENCY_WEIGHT = 0.025;