refactor(ai): drop dead status-batch reverse map, consume the budget type

Remove the unused output-key reverse map the batch path never read, and
have the budget table satisfy the AiBudget interface directly so the type
is enforced rather than orphaned.
This commit is contained in:
Marc-André Bombeck committed 2026-06-19 21:51:22 +02:00
1 parent 208c607b93
commit 5e541ebf4f
2 files changed
+6 -12

No files matched your search

+6 -3
View File
@@ -19,8 +19,11 @@
export interface AiBudget {
/** Sampling temperature. Low for reference surfaces, slightly higher for chat. */
temperature: number;
/** Output-token ceiling. Sized to the surface's documented output contract. */
maxTokens: number;
/**
* Output-token ceiling. Sized to the surface's documented output contract.
* Optional for surfaces whose caller pins its own token const (self-context).
*/
maxTokens?: number;
}
/**
@@ -94,4 +97,4 @@ export const AI_BUDGETS = {
* questions. Temperature only; the caller pins its own token const.
*/
selfContext: { temperature: 0.4 },
} as const satisfies Record<string, { temperature: number; maxTokens?: number }>;
} as const satisfies Record<string, AiBudget>;
-9
View File
@@ -36,15 +36,6 @@ export const STATUS_BATCH_KEY_BY_METRIC: Record<string, string> = {
general: "general",
};
/** Reverse of `STATUS_BATCH_KEY_BY_METRIC` — output key → InsightStatus scope. */
export const STATUS_BATCH_METRIC_BY_KEY: Record<string, string> =
Object.fromEntries(
Object.entries(STATUS_BATCH_KEY_BY_METRIC).map(([metric, key]) => [
key,
metric,
]),
);
/**
* Compose the batch system prompt: the shared assessment scaffold plus the
* `{ perMetric }` output instruction. `presentKeys` are the output keys for