feat(#373): prediction integration for cost estimation
- Create PredictionService for pre-task cost/token estimates - Refresh common predictions on startup - Integrate predictions into LLM telemetry tracker - Add GET /api/telemetry/estimate endpoint - Graceful degradation when no prediction data available - Add unit tests for prediction service Refs #373 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { Module, Global } from "@nestjs/common";
|
||||
import { ConfigModule } from "@nestjs/config";
|
||||
import { AuthModule } from "../auth/auth.module";
|
||||
import { MosaicTelemetryService } from "./mosaic-telemetry.service";
|
||||
import { PredictionService } from "./prediction.service";
|
||||
import { MosaicTelemetryController } from "./mosaic-telemetry.controller";
|
||||
|
||||
/**
|
||||
* Global module providing Mosaic Telemetry integration via @mosaicstack/telemetry-client.
|
||||
@@ -30,8 +33,9 @@ import { MosaicTelemetryService } from "./mosaic-telemetry.service";
|
||||
*/
|
||||
@Global()
|
||||
@Module({
|
||||
imports: [ConfigModule],
|
||||
providers: [MosaicTelemetryService],
|
||||
exports: [MosaicTelemetryService],
|
||||
imports: [ConfigModule, AuthModule],
|
||||
controllers: [MosaicTelemetryController],
|
||||
providers: [MosaicTelemetryService, PredictionService],
|
||||
exports: [MosaicTelemetryService, PredictionService],
|
||||
})
|
||||
export class MosaicTelemetryModule {}
|
||||
|
||||
Reference in New Issue
Block a user