Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): name the usage limit on retried turns too #10546

Closedvitalyiegorov(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10546/headopened View on GitHub

Showing 2 changed files with 160 additions and 1 deletion.

x
0 of 2 viewed, 2 left
150 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -2367,6 +2367,156 @@
+ const USAGE_LIMIT_MESSAGE =
+ "Claude usage limit reached. Send the message again once the limit resets.";
+​
+ const limitedAssistant = (uuid: string, error: string) =>
+ ({
+ type: "assistant",
+ session_id: "sdk-session-limit-retry",
+ uuid,
+ parent_tool_use_id: null,
+ error,
+ is_api_error_message: true,
+ message: {
+ id: `assistant-message-${uuid}`,
+ model: "<synthetic>",
+ content: [
+ {
+ type: "text",
+ text: "You've hit your session limit · resets 9:20pm (Europe/Vienna)",
+ },
+ ],
+ },
+ }) as unknown as SDKMessage;
+​
+ const apiErrorResult = (uuid: string) =>
+ ({
+ type: "result",