AI Agent Hub
Back to plugins
🤖

dsh-llm-codex-auth-native-compact-image

Model Inference Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install thaning0/dsh-llm-codex-auth-native-compact-image

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install thaning0/dsh-llm-codex-auth-native-compact-image in DeepSeek Harness to install the plugin; full source code is available at https://github.com/thaning0/dsh-llm-codex-auth-native-compact-image .

About this plugin

Many teams have already built their workflows in DeepSeek Harness but still want to tap into the model quota included in a ChatGPT or Codex subscription. dsh-llm-codex-auth-native-compact-image closes that gap: it signs you in to your ChatGPT account (Plus / Pro / Business / Edu) through OpenAI's official OAuth device-code flow, registers the subscription models as a codex-oauth provider inside dsh, and requires no API key management or local callback server. Credentials are stored exclusively in the dsh credential store, kept out of config files, session logs, and the repository, while the refresh token is renewed automatically within pi-ai's serialized write path.

Compaction is where the plugin really shines. It integrates provider-native compaction so that every /compact invocation, the 80 percent context-pressure auto-trigger, and context-overflow recovery all produce a versioned opaque checkpoint instead of a naive text summary. Checkpoints record attachment references but not image base64 payloads; after a restart the Codex adapter replays them verbatim. Cross-provider, cross-model, and cross-account identity mismatches fail fast before any network call, never silently falling back to basic compaction. The same npm package exposes separate auth/transport and agent-scoped compaction entry points, so callers never see credential material.

The plugin also handles multimodal image input for Codex models that declare image capability, converting PNG, JPEG, WebP, and GIF attachments into per-request base64 data URLs. Transient failures such as WebSocket disconnects, DNS errors, rate limits, and early stream closures are classified into TRANSPORT, RATE_LIMIT, or SERVER back-off retries while preserving the provider request ID for easier debugging. The settings panel surfaces remaining usage percentages across the 5-hour and 7-day windows with reset times and a manual refresh button, and in-chat commands like /codex-status, /codex-usage, and /codex-logout keep everything within reach.

This plugin is a good fit for developers who want to reuse an existing ChatGPT or Codex subscription inside dsh, value the quality and safety of native compaction over basic summarization, and deploy in headless environments where browser callbacks are unavailable. One caveat: the plugin calls the ChatGPT web-backend API, an endpoint that OpenAI does not officially support. Using it carries a real risk of Terms-of-Service violation or account restriction, so assess that risk before enabling it in production.

Use Cases

  • Reuse an existing ChatGPT or Codex subscription quota to call Codex models directly from dsh for inference tasks.
  • Leverage provider-native opaque checkpoints instead of text summaries for /compact, 80 percent pressure triggers, and overflow recovery.
  • Sign in via OAuth device-code flow and continuously invoke Codex subscription models in headless or CI environments without a browser.

Best For

  • Developers who hold a ChatGPT Plus, Pro, Business, or Edu subscription and want to reuse it inside dsh workflows.
  • Teams that prioritize compaction quality and credential isolation over a simple text-summary fallback.
  • Engineers and platform teams that need to invoke Codex subscription models in server-side or CI pipelines without a browser callback.