| 1 | import { ModelProvider } from "../types.js"; |
| 2 | |
| 3 | export const xAI: ModelProvider = { |
| 4 | models: [ |
| 5 | { |
| 6 | model: "grok-beta", |
| 7 | displayName: "Grok Beta", |
| 8 | contextLength: 128000, |
| 9 | recommendedFor: ["chat"], |
| 10 | regex: /grok-beta/, |
| 11 | }, |
| 12 | { |
| 13 | model: "grok-2", |
| 14 | displayName: "Grok 2", |
| 15 | contextLength: 131072, |
| 16 | recommendedFor: ["chat"], |
| 17 | regex: /grok-2/, |
| 18 | }, |
| 19 | { |
| 20 | model: "grok-3-mini", |
| 21 | displayName: "Grok 3 Mini", |
| 22 | contextLength: 131072, |
| 23 | maxCompletionTokens: 8000, |
| 24 | recommendedFor: ["chat"], |
| 25 | regex: /grok-3-mini/, |
| 26 | }, |
| 27 | { |
| 28 | model: "grok-3", |
| 29 | displayName: "Grok 3", |
| 30 | contextLength: 131072, |
| 31 | recommendedFor: ["chat"], |
| 32 | regex: /grok-3/, |
| 33 | }, |
| 34 | { |
| 35 | model: "grok-4-fast-reasoning", |
| 36 | displayName: "Grok 4 Fast Reasoning", |
| 37 | contextLength: 2000000, |
| 38 | maxCompletionTokens: 30000, |
| 39 | recommendedFor: ["chat"], |
| 40 | regex: /grok-4-fast-reasoning/, |
| 41 | }, |
| 42 | { |
| 43 | model: "grok-4-fast-non-reasoning", |
| 44 | displayName: "Grok 4 Fast Non-Reasoning", |
| 45 | contextLength: 2000000, |
| 46 | maxCompletionTokens: 30000, |
| 47 | recommendedFor: ["chat"], |
| 48 | regex: /grok-4-fast-non-reasoning/, |
| 49 | }, |
| 50 | { |
| 51 | model: "grok-4", |
| 52 | displayName: "Grok 4 Fast", |
| 53 | contextLength: 256000, |
| 54 | recommendedFor: ["chat"], |
| 55 | regex: /grok-4/, |
| 56 | }, |
| 57 | { |
| 58 | model: "grok-code-fast-1", |
| 59 | displayName: "Grok Code Fast 1", |
| 60 | contextLength: 256000, |
| 61 | maxCompletionTokens: 10000, |
| 62 | recommendedFor: ["chat"], |
| 63 | regex: /grok-code-fast-1/, |
| 64 | }, |
| 65 | ], |
| 66 | id: "xAI", |
| 67 | displayName: "xAI", |
| 68 | }; |