@@ -50,7 +50,7 @@ public void Copilot_CostEstimation_GenerativeAnswersOnly_CalculatesCorrectly()
5050 }" ;
5151
5252 // Act
53- var cost = CopilotCreditEstimation . Analyze ( json ) ;
53+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
5454
5555 // Assert
5656 // 3 messages × 2 credits = 6 credits
@@ -79,7 +79,7 @@ public void Copilot_CostEstimation_TenantGraphGrounding_CalculatesCorrectly()
7979 }" ;
8080
8181 // Act
82- var cost = CopilotCreditEstimation . Analyze ( json ) ;
82+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
8383
8484 // Assert
8585 // 3 messages × (2 credits generative + 10 credits tenant graph) = 36 credits
@@ -129,7 +129,7 @@ public void Copilot_CostEstimation_DeepReasoningWithTenantGraph_CalculatesCorrec
129129 }" ;
130130
131131 // Act
132- var cost = CopilotCreditEstimation . Analyze ( json ) ;
132+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
133133
134134 // Assert
135135 // 3 messages × 2 credits (generative) = 6 credits
@@ -163,7 +163,7 @@ public void Copilot_CostEstimation_DeepReasoningWithoutTenantGraph_CalculatesCor
163163 }" ;
164164
165165 // Act
166- var cost = CopilotCreditEstimation . Analyze ( json ) ;
166+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
167167
168168 // Assert
169169 // 2 messages × 2 credits (generative) = 4 credits
@@ -191,7 +191,7 @@ public void Copilot_CostEstimation_OneDriveResources_DetectedAsTenantGraph()
191191 }" ;
192192
193193 // Act
194- var cost = CopilotCreditEstimation . Analyze ( json ) ;
194+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
195195
196196 // Assert
197197 // 1 message × (2 + 10) = 12 credits
@@ -213,7 +213,7 @@ public void Copilot_CostEstimation_TeamsAsyncGatewayResources_DetectedAsTenantGr
213213 }" ;
214214
215215 // Act
216- var cost = CopilotCreditEstimation . Analyze ( json ) ;
216+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
217217
218218 // Assert
219219 Assert . AreEqual ( 12 , cost . TotalCredits ) ;
@@ -237,7 +237,7 @@ public void Copilot_CostEstimation_MultipleResourceTypes_CountedOnce()
237237 }" ;
238238
239239 // Act
240- var cost = CopilotCreditEstimation . Analyze ( json ) ;
240+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
241241
242242 // Assert
243243 // Still just 1 message × (2 + 10) = 12 credits (not multiplied by resource count)
@@ -249,9 +249,9 @@ public void Copilot_CostEstimation_MultipleResourceTypes_CountedOnce()
249249 public void Copilot_CostEstimation_NullOrEmptyInput_ReturnsZero ( )
250250 {
251251 // Arrange & Act
252- var costNull = CopilotCreditEstimation . Analyze ( ( string ) null ) ;
253- var costEmpty = CopilotCreditEstimation . Analyze ( "" ) ;
254- var costWhitespace = CopilotCreditEstimation . Analyze ( " " ) ;
252+ var costNull = CopilotCreditEstimation . Analyze ( ( string ) null , isCustomAgent : true ) ;
253+ var costEmpty = CopilotCreditEstimation . Analyze ( "" , isCustomAgent : true ) ;
254+ var costWhitespace = CopilotCreditEstimation . Analyze ( " " , isCustomAgent : true ) ;
255255
256256 // Assert
257257 Assert . AreEqual ( 0 , costNull . TotalCredits ) ;
@@ -271,7 +271,7 @@ public void Copilot_CostEstimation_NoMessages_ReturnsZero()
271271 }" ;
272272
273273 // Act
274- var cost = CopilotCreditEstimation . Analyze ( json ) ;
274+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
275275
276276 // Assert
277277 Assert . AreEqual ( 0 , cost . TotalCredits ) ;
@@ -290,7 +290,7 @@ public void Copilot_CostEstimation_OnlyPromptMessages_ReturnsZero()
290290 }" ;
291291
292292 // Act
293- var cost = CopilotCreditEstimation . Analyze ( json ) ;
293+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
294294
295295 // Assert
296296 Assert . AreEqual ( 0 , cost . TotalCredits ) ;
@@ -315,7 +315,7 @@ public void Copilot_CostEstimation_ResourceTypeBreakdown_PopulatedCorrectly()
315315 }" ;
316316
317317 // Act
318- var cost = CopilotCreditEstimation . Analyze ( json ) ;
318+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
319319
320320 // Assert
321321 Assert . AreEqual ( 2 , cost . ResourceTypeBreakdown [ "docx" ] ) ;
@@ -338,7 +338,7 @@ public void Copilot_CostEstimation_CaseInsensitiveModelDetection_WorksCorrectly(
338338 }" ;
339339
340340 // Act
341- var cost = CopilotCreditEstimation . Analyze ( json ) ;
341+ var cost = CopilotCreditEstimation . Analyze ( json , isCustomAgent : true ) ;
342342
343343 // Assert
344344 Assert . AreEqual ( 7 , cost . TotalCredits ) ; // 2 + 5
@@ -1075,7 +1075,7 @@ public async Task Copilot_SaveCopilotEvent_WithDeepReasoningModel_CalculatesCost
10751075 Assert . AreEqual ( "DEEP_LEO" , aiModels [ 0 ] . AIModel . Name ) ;
10761076
10771077 // Assert - Verify cost calculation
1078- var cost = CopilotCreditEstimation . Analyze ( auditLogContent . ParsedAuditEvent ) ;
1078+ var cost = CopilotCreditEstimation . Analyze ( auditLogContent . ParsedAuditEvent , isCustomAgent : true ) ;
10791079 // 2 messages × (2 generative + 10 tenant graph) + 5 deep reasoning = 29 credits
10801080 Assert . AreEqual ( 29 , cost . TotalCredits ) ;
10811081 Assert . AreEqual ( 1 , cost . DeepReasoningActions ) ;
0 commit comments