(model: Model)
| 11 | export const DEFAULT_TOKEN_LIMIT = 1_048_576; |
| 12 | |
| 13 | export 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 | } |
no outgoing calls
no test coverage detected