Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(ci): align resilience and thinking checks

diegosouzapwda982d31be1d
diff --git a/src/app/(dashboard)/dashboard/settings/components/ResilienceTab.tsx b/src/app/(dashboard)/dashboard/settings/components/ResilienceTab.tsx
index 0bbbc80b9d..06a493803a 100644
--- a/src/app/(dashboard)/dashboard/settings/components/ResilienceTab.tsx
+++ b/src/app/(dashboard)/dashboard/settings/components/ResilienceTab.tsx
@@ -347,7 +347,7 @@ function ConnectionCooldownCard({
{editing ? (
<>
<NumberField
- label="Cooldown base"
+ label="Base cooldown"
value={current.baseCooldownMs}
min={0}
suffix="ms"
@@ -356,7 +356,7 @@ function ConnectionCooldownCard({
}
/>
<BooleanField
- label="Usar dicas de retry do upstream"
+ label="Use upstream retry hints"
description="Usa valores de retry-after/reset do upstream quando disponíveis."
checked={current.useUpstreamRetryHints}
onChange={(useUpstreamRetryHints) =>
@@ -409,7 +409,7 @@ function ConnectionCooldownCard({
</p>
</div>
<NumberField
- label="Máximo de passos de backoff"
+ label="Max backoff steps"
value={current.maxBackoffSteps}
min={0}
onChange={(maxBackoffSteps) =>
@@ -420,11 +420,11 @@ function ConnectionCooldownCard({
) : (
<>
<div className="flex items-center justify-between text-sm">
- <span className="text-text-muted">Cooldown base</span>
+ <span className="text-text-muted">Base cooldown</span>
<span className="font-mono text-text-main">{formatMs(current.baseCooldownMs)}</span>
</div>
<div className="flex items-center justify-between text-sm">
- <span className="text-text-muted">Usar dicas de retry do upstream</span>
+ <span className="text-text-muted">Use upstream retry hints</span>
<span className="font-mono text-text-main">
{current.useUpstreamRetryHints ? "Sim" : "Não"}
</span>
@@ -440,7 +440,7 @@ function ConnectionCooldownCard({
</span>
</div>
<div className="flex items-center justify-between text-sm">
- <span className="text-text-muted">Máximo de passos de backoff</span>
+ <span className="text-text-muted">Max backoff steps</span>
<span className="font-mono text-text-main">{current.maxBackoffSteps}</span>
</div>
</>
@@ -455,7 +455,7 @@ function ConnectionCooldownCard({
<div className="space-y-2">
<div className="flex items-center gap-2">
<span className="material-symbols-outlined text-xl text-primary">timer_off</span>
- <h2 className="text-lg font-bold">Cooldown de Conexão</h2>
+ <h2 className="text-lg font-bold">Connection Cooldown</h2>
</div>
<SectionDescription
scope="Conexão individual"
diff --git a/src/lib/modelCapabilities.ts b/src/lib/modelCapabilities.ts
index 90612b19f0..07fec2152e 100644
--- a/src/lib/modelCapabilities.ts
+++ b/src/lib/modelCapabilities.ts
@@ -218,18 +218,20 @@ export function getResolvedModelCapabilities(input: CapabilityInput): ResolvedMo
? `${resolved.provider}/${resolved.model}`
: resolved.model || resolved.rawModel || resolved.lookupKey
) || "";
+ const reasoningDenied = !heuristicReasoning(lookupKey);
const supportsTools =
synced?.tool_call ??
(typeof registryModel?.toolCalling === "boolean" ? registryModel.toolCalling : null) ??
(typeof spec?.supportsTools === "boolean" ? spec.supportsTools : null);
- const supportsThinking =
- synced?.reasoning ??
- (typeof registryModel?.supportsReasoning === "boolean"
- ? registryModel.supportsReasoning
- : null) ??
- (typeof spec?.supportsThinking === "boolean" ? spec.supportsThinking : null);
+ const supportsThinking = reasoningDenied
+ ? false
+ : (synced?.reasoning ??
+ (typeof registryModel?.supportsReasoning === "boolean"
+ ? registryModel.supportsReasoning
+ : null) ??
+ (typeof spec?.supportsThinking === "boolean" ? spec.supportsThinking : null));
const contextWindow =
synced?.limit_context ??
diff --git a/tests/unit/translator-helper-branches.test.ts b/tests/unit/translator-helper-branches.test.ts
index 9f80646b07..ec9832b62a 100644
--- a/tests/unit/translator-helper-branches.test.ts
+++ b/tests/unit/translator-helper-branches.test.ts
@@ -6,6 +6,8 @@ const openaiHelper = await import("../../open-sse/translator/helpers/openaiHelpe
const claudeHelper = await import("../../open-sse/translator/helpers/claudeHelper.ts");
const geminiHelper = await import("../../open-sse/translator/helpers/geminiHelper.ts");
const toolCallHelper = await import("../../open-sse/translator/helpers/toolCallHelper.ts");
+const { DEFAULT_THINKING_CLAUDE_SIGNATURE } =
+ await import("../../open-sse/config/defaultThinkingSignature.ts");
const originalMathRandom = Math.random;
@@ -308,7 +310,8 @@ test("claudeHelper validates content, ordering and request preparation branches"
prepared.messages[5].content.map((block) => block.type),
["redacted_thinking", "text"]
);
- assert.ok(prepared.messages[5].content[0].signature);
+ assert.equal(prepared.messages[5].content[0].data, DEFAULT_THINKING_CLAUDE_SIGNATURE);
+ assert.equal(prepared.messages[5].content[0].signature, undefined);
assert.equal(prepared.messages[5].content[0].thinking, undefined);
assert.equal(prepared.tools.length, 2);
assert.equal(prepared.tools[0].cache_control, undefined);