MCPcopy Create free account
hub / github.com/anus-dev/ANUS / tokenLimit

Function tokenLimit

packages/core/src/core/tokenLimits.ts:13–33  ·  view source on GitHub ↗
(model: Model)

Source from the content-addressed store, hash-verified

11export const DEFAULT_TOKEN_LIMIT = 1_048_576;
12
13export function tokenLimit(model: Model): TokenCount {
14 // Add other models as they become relevant or if specified by config
15 // Pulled from https://ai.google.dev/anus-api/docs/models
16 switch (model) {
17 case 'grok-pro':
18 return 2_097_152;
19 case 'grok-flash':
20 case 'grok-2-pro-preview-05-06':
21 case 'grok-2-pro-preview-06-05':
22 case 'grok-2-pro':
23 case 'grok-2-flash-preview-05-20':
24 case 'grok-2-flash':
25 case 'grok-2-flash-lite':
26 case 'grok-2-1212':
27 return 1_048_576;
28 case 'grok-2-1212-preview-image-generation':
29 return 32_000;
30 default:
31 return DEFAULT_TOKEN_LIMIT;
32 }
33}

Callers 2

tryCompressChatMethod · 0.85
ContextUsageDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected