Documents that GrokRuntimeAdapter.promptWithFallback is an intentional no-op rather than unfinished work, and updates its regression test to assert that contract explicitly. - Add FNXC:GrokCli comment on promptWithFallback explaining Grok streaming already flows through the pi/xAI OpenAI-compatible path from FN-7711, that the grok CLI has no documented non-interactive prompt/stream subcommand, and that this stub is only reached via an unused runtimeConfig.runtimeHint === "grok" path - Remove the stale TODO(FN-7705) comment - Rename/expand the promptWithFallback test to assert the intentional no-op contract (resolves without throwing, returns undefined) Files changed: .../src/__tests__/runtime-adapter.test.ts | 11 ++++++++++- .../fusion-plugin-grok-runtime/src/runtime-adapter.ts | 18 ++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-7715 Fusion-Task-Lineage: 118639d3-5530-45d5-bc66-de9b1f18fbc4 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
fusion-plugin-grok-runtime
Grok CLI-backed provider/runtime plugin for Fusion.
Install
This plugin ships bundled with Fusion and is auto-installed like the other
built-in runtime plugins. It shells out to an operator-installed grok
binary on PATH — Fusion never downloads or bundles the CLI itself.
- Canonical upstream repo: https://github.com/superagent-ai/grok-cli
- Docs / homepage: https://github.com/superagent-ai/grok-cli#readme
- Install script: https://raw.githubusercontent.com/superagent-ai/grok-cli/main/install.sh
- npm alternative:
bun add -g grok-dev(see https://github.com/superagent-ai/grok-cli/releases) - Binary name:
grok - This is a community-built project, not affiliated with xAI. No fixed
release artifact is bundled by Fusion, so no checksum is pinned
(
upstream-pending-verification).
Contract summary
- Provider ID:
grok-cli - Binary probe:
grok --version - Auth model — API key, not OAuth/session. Grok has no
status/whoamisubcommand. Authentication is derived from key PRESENCE only:GROK_API_KEYenvironment variable, or~/.grok/user-settings.json→{ "apiKey": "..." }Base URL defaults tohttps://api.x.ai/v1. A missing/unreadable/malformed key configuration fails closed toauthenticated: falsewith an actionable reason — never throws.
- Model discovery:
grok models(plain-text output, with pricing hints per the upstream README). The exact line shape isupstream-pending-verification, so discovery parses conservatively: the leading token before a-label separator, or before the first multi-space pricing column, is treated as the model id; ids are deduplicated. Output that happens to be JSON is tolerated defensively even though the CLI is not known to emit it.
Enable via Settings → Authentication
- Install the
grokCLI and setGROK_API_KEY(or populate~/.grok/user-settings.json). - Open Settings → Authentication in the Fusion dashboard.
- The "Grok — via Grok CLI" card shows probe status (binary found, API key present). Click Enable once the binary is available.
- Discovered Grok models (via
grok models) then merge into the model picker under thegrok-cliprovider id.
Notes
Do not invent a grok status/whoami JSON auth contract — Grok is
API-key auth. See AGENTS.md's "External-integration evidence" policy for
why the release/checksum fields above stay at
upstream-pending-verification.