Changesets · Branches · Tags · Compare
| Changeset | a081e4024e80abb90264e1d5a4f8d1d1e71d14134348bcff983121afc04470b4 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-09-24 17:42 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-09-24 17:42 -07:00 |
| Parents | a95c52aaa678, 88c3ae41cf22 |
10 files changed
modified core/llm/llms/xAI.ts +0 −8
| @@ -7,14 +7,6 @@ | ||
| 7 | 7 | static defaultOptions: Partial<LLMOptions> = { |
| 8 | 8 | apiBase: "https://api.x.ai/v1/", |
| 9 | 9 | }; |
| 10 | - | |
| 11 | - private static MODEL_IDS: { [name: string]: string } = { | |
| 12 | - "grok-beta": "grok-beta", // Future names might not line up | |
| 13 | - }; | |
| 14 | - | |
| 15 | - protected _convertModelName(model: string) { | |
| 16 | - return xAI.MODEL_IDS[model] || this.model; | |
| 17 | - } | |
| 18 | 10 | } |
| 19 | 11 | |
| 20 | 12 | export default xAI; |
modified core/llm/toolSupport.test.ts +17 −0
| @@ -280,6 +280,23 @@ | ||
| 280 | 280 | }); |
| 281 | 281 | }); |
| 282 | 282 | |
| 283 | + describe("xAI", () => { | |
| 284 | + const supportsFn = PROVIDER_TOOL_SUPPORT["xAI"]; | |
| 285 | + | |
| 286 | + it("should return true for Grok-3 models", () => { | |
| 287 | + expect(supportsFn("grok-3")).toBe(true); | |
| 288 | + expect(supportsFn("grok-3-mini")).toBe(true); | |
| 289 | + expect(supportsFn("grok-3-fast")).toBe(true); | |
| 290 | + }); | |
| 291 | + | |
| 292 | + it("should return true for Grok-4 models", () => { | |
| 293 | + expect(supportsFn("grok-4")).toBe(true); | |
| 294 | + expect(supportsFn("grok-4-fast-non-reasoning")).toBe(true); | |
| 295 | + expect(supportsFn("grok-4-fast-reasoning")).toBe(true); | |
| 296 | + expect(supportsFn("Grok-4-Fast")).toBe(true); | |
| 297 | + }); | |
| 298 | + }); | |
| 299 | + | |
| 283 | 300 | describe("novita", () => { |
| 284 | 301 | const supportsFn = PROVIDER_TOOL_SUPPORT["novita"]; |
| 285 | 302 |
modified core/llm/toolSupport.ts +4 −0
| @@ -110,6 +110,10 @@ | ||
| 110 | 110 | } |
| 111 | 111 | return ["claude", "gemini"].some((val) => lowerCaseModel.includes(val)); |
| 112 | 112 | }, |
| 113 | + xAI: (model) => { | |
| 114 | + const lowerCaseModel = model.toLowerCase(); | |
| 115 | + return ["grok-3", "grok-4"].some((val) => lowerCaseModel.includes(val)); | |
| 116 | + }, | |
| 113 | 117 | bedrock: (model) => { |
| 114 | 118 | if ( |
| 115 | 119 | [ |
modified docs/customization/models.mdx +2 −2
| @@ -65,10 +65,10 @@ | ||
| 65 | 65 | 3. Add `GEMINI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) |
| 66 | 66 | 4. Click `Reload config` in the agent selector in the Continue IDE extension |
| 67 | 67 | |
| 68 | -[Grok 4](https://hub.continue.dev/xai/grok-4) from xAI | |
| 68 | +[Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) from xAI | |
| 69 | 69 | |
| 70 | 70 | 1. Get your API key from [xAI](https://console.x.ai/) |
| 71 | -2. Add [Grok 4](https://hub.continue.dev/xai/grok-4) to an agent on Continue Hub | |
| 71 | +2. Add [Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) to an agent on Continue Hub | |
| 72 | 72 | 3. Add `XAI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) |
| 73 | 73 | 4. Click `Reload config` in the agent selector in the Continue IDE extension |
| 74 | 74 |
modified docs/customize/deep-dives/model-capabilities.mdx +8 −3
| @@ -210,9 +210,14 @@ | ||
| 210 | 210 | |
| 211 | 211 | ### xAI |
| 212 | 212 | |
| 213 | -| Model | Tool Use | Image Input | Context Window | | |
| 214 | -| :----- | -------- | ----------- | -------------- | | |
| 215 | -| Grok 4 | Yes | Yes | 128k | | |
| 213 | +| Model | Tool Use | Image Input | Context Window | | |
| 214 | +| :------------------------ | -------- | ----------- | -------------- | | |
| 215 | +| Grok Code Fast 1 | Yes | Yes | 256k | | |
| 216 | +| Grok 4 Fast Reasoning | Yes | Yes | 2M | | |
| 217 | +| Grok 4 Fast Non-Reasoning | Yes | Yes | 2M | | |
| 218 | +| Grok 4 | Yes | Yes | 256k | | |
| 219 | +| Grok 3 | Yes | Yes | 131k | | |
| 220 | +| Grok 3 Mini | Yes | Yes | 131k | | |
| 216 | 221 | |
| 217 | 222 | ### Moonshot AI |
| 218 | 223 |
modified docs/customize/model-providers/more/xAI.mdx +6 −9
| @@ -3,13 +3,9 @@ | ||
| 3 | 3 | slug: ../xai |
| 4 | 4 | --- |
| 5 | 5 | |
| 6 | -<Tip> | |
| 7 | - **Discover xAI models [here](https://hub.continue.dev/xai)** | |
| 8 | -</Tip> | |
| 6 | +<Tip>**Discover xAI models [here](https://hub.continue.dev/xai)**</Tip> | |
| 9 | 7 | |
| 10 | -<Info> | |
| 11 | - Get an API key from the [xAI Console](https://console.x.ai/) | |
| 12 | -</Info> | |
| 8 | +<Info>Get an API key from the [xAI Console](https://console.x.ai/)</Info> | |
| 13 | 9 | |
| 14 | 10 | ## Configuration |
| 15 | 11 | |
| @@ -29,7 +25,7 @@ | ||
| 29 | 25 | "models": [ |
| 30 | 26 | { |
| 31 | 27 | "title": "<MODEL_NAME>", |
| 32 | - "provider": "anthropic", | |
| 28 | + "provider": "xai", | |
| 33 | 29 | "model": "<MODEL_ID>", |
| 34 | 30 | "apiKey": "<YOUR_XAI_API_KEY>" |
| 35 | 31 | } |
| @@ -40,5 +36,6 @@ | ||
| 40 | 36 | </Tabs> |
| 41 | 37 | |
| 42 | 38 | <Info> |
| 43 | - **Check out a more advanced configuration [here](https://hub.continue.dev/xai/grok-4?view=config)** | |
| 44 | -</Info> | |
| No newline at the end of the file | ||
| 39 | + **Check out a more advanced configuration | |
| 40 | + [here](https://hub.continue.dev/xai/grok-code-fast-1?view=config)** | |
| 41 | +</Info> |
modified gui/src/pages/AddNewModel/configs/models.ts +77 −8
| @@ -1585,14 +1585,83 @@ | ||
| 1585 | 1585 | providerOptions: ["scaleway", "nebius", "ovhcloud", "ncompass"], |
| 1586 | 1586 | isOpenSource: true, |
| 1587 | 1587 | }, |
| 1588 | - grokBeta: { | |
| 1589 | - title: "Grok Beta", | |
| 1590 | - description: "Generative artificial intelligence chatbot developed by xAI.", | |
| 1591 | - refUrl: "", | |
| 1592 | - params: { | |
| 1593 | - title: "Grok Beta", | |
| 1594 | - model: "grok-beta", | |
| 1595 | - contextLength: 128_000, | |
| 1588 | + grokCodeFast1: { | |
| 1589 | + title: "Grok Code Fast 1", | |
| 1590 | + description: | |
| 1591 | + "A speedy and economical reasoning model that excels at agentic coding", | |
| 1592 | + refUrl: "https://docs.x.ai/docs/models/grok-code-fast-1", | |
| 1593 | + params: { | |
| 1594 | + title: "Grok Code Fast 1", | |
| 1595 | + model: "grok-code-fast-1", | |
| 1596 | + contextLength: 256000, | |
| 1597 | + }, | |
| 1598 | + icon: "xAI.png", | |
| 1599 | + providerOptions: ["xAI", "askSage"], | |
| 1600 | + isOpenSource: false, | |
| 1601 | + }, | |
| 1602 | + grok4FastReasoning: { | |
| 1603 | + title: "Grok 4 Fast Reasoning", | |
| 1604 | + description: "xAI's latest advancement in cost-efficient reasoning models", | |
| 1605 | + refUrl: "https://docs.x.ai/docs/models/grok-4-fast-reasoning", | |
| 1606 | + params: { | |
| 1607 | + title: "Grok 4 Fast Reasoning", | |
| 1608 | + model: "grok-4-fast-reasoning", | |
| 1609 | + contextLength: 2_000_000, | |
| 1610 | + }, | |
| 1611 | + icon: "xAI.png", | |
| 1612 | + providerOptions: ["xAI", "askSage"], | |
| 1613 | + isOpenSource: false, | |
| 1614 | + }, | |
| 1615 | + grok4FastNonReasoning: { | |
| 1616 | + title: "Grok 4 Fast Non-Reasoning", | |
| 1617 | + description: "xAI's latest advancement in cost-efficient models", | |
| 1618 | + refUrl: "https://docs.x.ai/docs/models/grok-4-fast-non-reasoning", | |
| 1619 | + params: { | |
| 1620 | + title: "Grok 4 Fast Non-Reasoning", | |
| 1621 | + model: "grok-4-fast-non-reasoning", | |
| 1622 | + contextLength: 2_000_000, | |
| 1623 | + }, | |
| 1624 | + icon: "xAI.png", | |
| 1625 | + providerOptions: ["xAI", "askSage"], | |
| 1626 | + isOpenSource: false, | |
| 1627 | + }, | |
| 1628 | + grok4: { | |
| 1629 | + title: "Grok 4", | |
| 1630 | + description: | |
| 1631 | + "xAI's latest and greatest flagship model, offering strong performance in natural language, math and reasoning.", | |
| 1632 | + refUrl: "https://docs.x.ai/docs/models/grok-4", | |
| 1633 | + params: { | |
| 1634 | + title: "Grok 4", | |
| 1635 | + model: "grok-4", | |
| 1636 | + contextLength: 256_000, | |
| 1637 | + }, | |
| 1638 | + icon: "xAI.png", | |
| 1639 | + providerOptions: ["xAI", "askSage"], | |
| 1640 | + isOpenSource: false, | |
| 1641 | + }, | |
| 1642 | + grok3: { | |
| 1643 | + title: "Grok 3", | |
| 1644 | + description: | |
| 1645 | + "Excels at enterprise use cases like data extraction, coding, and text summarization", | |
| 1646 | + refUrl: "https://docs.x.ai/docs/models/grok-3", | |
| 1647 | + params: { | |
| 1648 | + title: "Grok 3", | |
| 1649 | + model: "grok-3", | |
| 1650 | + contextLength: 131_072, | |
| 1651 | + }, | |
| 1652 | + icon: "xAI.png", | |
| 1653 | + providerOptions: ["xAI", "askSage"], | |
| 1654 | + isOpenSource: false, | |
| 1655 | + }, | |
| 1656 | + grok3Mini: { | |
| 1657 | + title: "Grok 3 Mini", | |
| 1658 | + description: | |
| 1659 | + "A lightweight model that thinks before responding. Fast, smart, and great for logic-based tasks that do not require deep domain knowledge.", | |
| 1660 | + refUrl: "https://docs.x.ai/docs/models/grok-3-mini", | |
| 1661 | + params: { | |
| 1662 | + title: "Grok 3 Mini", | |
| 1663 | + model: "grok-3-mini", | |
| 1664 | + contextLength: 131_072, | |
| 1596 | 1665 | }, |
| 1597 | 1666 | icon: "xAI.png", |
| 1598 | 1667 | providerOptions: ["xAI", "askSage"], |
modified gui/src/pages/AddNewModel/configs/providers.ts +8 −1
| @@ -622,7 +622,14 @@ | ||
| 622 | 622 | required: true, |
| 623 | 623 | }, |
| 624 | 624 | ], |
| 625 | - packages: [models.grokBeta], | |
| 625 | + packages: [ | |
| 626 | + models.grokCodeFast1, | |
| 627 | + models.grok4FastReasoning, | |
| 628 | + models.grok4FastNonReasoning, | |
| 629 | + models.grok4, | |
| 630 | + models.grok3, | |
| 631 | + models.grok3Mini, | |
| 632 | + ], | |
| 626 | 633 | apiKeyUrl: "https://console.x.ai/", |
| 627 | 634 | }, |
| 628 | 635 | lemonade: { |
modified packages/llm-info/package.json +1 −1
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "name": "@continuedev/llm-info", |
| 3 | - "version": "1.0.9", | |
| 3 | + "version": "1.0.10", | |
| 4 | 4 | "description": "", |
| 5 | 5 | "main": "dist/index.js", |
| 6 | 6 | "types": "dist/index.d.ts", |
modified packages/llm-info/src/providers/xAI.ts +54 −0
| @@ -7,6 +7,60 @@ | ||
| 7 | 7 | displayName: "Grok Beta", |
| 8 | 8 | contextLength: 128000, |
| 9 | 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/, | |
| 10 | 64 | }, |
| 11 | 65 | ], |
| 12 | 66 | id: "xAI", |