fix(#371): resolve TypeScript strictness errors in telemetry tracking
- llm-cost-table.ts: Add undefined guard for MODEL_COSTS lookup - llm-telemetry-tracker.service.ts: Allow undefined in callingContext for exactOptionalPropertyTypes compatibility Refs #371 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,10 @@ export function getModelCost(modelName: string): ModelCost {
|
||||
|
||||
for (const prefix of SORTED_PREFIXES) {
|
||||
if (normalized.startsWith(prefix)) {
|
||||
return MODEL_COSTS[prefix];
|
||||
const cost = MODEL_COSTS[prefix];
|
||||
if (cost !== undefined) {
|
||||
return cost;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user