feat: meter AI usage
CI and Deploy / test (push) Failing after 58s
CI and Deploy / deploy (push) Has been skipped

This commit is contained in:
cesnimda
2026-07-30 22:39:24 +02:00
parent f8466c2ebc
commit c08232b9d7
15 changed files with 2482 additions and 11 deletions
+3
View File
@@ -66,6 +66,9 @@ public sealed class AiWorkspaceTests
Assert.Equal("job-analysis", res!.Module);
Assert.Equal("gemini", res.Provider);
Assert.Contains("Generated suggestion", res.ResultJson);
Assert.True(res.InputCharacterCount > 0);
Assert.Equal("## Result\nGenerated suggestion.".Length, res.OutputCharacterCount);
Assert.Equal((res.InputCharacterCount + res.OutputCharacterCount + 3) / 4, res.EstimatedTokenCount);
Assert.Single(await db.AiInteractions.IgnoreQueryFilters().Where(x => x.JobApplicationId == jobId).ToListAsync());
}