Skip to content

Add SuperGrok provider and align Grok 4.20 requests with modeId API format#1

Merged
JohnPBZ merged 2 commits intomainfrom
copilot/add-supergrok-llm-provider
Mar 24, 2026
Merged

Add SuperGrok provider and align Grok 4.20 requests with modeId API format#1
JohnPBZ merged 2 commits intomainfrom
copilot/add-supergrok-llm-provider

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 24, 2026

新增 SuperGrok provider,沿用既有 Grok reverse 流程但以獨立 provider type/設定鍵接入;同時對齊 grok2api PR justlovemaki#382,將 grok-4.20 請求改為 modeId 格式並補上 fast 變體。

  • Provider onboarding: supergrok-custom

    • Added new protocol/provider constants:
      • MODEL_PROTOCOL_PREFIX.SUPERGROK = 'supergrok'
      • MODEL_PROVIDER.SUPERGROK_CUSTOM = 'supergrok-custom'
    • Registered adapter, converter, and strategy for SuperGrok.
    • Added supergrok-custom model catalog (mirrors Grok family, including 4.20 variants).
    • Added SuperGrok defaults in provider-pool health check and provider identification mapping.
  • SuperGrok service wiring

    • Introduced SuperGrokApiService as a thin Grok-derived service that maps SUPERGROK_* config keys to Grok runtime fields.
    • Keeps behavior parity with existing Grok logic while allowing separate credential/config management.
  • Apply PR Windows 双击安装脚本没反应,有红色信息一闪而过 justlovemaki/AIClient-2-API#382 behavior for Grok 4.20

    • Updated grok-4.20-beta mapping to expert mode semantics.
    • Added grok-4.20-fast.
    • For grok-420 payload construction:
      • remove modelName / modelMode
      • set modeId (expert / fast)
      • set responseMetadata to {} and keep enable420 = true
  • Usage and UI integration

    • Added SuperGrok to usage provider support paths.
    • Added SuperGrok in config/provider UI options and modal field schema (SUPERGROK_COOKIE_TOKEN, SUPERGROK_CF_CLEARANCE, SUPERGROK_USER_AGENT, SUPERGROK_BASE_URL).
    • Added i18n label for SuperGrok Reverse.

Example (new 4.20 payload path):

if (mapping.name === 'grok-420') {
  payload.responseMetadata = {};
  delete payload.modelName;
  delete payload.modelMode;
  payload.modeId = mapping.modeId || 'expert';
  payload.enable420 = true;
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 192.168.1.232
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/AIClient-2-API/AIClient-2-API/node_modules/.bin/../jest/bin/jest.js --runInBand (packet block)
  • registry.npmmirror.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/npm install (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/npm ci /rg (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Add new LLM provider SuperGrok based on existing Grok functionality Add SuperGrok provider and align Grok 4.20 requests with modeId API format Mar 24, 2026
Copilot AI requested a review from JohnPBZ March 24, 2026 01:46
@JohnPBZ JohnPBZ marked this pull request as ready for review March 24, 2026 02:08
@JohnPBZ JohnPBZ merged commit 1db0d9e into main Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants