Q63: model calls are priced and agent and department budgets limit real spend

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 11:08:38 -04:00
1 parent acbafcd6de
commit 168572dd76
21 files changed
+454 -12

No files matched your search

+9
View File
@@ -64,6 +64,15 @@ export interface UpdateProviderPolicyInput {
contextWindowTokens: number;
}
/** List prices in dollars per million tokens; null leaves a price unset. */
export interface SetProviderPricesInput {
orgId: string;
providerId: string;
inputDollarsPerMtok: number | null;
cachedInputDollarsPerMtok: number | null;
outputDollarsPerMtok: number | null;
}
export interface CreateProviderResponseInput {
orgId: string;
providerId: string;
+2
View File
@@ -89,6 +89,7 @@ import type {
StreamProviderResponseInput,
SyncEmployeeIdentityInput,
UpdateProviderPolicyInput,
SetProviderPricesInput,
UpdateTaskStatusInput,
} from "./commands";
import type { ProviderStreamRendererEvent } from "./provider-request-domain";
@@ -164,6 +165,7 @@ export interface DesktopApi {
checkProviderHealth(input: CheckProviderHealthInput): Promise<DesktopResult<AppSnapshot>>;
listProviderModels(input: ListProviderModelsInput): Promise<DesktopResult<ProviderModelEntry[]>>;
updateProviderPolicy(input: UpdateProviderPolicyInput): Promise<DesktopResult<AppSnapshot>>;
setProviderPrices(input: SetProviderPricesInput): Promise<DesktopResult<AppSnapshot>>;
openExternalUrl(url: string): Promise<DesktopResult<null>>;
createProviderResponse(input: CreateProviderResponseInput): Promise<DesktopResult<AppSnapshot>>;
streamProviderResponse(input: StreamProviderResponseInput): Promise<DesktopResult<AppSnapshot>>;
+4
View File
@@ -296,6 +296,10 @@ export interface ProviderRecord {
workspaceScope: string;
/** Model context window the run budget is computed against. */
contextWindowTokens: number;
/** Prices in cents per million tokens; null until the operator sets them. */
inputCentsPerMtok: number | null;
cachedInputCentsPerMtok: number | null;
outputCentsPerMtok: number | null;
createdAt: string;
}
+1
View File
@@ -34,6 +34,7 @@ export const IPC_CHANNELS = {
checkProviderHealth: "agentcompany:check-provider-health",
listProviderModels: "agentcompany:list-provider-models",
updateProviderPolicy: "agentcompany:update-provider-policy",
setProviderPrices: "agentcompany:set-provider-prices",
openExternalUrl: "agentcompany:open-external-url",
createProviderResponse: "agentcompany:create-provider-response",
streamProviderResponse: "agentcompany:stream-provider-response",