feat: ChatGPT Business usage limits offer a copyable admin request #23361
Mergedjuliusmarmingemerged 3 commits into
main fromrefs/pull/23361/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts line 1149Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1134,3 +1135,15 @@11341135 );11351136 }113611371138+/**1139+ * ChatGPT sharing reports its own reason inside Codex's generic turn error, so1140+ * the code it names replaces Codex's, and clients pick a recovery from it.1141+ */1142+function withCodexManagedFailure(1143+ failure: OrchestrationV2ProviderFailure,1144+ nativeError: unknown,1145+): OrchestrationV2ProviderFailure {1146+ const managed = classifyCodexManagedError(nativeError);1147+ return managed === undefined1148+ ? failure1149+ : { ...failure, message: managed.message, code: managed.code };
- apps/mobile/src/features/threads/ChatGptUsageLimitNotice.tsx lines 42 to 45Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +25,21 @@25+ >26+ <View className="flex-row items-center gap-2">27+ <ProviderIcon provider="codex" size={16} />28+ <Text className="text-sm font-t3-medium text-foreground">ChatGPT usage limit reached</Text>29+ </View>30+ <Text className="text-xs text-foreground-muted">31+ {workspaceLimit32+ ? copied33+ ? "Request copied. Send it to your workspace admin."34+ : "You've reached your workspace's limit for using your ChatGPT plan in other apps. Copy a request to ask your workspace admin for increased usage limits."35+ : "Review your usage settings in ChatGPT."}36+ </Text>37+ {workspaceLimit ? (38+ <Button39+ label="Copy request for admin"40+ tone="primary"41+ onPress={() =>42+ void Clipboard.setStringAsync(CHATGPT_WORKSPACE_ADMIN_REQUEST).then(43+ () => setCopied(true),44+ () => undefined,45+ )
juliusmarminge merged this6f75bcb
juliusmarminge closed this
Sign in to join this conversation.



macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed