File size: 1,185 Bytes
077865a
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import type { Request } from 'express';
import type { ChatMessage } from '@freellmapi/shared/types.js';
export declare const proxyRouter: import("express-serve-static-core").Router;
export declare function timingSafeStringEqual(provided: string, expected: string): boolean;
export declare function extractApiToken(req: Request): string | undefined;
export declare function getStickyModel(messages: ChatMessage[], sessionIdHeader?: string): number | undefined;
export declare function setStickyModel(messages: ChatMessage[], modelDbId: number, sessionIdHeader?: string): void;
export declare function isRetryableError(err: any): boolean;
export declare function isPaymentRequiredError(err: any): boolean;
export declare function isModelNotFoundError(err: any): boolean;
export declare function isModelAccessForbiddenError(err: any): boolean;
export declare function streamChunkText(chunk: any): string;
export declare function logRequest(platform: string, modelId: string, keyId: number, status: string, inputTokens: number, outputTokens: number, latencyMs: number, error: string | null, ttfbMs?: number | null, requestedModel?: string | null): void;
//# sourceMappingURL=proxy.d.ts.map