@barfinex/types
Version:
Core TypeScript type definitions and shared interfaces for the Barfinex ecosystem. Provides strongly-typed contracts for modules, services, and plugins.
38 lines • 1.4 kB
TypeScript
export interface LlmTransportTelemetryEvent {
event_type: 'llm_transport';
provider: 'openai' | 'glm' | 'claude-cli';
model: string;
modelProfile?: 'coding' | 'ml';
scope?: 'decision' | 'advisory';
aiMode?: 'strategic' | 'lightweight' | 'disabled';
latencyMs: number;
success: boolean;
errorCode?: string;
errorMessage?: string;
promptTokens?: number;
completionTokens?: number;
totalTokens?: number;
/** Estimated cost in USD from model pricing registry (when available). */
estimatedCost?: number;
requestId?: string;
correlationId?: string;
symbol?: string;
component?: string;
/** Operation label: decision | advisory | replay */
operation?: string;
/** Strategy or detector name when available */
strategy?: string;
detector?: string;
traceId?: string;
/** Trace correlation: link AI call to trading lifecycle (nullable when not available). */
decisionId?: string | null;
signalId?: string | null;
cycleId?: string | null;
tradeId?: string | null;
/** Prompt fingerprinting for cost analysis and optimization. */
promptHash?: string | null;
promptLength?: number | null;
/** Caching metrics: true = cache hit, false = cache miss (omit when not applicable). */
cacheHit?: boolean | null;
}
//# sourceMappingURL=llm-transport-telemetry.interface.d.ts.map