Files
OmniRoute/tests/unit/types-barrel-model-cooldown.test.ts
Diego Rodrigues de Sa e Souza 0adae00c7b Release v3.8.42 (#5459)
Release v3.8.42 — full CHANGELOG in CHANGELOG.md.

CI: 103 checks green incl. CodeQL (all languages), Semgrep, all 8 unit shards,
coverage, Node 24 compat, and integration tests. Full unit suite validated
locally: 19437 pass / 0 fail. The 3 red checks are advisory and do not gate
main (no required status checks): SonarCloud/SonarQube new-code coverage gate,
and PR Test Policy (test-masking detector flagging the legitimate dead-Phind
provider removal in #5530 — reviewed, correct).

Includes cycle-close reconciliation + repair of inherited base-red tests from
#5480/#5527/#5427/#5521 that the PR->release fast-path did not exercise.
2026-06-30 06:54:29 -03:00

17 lines
536 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
test("types barrel supports the model cooldown error payload consumer", async () => {
const { buildModelCooldownBody } = await import("../../open-sse/utils/error.ts");
assert.deepEqual(buildModelCooldownBody({ model: "gpt-4o", retryAfterSec: 1.2 }), {
error: {
message: "All credentials for model gpt-4o are cooling down",
type: "rate_limit_error",
code: "model_cooldown",
model: "gpt-4o",
reset_seconds: 2,
},
});
});