Budget
Namespace: E2E.Decision
public static class BudgetUpstream’s budget.ts.
Inheritance: object
Methods
Section titled “Methods”RecordedAsync<T>(StepExecutorContext, string, string, Func<Task<Recorded<T>>>)
Section titled “RecordedAsync<T>(StepExecutorContext, string, string, Func<Task<Recorded<T>>>)”public static Task<T> RecordedAsync<T>(StepExecutorContext ctx, string provider, string modelId, Func<Task<Recorded<T>>> call)Upstream’s recorded. Runs one model call against the step budget: cancelled before it starts or after it returns, and
recorded with its timing and tokens even when it throws. Errors propagate untouched for the caller to map.
Type parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
ctx |
StepExecutorContext | |
provider |
string | |
modelId |
string | |
call |
Func<Task<Recorded<T>>> |
Returns: Task<T>
RecordedAsync<T>(StepExecutorContext, string, string, CancellationToken, Func<Task<Recorded<T>>>)
Section titled “RecordedAsync<T>(StepExecutorContext, string, string, CancellationToken, Func<Task<Recorded<T>>>)”public static Task<T> RecordedAsync<T>(StepExecutorContext ctx, string provider, string modelId, CancellationToken signal, Func<Task<Recorded<T>>> call)RecordedAsync<T> under <code class=“paramref”>signal</code>: the
attempt’s token linked with the caller’s (.NET-only: the runtime hands an executor both).
Type parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
ctx |
StepExecutorContext | |
provider |
string | |
modelId |
string | |
signal |
CancellationToken | |
call |
Func<Task<Recorded<T>>> |
Returns: Task<T>