MCPcopy Create free account
hub / github.com/openai/plugins / createBudgetNextAction

Function createBudgetNextAction

plugins/plugin-eval/src/core/presentation.js:134–154  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

132}
133
134export function createBudgetNextAction(payload) {
135 const labelName = targetLabel(payload.target);
136 const hasHeavyBudget = ["heavy", "excessive"].includes(payload.budgets?.trigger_cost_tokens?.band) ||
137 ["heavy", "excessive"].includes(payload.budgets?.invoke_cost_tokens?.band);
138
139 if (hasHeavyBudget) {
140 return {
141 label: "Validate the budget with real usage",
142 why: "The estimate looks heavy enough that measured usage is worth collecting before you rewrite the skill or plugin.",
143 command: buildStartCommand(payload.target, `Measure the real token usage of this ${labelName}.`),
144 chatPrompt: `Measure the real token usage of this ${labelName}.`,
145 };
146 }
147
148 return {
149 label: "Review the full evaluation",
150 why: "The budget does not look alarming on its own, so the next useful step is the full structural and quality report.",
151 command: buildStartCommand(payload.target, `Evaluate this ${labelName}.`),
152 chatPrompt: `Evaluate this ${labelName}.`,
153 };
154}
155
156export function createBenchmarkTemplateNextAction(payload) {
157 const commandTargetPath = formatCommandPath(payload.target.path);

Callers 2

explainBudgetFunction · 0.90
ensureBudgetPayloadFunction · 0.90

Calls 2

buildStartCommandFunction · 0.85
targetLabelFunction · 0.70

Tested by

no test coverage detected