chore: remove unused combo types (#5396)

Integrated into release/v3.8.42
This commit is contained in:
Jan Leon
2026-06-30 00:14:27 +02:00
committed by GitHub
parent a4c0a95c10
commit 34510fb8d4
3 changed files with 15 additions and 28 deletions

View File

@@ -1,27 +0,0 @@
/**
* Combo — a routing group that distributes requests across provider nodes.
*/
export interface Combo {
id: string;
name: string;
model: string;
strategy: ComboStrategy;
isActive: boolean;
nodes: ComboNode[];
maxRetries: number;
retryDelayMs: number;
fallbackDelayMs?: number;
timeoutMs: number;
healthCheckEnabled: boolean;
createdAt: string;
updatedAt: string;
}
export type ComboStrategy = "priority" | "weighted" | "round-robin" | "context-relay";
export interface ComboNode {
connectionId: string;
provider: string;
weight: number;
priority: number;
}

View File

@@ -7,7 +7,6 @@
export type { ProviderConnection, ProviderNode, ModelCooldownErrorPayload } from "./provider";
export type { ApiKey } from "./apiKey";
export type { Combo, ComboStrategy, ComboNode } from "./combo";
export type { UsageEntry, UsageStats, ProviderUsageStats, ModelUsageStats, CallLog } from "./usage";
export type { DatabaseSettings } from "./databaseSettings";
export { DEFAULT_DATABASE_SETTINGS } from "./databaseSettings";

View File

@@ -342,6 +342,21 @@ test("createErrorResult — exposes error code/type on the result object", async
assert.equal(result.errorType, "timeout");
});
test("buildModelCooldownBody returns the public cooldown error payload shape", async () => {
const { buildModelCooldownBody } = await import("../../open-sse/utils/error.ts");
const body = buildModelCooldownBody({ model: "gpt-4o", retryAfterSec: 1.2 });
assert.deepEqual(body, {
error: {
message: "All credentials for model gpt-4o are cooling down",
type: "rate_limit_error",
code: "model_cooldown",
model: "gpt-4o",
reset_seconds: 2,
},
});
});
test("regression: upstream_details never contains stack trace text", async () => {
const { createErrorResult } = await import("../../open-sse/utils/error.ts");
const upstream = { error: { message: "err" }, stack: "Error\n at /abs/path.ts:1:2" };