From fe8cd004c01f610bf34554222ab88444d1a413fc Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:53:22 +0000 Subject: [PATCH] fix: return proper object type in updateRequestCostFromUsage Fixed TypeScript error where bare 'return;' returned undefined instead of the expected object type with costUsd, resolvedPricing, longContextPricing, and longContextPricingApplied properties. Error: src/app/v1/_lib/proxy/response-handler.ts(3111,7): error TS2322: Type 'undefined' is not assignable to type '{ costUsd: string | null; resolvedPricing: ResolvedPricing | null; longContextPricing: ResolvedLongContextPricing | null; longContextPricingApplied: boolean; }'. CI Run: https://github.com/ding113/claude-code-hub/actions/runs/23082652215 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 =