mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 03:36:57 +01:00
fix(hermes): settle closed retry work with unknown usage
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
a978fd5b4a
commit
391e56d8a0
15 files changed
+261
-31
No files matched your search
@@ -4,6 +4,7 @@ export type {
|
||||
AdapterRuntime,
|
||||
UsageSummary,
|
||||
AdapterUsageCheckpoint,
|
||||
AdapterAccountingSettlement,
|
||||
AdapterBillingType,
|
||||
AdapterRuntimeServiceReport,
|
||||
AdapterExecutionResult,
|
||||
|
||||
@@ -40,6 +40,13 @@ export interface UsageSummary {
|
||||
}
|
||||
|
||||
/** Accounting-only snapshot. Never include prompt, response, or credentials. */
|
||||
export interface AdapterAccountingSettlement {
|
||||
schema: "paperclip.accounting.settlement/v1";
|
||||
/** Owned provider work ended; unknown measurements remain explicitly unknown. */
|
||||
providerWorkEnded: true;
|
||||
usageComplete: boolean;
|
||||
}
|
||||
|
||||
export interface AdapterUsageCheckpoint {
|
||||
attemptId?: string;
|
||||
usage?: UsageSummary;
|
||||
@@ -57,6 +64,7 @@ export interface AdapterUsageCheckpoint {
|
||||
cacheAdjustedCostUsd?: number | null;
|
||||
providerRequestId?: string | null;
|
||||
complete: boolean;
|
||||
settlement?: AdapterAccountingSettlement;
|
||||
}
|
||||
|
||||
export type AdapterBillingType =
|
||||
@@ -143,6 +151,7 @@ export interface AdapterExecutionResult {
|
||||
pricingProvenance?: { source: "provider_reported" | "provider_invoice" | "operator" | "rate_card" | "unknown"; version?: string; evidence?: string; inputCentsPerMillion?: string; cachedInputCentsPerMillion?: string; cacheWriteCentsPerMillion?: string; outputCentsPerMillion?: string; serviceTier?: string; contextTier?: "short" | "long" };
|
||||
providerRequestId?: string | null;
|
||||
usageComplete?: boolean;
|
||||
settlement?: AdapterAccountingSettlement;
|
||||
/**
|
||||
* Provider-billed cost after prompt-cache discounts. Adapters should set
|
||||
* this when they expose it separately; otherwise the server treats a
|
||||
|
||||
Reference in new issue
Block a user