@magpie-community/opencode-grok-auth 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +13 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -225,8 +225,20 @@ function rewrite(body) {
225
225
 
226
226
  // ---- models -------------------------------------------------------------------
227
227
 
228
+ // the levels the built-in offered for grok-4.7 before Grok listed any (its
229
+ // maker's, as models.dev has them): kept when the list can't be read, so
230
+ // a move leaves an agent's reasoning level where it was
231
+ const DEFAULT_EFFORTS = ["low", "medium", "high", "xhigh"]
232
+
228
233
  const DEFAULT_MODELS = {
229
- "grok-4.7": { name: "Grok 4.7", attachment: true, reasoning: true, tool_call: true, modalities: { input: ["text", "image"], output: ["text"] } },
234
+ "grok-4.7": {
235
+ name: "Grok 4.7",
236
+ attachment: true,
237
+ reasoning: true,
238
+ tool_call: true,
239
+ modalities: { input: ["text", "image"], output: ["text"] },
240
+ variants: Object.fromEntries(DEFAULT_EFFORTS.map((e) => [e, { reasoningEffort: e }])),
241
+ },
230
242
  }
231
243
 
232
244
  // listModels is what the account can use, as the CLI's backend lists it:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magpie-community/opencode-grok-auth",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "OpenCode provider plugin: Grok (SuperGrok / X Premium+) through the Grok Build CLI's sign-in",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",