Q66: usage counts instructions, tool definitions and tool calls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c2f8e656f6
commit
d184e82e2a
5 files changed
+64
-15
No files matched your search
@@ -19,6 +19,7 @@ import { ProviderRateLimitRegistry } from "./provider-rate-limit-registry";
|
||||
import { ProviderRequestStore, type ProviderBackgroundRequestRow } from "./provider-request-store";
|
||||
import { ProviderResponseObserver } from "./provider-response-observer";
|
||||
import { hashPrompt, readProviderFailureMessage, requireBackgroundText } from "./provider-response-utils";
|
||||
import { promptChars } from "./spend";
|
||||
|
||||
const AUTH_STATE_CONFIGURED = "configured";
|
||||
const HEALTH_STATE_HEALTHY = "healthy";
|
||||
@@ -60,7 +61,7 @@ export class ProviderBackgroundService {
|
||||
model: execution.provider.model,
|
||||
workspaceId: execution.workspaceId,
|
||||
promptSha256: hashPrompt(execution.prompt),
|
||||
inputCharCount: execution.prompt.length,
|
||||
inputCharCount: promptChars(execution.prompt, execution.instructions),
|
||||
executionMode: PROVIDER_EXECUTION_MODE.BACKGROUND,
|
||||
createdAt: new Date().toISOString(),
|
||||
});
|
||||
@@ -99,7 +100,7 @@ export class ProviderBackgroundService {
|
||||
requestId,
|
||||
executionMode: PROVIDER_EXECUTION_MODE.BACKGROUND,
|
||||
startedAt,
|
||||
inputCharCount: execution.prompt.length,
|
||||
inputCharCount: promptChars(execution.prompt, execution.instructions),
|
||||
error,
|
||||
});
|
||||
throw error;
|
||||
|
||||
Reference in new issue
Block a user