feat(snapcompact): implemented model-aware compaction billing and frame-size resolution
- Implemented model-specific frame-size billing for Anthropic, OpenAI, and Google. - Changed compaction shape resolution to bind model variants to ideal frame sizes. - Updated tests and docs to reflect new frame-size and budget behavior.
This commit is contained in:
@@ -426,7 +426,7 @@ describe("estimateInlineSavings", () => {
|
||||
expect(estimate.visionCapable).toBe(true);
|
||||
expect(estimate.systemPrompt?.applied).toBe(true);
|
||||
expect(estimate.systemPrompt?.frames).toBe(2);
|
||||
expect(estimate.systemPrompt?.imageTokens).toBe(2 * 3300);
|
||||
expect(estimate.systemPrompt?.imageTokens).toBe(2 * snapcompact.SHAPES.anthropic.frameTokenEstimate);
|
||||
expect(estimate.systemPrompt?.savedTokens).toBe(
|
||||
estimate.systemPrompt!.textTokens - estimate.systemPrompt!.imageTokens,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user