MCPcopy
hub / github.com/7836246/cursor2api / shouldRetry

Function shouldRetry

src/openai-handler.ts:1162–1162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1160
1161 // 拒绝检测 + 自动重试(在 thinking 提取之后,只检测实际输出内容)
1162 const shouldRetry = () => isRefusal(fullText) && !(hasTools && hasToolCalls(fullText));
1163
1164 if (shouldRetry()) {
1165 for (let attempt = 0; attempt < MAX_REFUSAL_RETRIES; attempt++) {

Callers 2

handleOpenAINonStreamFunction · 0.70
handleResponsesNonStreamFunction · 0.70

Calls 2

isRefusalFunction · 0.90
hasToolCallsFunction · 0.85

Tested by

no test coverage detected