mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(ci): align resilience and thinking checks
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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 ??
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user