mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 05:12:11 +03:00
chore: remove unused combo types (#5396)
Integrated into release/v3.8.42
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
@@ -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" };
|
||||
|
||||
Reference in New Issue
Block a user