fix(cliproxy): propagate agy entitlement failure metadata

This commit is contained in:
Tam Nhu Tran committed 2026-04-10 14:19:02 -04:00
1 parent 7c4545eb1b
commit 506b61eca6
2 files changed
+63

No files matched your search

+9
View File
@@ -698,6 +698,14 @@ async function fetchAvailableModels(
error: 'Invalid quota response from provider',
errorCode: 'provider_unavailable',
retryable: true,
entitlement: buildProviderEntitlementEvidence({
normalizedTier: 'unknown',
source: 'runtime_inference',
confidence: 'low',
accessState: 'unknown',
capacityState: 'temporarily_unavailable',
notes: 'Provider returned a 2xx response with an empty or invalid quota payload.',
}),
};
}
@@ -814,6 +822,7 @@ export async function fetchAccountQuota(
httpStatus: lastProjectResult.httpStatus,
needsReauth: lastProjectResult.needsReauth,
isUnprovisioned: lastProjectResult.isUnprovisioned,
entitlement: lastProjectResult.entitlement,
isExpired: authData.isExpired,
expiresAt: authData.expiresAt || undefined,
};