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
grokroute andllm-groksettings namespace. - Subscription Sign-In: Interacts with
auth.x.aithrough a Host-owned PKCE flow, with sessions stored at$DSH_HOME/grok-oauth. - Model Management: Supports official
grok-4.6andgrok-4.5models, 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_searchandx_search, but not as actx.webprovider. - Image Generation (Optional): After installing
dsh-model-switchv0.4.x, provides optionalgrok_image_genimage 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¶
- 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.
- 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).
- Search: Chat requests automatically include server-side search tools. Note that search results are not used as a
ctx.webprovider, and reasoning items returned by the server are in encrypted format. - Image Generation (Optional): If
dsh-model-switchv0.4.x is installed, you can enable thegrok_image_gencapability 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, thegrokroute still works, but the Providers page and cards are omitted. - Permissions and Storage: The plugin does not read
~/.grok/auth, nor does it declareapiKeyEnv. 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.