Skip to content

[Bug]: renamed Command Code key provider does not inherit COMMAND_CODE_MODEL_REASONING_EFFORTS #4308

Description

@richardfeiliu-a11y

Client or integration

Other

Area

Catalog / models

Summary

A Command Code API-key provider saved under a non-registry name (CommandCode, PascalCase) never receives COMMAND_CODE_MODEL_REASONING_EFFORTS. Live models then advertise no reasoning ladder, so DSH, ZCode, and Codex App all hide the thought-level picker.

This is not a DSH/ZCode export bug. src/clients/config-export/dsh.ts and zcode.ts already emit reasoningEfforts / reasoning when the catalog row has a ladder. The catalog row is empty.

This is also not a duplicate of #4253 / #4282. Those add missing table rows for deepseek/deepseek-v4.1-flash on the official ids command-code (OAuth) and commandcode (key preset). This report is about a renamed key row that never inherits the table at all — including for models that already have rows, such as deepseek/deepseek-v4-flash.

Root cause in 2.51.0:

  1. Registry key preset id is commandcode (adapter: openai-chat, baseUrl: https://api.commandcode.ai/provider/v1, modelReasoningEfforts: COMMAND_CODE_MODEL_REASONING_EFFORTS). OAuth id is command-code.
  2. enrichProviderFromRegistry looks up PROVIDER_REGISTRY.find(row => row.id === name) with exact name match. CommandCodecommandcodecommand-code, so the seed is skipped.
  3. The destination fallback added for [Bug] Reasoning effort selected in Codex Desktop is not propagated to routed DeepSeek and GLM models #1100 (registryEntryForProviderDestinationenrichReasoningSummariesByDestination) only copies reasoning-summary flags. It does not fill-missing modelReasoningEfforts.
  4. For the official OAuth/key ids, unknown live models then fall through to provider-level reasoningEfforts: [] ("Unknown/new live models deliberately do not advertise a reasoning picker"). A renamed key row does not even get that seed; configuredReasoningEfforts returns undefined for every model until the operator overlays the map by hand.

The GUI comment in registryEntryForProviderDestination already notes that a preset can be saved under any name and then silently lose metadata it still needs to display.

Reproduction

Vanilla shape (no local modelReasoningEfforts overlay):

  1. Install @bitkyc08/opencodex@2.51.0.
  2. Add Command Code as an API-key provider whose config key is not commandcode. Observed: providers.CommandCode with adapter: "openai-chat", authMode: "key", baseUrl: "https://api.commandcode.ai/provider/v1".
  3. Enable a live Command Code model that already has a table row, e.g. deepseek/deepseek-v4-flash, and one that does not on 2.51.0, e.g. deepseek/deepseek-v4.1-flash.
  4. GET /api/models (or ocx effort model CommandCode/deepseek/deepseek-v4-flash --json): reasoningEfforts / supportedEfforts empty or null for both.
  5. Export DSH/ZCode (GET /api/client-config?client=dsh|zcode): those models have no reasoningEfforts / reasoning block, so the harness UI shows no thought-level control.

Contrast: the same destination under registry id commandcode or OAuth command-code inherits the table, so deepseek/deepseek-v4-flash advertises high, max. Only deepseek/deepseek-v4.1-flash is empty there, which is #4253.

Version

2.51.0 (@bitkyc08/opencodex). Local src/providers/command-code-efforts.ts still has no deepseek/deepseek-v4.1-flash row (that part is #4282 on dev). The rename/inheritance hole is independent of that row.

Operating system

macOS 26.6.2 (25G83)

Provider and model

CommandCode (API key, renamed) / deepseek/deepseek-v4-flash

Also empty without overlay: CommandCode / deepseek/deepseek-v4.1-flash, CommandCode / meituan/LongCat-2.0:free, and every other live Command Code id.

Official ids that do inherit the table: commandcode (key preset), command-code (OAuth).

Logs or error output

ocx effort against the renamed provider, wrong slug encoding (looks up deepseek-deepseek-v4.1-flash instead of deepseek/deepseek-v4.1-flash):

{
  "provider": "CommandCode",
  "model": "deepseek-deepseek-v4.1-flash",
  "reasoningDisabled": false,
  "supportedEfforts": null,
  "wireMap": null
}

Vanilla (no overlay) for a table row that official commandcode would advertise:

  • GET /api/models namespaced CommandCode/deepseek-deepseek-v4.1-flashreasoningEfforts: null
  • DSH generated config: model present, no reasoningEfforts map
  • ZCode generated config: model present, no reasoning block

After a local fill-missing overlay of COMMAND_CODE_MODEL_REASONING_EFFORTS onto providers.CommandCode.modelReasoningEfforts and POST /api/providers/reload, the same ids advertise ladders and DSH/ZCode export them. That confirms the exporters are fine and the missing inheritance is on enrich.

Suggested fix

In enrichProviderFromRegistry, when name lookup fails but registryEntryForProviderDestination(prov) returns the Command Code key preset (or any key preset with modelReasoningEfforts), fill-missing prov.modelReasoningEfforts with fillRecordOfArrays(seed.modelReasoningEfforts, prov.modelReasoningEfforts) the same way the name-matched path does. Do not overwrite operator keys.

Do not substring-bridge deepseek-v4-flashdeepseek-v4.1-flash (modelRecordValue exact / colon-family / case-fold only; #4253 already forbids a stem bridge). New ids still need table rows (#4282).

Optional follow-up: destination enrichment today is summary-only (enrichReasoningSummariesByDestination). Extending it to effort maps is the same class as #1100 (renamed "GLM" provider lost metadata while routing still worked).

Related

Checks

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

Redacted configuration

{
  "providers": {
    "CommandCode": {
      "adapter": "openai-chat",
      "authMode": "key",
      "baseUrl": "https://api.commandcode.ai/provider/v1"
    }
  }
}

Registry key preset id that this destination matches, but name lookup misses: commandcode.

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

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething 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