Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture. When integrating xAI Grok, developers typically need to handle subscription authorization, model routing, and configuration management. This plugin provides a standalone Grok subscription OAuth provider and a Web configuration interface. It coexists with the built-in xai console API-key route, does not override native configuration, and focuses on subscription-level management and Web UI interaction.

Core Features

This plugin implements the following core capabilities:

  • Standalone Routing and Configuration: Provides a standalone grok route and llm-grok settings namespace.
  • Subscription Sign-In: Interacts with auth.x.ai through a Host-owned PKCE flow, with sessions stored at $DSH_HOME/grok-oauth.
  • Model Management: Supports official grok-4.6 and grok-4.5 models, and allows reordering, editing, or deleting the model catalog through the Web interface.
  • Context and Thinking: The context window is used as the DSH compression budget, and default thinking configuration is supported.
  • Subscription Usage: Displays subscription quota usage on the Grok card.
  • Server-Side Search Tools: Integrates web_search and x_search, but not as a ctx.web provider.
  • Image Generation (Optional): After installing dsh-model-switch v0.4.x, provides optional grok_image_gen image generation capability.

Installation and Enablement

Before installation, ensure that dsh-llm-providers-ui is installed to display LLM provider cards.

dsh plugin --profile web add --force https://github.com/NOirBRight/dsh-llm-providers-ui/releases/download/v0.2.9/dsh-llm-providers-ui-0.2.9.tgz
dsh plugin --profile web add --force https://github.com/NOirBRight/dsh-llm-grok/releases/download/v0.3.17/dsh-llm-grok-0.3.17.tgz
dsh web

Configuration and Usage

  1. Sign In: Open Settings -> LLM Providers -> Grok, and click Sign in with xAI. The system will start a Host-owned PKCE flow, and the session is stored only locally on the Host.
  2. Model Catalog: The card displays the model list for the current account. You can collapse the catalog, edit the default thinking configuration, or adjust the context window (default: 500,000 tokens).
  3. Search: Chat requests automatically include server-side search tools. Note that search results are not used as a ctx.web provider, and reasoning items returned by the server are in encrypted format.
  4. Image Generation (Optional): If dsh-model-switch v0.4.x is installed, you can enable the grok_image_gen capability in settings to invoke Grok Imagine.

Technical Details and Notes

  • Dependencies: Web UI cards depend on dsh-llm-providers-ui. In Headless mode or a Web environment without UI, the grok route still works, but the Providers page and cards are omitted.
  • Permissions and Storage: The plugin does not read ~/.grok/auth, nor does it declare apiKeyEnv. This means the Grok row on the Models page does not display a “missing-API-key” badge.
  • Compatibility: Verified compatible with DSH versions 0.1.2-alpha.4, 0.1.2-rc.1, 0.1.5-rc.1, and 0.1.5-rc.2.
  • Retry Strategy: The default maximum number of retries is 8, with support for configurable backoff strategies.

Summary

dsh-llm-grok provides DSH with a standardized Grok subscription integration solution, addressing complex subscription authorization and model catalog management through the Web interface. For users who need to use Grok subscriptions and value configuration visualization, this plugin offers a non-intrusive alternative to native routing.

GitHub Repository | Plugin Catalog