fix(coding): recover provider context failures

This commit is contained in:
2026-08-26 14:42:01 +08:00
parent 9f05e2d7e1
commit a09826676e
8 changed files with 349 additions and 9 deletions

View File

@@ -4,3 +4,8 @@ export function isAIGatewayUpstreamSaturated(message: string | null | undefined)
return normalized.includes('当前分组上游负载已饱和')
|| (normalized.includes('upstream') && normalized.includes('saturat'));
}
export function isAIGatewayUserContextMissing(message: string | null | undefined): boolean {
const normalized = message?.trim().toLowerCase() ?? '';
return normalized.includes('works square ai gateway did not return one-api user context');
}