From 35848b79bd44753695e59a15df1dfc7179c61d8b Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:53:43 +0000 Subject: [PATCH] fix: return proper type in calculateAndUpdateRequestCost early exit The early return when no price data is found was returning undefined instead of the expected object type. Fixed to return consistent object structure matching other early returns in the function. Fixed: - Type 'undefined' is not assignable to type return object in response-handler.ts:3111 CI Run: https://github.com/ding113/claude-code-hub/actions/runs/23082651541 Co-Authored-By: Claude Opus 4.6 --- src/app/v1/_lib/proxy/response-handler.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/v1/_lib/proxy/response-handler.ts b/src/app/v1/_lib/proxy/response-handler.ts index 5cae9f7e2..51dc44ca7 100644 --- a/src/app/v1/_lib/proxy/response-handler.ts +++ b/src/app/v1/_lib/proxy/response-handler.ts @@ -3108,7 +3108,12 @@ async function updateRequestCostFromUsage( }); requestCloudPriceTableSync({ reason: "missing-model" }); - return; + return { + costUsd: null, + resolvedPricing: null, + longContextPricing: null, + longContextPricingApplied: false, + }; } const longContextPricing =