Skip to content

[Bug]: ZCode client config export omits reasoning configuration, preventing thought level controls in ZCode UI #4147

Description

@richardfeiliu-a11y

Client or integration

Other

Area

Catalog / models

Summary

When OpenCodex exports the managed provider configuration to ~/.zcode/v2/config.json via ocx zcode or integration sync, buildZcodeClientConfig in src/clients/config-export/zcode.ts generates entries containing only name, modalities, and limit.context. It omits the reasoning block completely.

As a result, ZCode's UI never shows the "Thought Level" (思考强度) select dropdown for reasoning-capable models (e.g. gemini-3.8-flash, deepseek-v4-flash, claude-opus-4-6-thinking, grok-4.6, muse-spark-1.3-contributor, etc.), even though the wire protocols (reasoning_effort in Chat Completions and Responses) are fully supported and functional.

Reproduction

  1. Configure at least one reasoning-capable model in OpenCodex (e.g., google-antigravity/gemini-3.8-flash or CommandCode/deepseek/deepseek-v4-flash).
  2. Run ocx zcode (or enable ZCode integration from OpenCodex) to export configuration to ~/.zcode/v2/config.json.
  3. Inspect ~/.zcode/v2/config.json under provider.opencodex.models: observe that all exported model entries lack the reasoning block (reasoning: { enabled: true, variants: [...], defaultVariant: "..." }).
  4. Launch ZCode desktop app and open a chat session with one of these models: observe that the "Thought Level" control is completely missing from the session bar because ZCode requires model.reasoning.levels to render the picker.

Version

2.48.0

Operating system

macOS 15 (Darwin arm64)

Provider and model

google-antigravity/gemini-3.8-flash, CommandCode/deepseek/deepseek-v4-flash, opencode-go/muse-spark-1.3-contributor

Logs or error output

// Observed in src/clients/config-export/zcode.ts:
export interface ZcodeModelEntry {
  name?: string;
  limit?: { context: number; output?: number };
  modalities: { input: string[]; output: string[] };
  // Missing reasoning specification
}

Redacted configuration

{
  "provider": {
    "opencodex": {
      "models": {
        "google-antigravity/gemini-3.8-flash": {
          "name": "gemini-3.8-flash (google)",
          "limit": { "context": 1048576 },
          "modalities": { "input": ["text", "image"], "output": ["text"] }
        }
      }
    }
  }
}

Expected Behavior

src/clients/config-export/zcode.ts should export reasoning when model.reasoningEfforts is present, similar to omp.ts and dsh.ts:

export interface ZcodeModelEntry {
  name?: string;
  limit?: { context: number; output?: number };
  modalities: { input: string[]; output: string[] };
  reasoning?: {
    enabled: boolean;
    variants: string[];
    defaultVariant?: string;
  };
}

// In buildZcodeClientConfig:
if (model.reasoningEfforts && model.reasoningEfforts.length > 0) {
  entry.reasoning = {
    enabled: true,
    variants: model.reasoningEfforts.filter(e => e !== "ultra"),
    ...(model.defaultReasoningEffort ? { defaultVariant: model.defaultReasoningEffort } : {}),
  };
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcatalogModel catalog, slugs, visibility, routed entries

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions