Skip to content

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

Closed

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. CommandCode ≠ commandcode ≠ command-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 (registryEntryForProviderDestination → enrichReasoningSummariesByDestination) 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-flash → reasoningEfforts: 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-flash → deepseek-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

  1. added
    bugSomething isn't working
    account-poolOAuth, credentials, Codex pool, quota, failover, plans
    catalogModel catalog, slugs, visibility, routed entries
    on Sep 11, 2026
  2. lidge-jun commented on Sep 11, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 63 / 80

    이 이슈는 Command Code API-key 프리셋을 레지스트리 id commandcode 가 아닌 다른 이름(예: CommandCode)으로 저장했을 때, 카탈로그가 COMMAND_CODE_MODEL_REASONING_EFFORTS 를 한 줄도 물려받지 못해 생각 단계(picker)가 DSH·ZCode·Codex App에서 전부 숨겨지는 버그다. 지금 dev HEAD는 7a0513c2f(#4292 warm API-key 1차 선택 + quota 순위 키 풀이 tip)이고 패키지는 2.52.0이다. 본문이 지적한 구멍은 tip에서도 그대로다.

    핵심은 이름 조회와 목적지 조회가 갈라진 점이다. enrichProviderFromRegistry(src/providers/derive.ts)는 먼저 PROVIDER_REGISTRY.find(row => row.id === name) 으로 설정 키 이름만 본다. CommandCode ≠ commandcode ≠ OAuth id command-code 이라서 seed 전체가 스킵된다. 이름 매칭이 실패하면 early return 전에 enrichReasoningSummariesByDestination / service-tier / verbosity 만 registryEntryForProviderDestination 으로 채운다. 그 헬퍼(src/providers/registry.ts)는 고정 key destination(adapter+baseUrl, override/templated URL 제외)으로 프리셋 commandcode(https://api.commandcode.ai/provider/v1)를 찾을 수 있다. 그런데 destination 경로는 reasoning-summary 맵만 채우도록 주석에 일부러 좁혀 두었고(#1100 GLM 이름 케이스), modelReasoningEfforts fill-missing은 이름 매칭 성공 분기에서만 fillRecordOfArrays(seed, user) 로 돈다. 그래서 라우팅·baseUrl은 살아 있는데 카탈로그 사다리는 비는 상태가 된다.

    이 이슈는 테이블 행 추가 버그와 겹치지 않는다. #4253은 이미 닫혔고, #4282로 src/providers/command-code-efforts.ts에 deepseek/deepseek-v4.1-flash 행이 HEAD에 있다. 공식 id commandcode/command-code 에서는 그 행이 보이지만, 이름을 바꾼 key 행은 테이블이 있어도 enrich가 seed를 안 붙인다. 리포터 재현(overlay 후 reload하면 사다리가 살아남)도 exporters(src/clients/config-export/dsh.ts, zcode.ts) 문제가 아니라 카탈로그 enrich 쪽임을 보여 준다. types.ts/config.ts 쪼개기 캠페인과도 무관해서 close-don't-rebase 대상이 아니다.

    src/providers/derive.ts enrichProviderFromRegistry early-return - 이름 매칭 실패 시 destination으로 summary·tier·verbosity만 채우고 modelReasoningEfforts(및 같은 클래스의 per-model fill)는 건너뛴다. 리포터가 제안한 fill-missing이 바로 여기다.
    src/providers/derive.ts enrichReasoningSummariesByDestination - 주석이 “summary만”이라고 못 박혀 있다. effort map을 여기로 넓힐지, early-return에서 destination seed를 직접 fill할지 결정이 필요하다. 넓히면 #1100 계열 이름 변경 프리셋 전부에 영향이 간다.
    src/providers/registry.ts commandcode / command-code 두 엔트리 - 둘 다 COMMAND_CODE_MODEL_REASONING_EFFORTS를 들고 있다. destination 매칭은 key+고정 URL만 되므로 OAuth command-code 이름 변경은 이 경로로 안 잡힌다. 이번 스코프를 key preset만으로 둘지 명시해야 한다.
    경로 신규 live 모델 - 테이블에 없는 id는 공식 id에서도 reasoningEfforts: [] 정책으로 picker를 안 연다. 이름 변경 수정과 행 추가는 분리 유지(이슈 본문 권고와 동일). stem bridge(v4-flash→v4.1-flash)는 하지 말 것.
    경로 테스트 - 이름이 CommandCode이고 baseUrl이 provider/v1인 fixture로 enrichProviderFromRegistry 후 deepseek/deepseek-v4-flash에 high,max가 붙는지, 운영자 overlay 키는 덮어쓰지 않는지 회귀가 필요하다.

    메인테이너의 판단이 필요한 지점

    • destination fallback에 effort map만 추가할지, input modalities·context windows 등 이름 매칭 분기의 per-model fill까지 같이 옮길지.
    • 이번 픽스를 Command Code key preset만으로 좁힐지, registryEntryForProviderDestination이 잡는 모든 key 프리셋에 일반화할지.
    • OAuth 쪽 이름 변경(command-code ≠ 설정 키)도 같은 구멍인지 별도 이슈로 둘지.
    • help wanted로 열어 둘지, 메인테이너가 작은 derive.ts PR로 바로 닫을지.

    너의 추천
    이슈를 열어 두고 작은 픽스 PR을 받는다. enrichProviderFromRegistry 이름 실패 분기에서 registryEntryForProviderDestination(prov)가 modelReasoningEfforts를 갖고 있으면 fillRecordOfArrays로 fill-missing만 한다(운영자 키 우선). stem bridge는 넣지 말고, CommandCode+provider/v1 fixture 테스트를 같이 붙인다. #4253/#4282와 중복이 아니니 close하지 말고, 일반화 범위(Command Code only vs 모든 destination key preset)만 PR 설명에 한 줄로 못 박으면 된다.

    이 댓글은 grok-bot이 작성했습니다

  3. lidge-jun commented on Sep 13, 2026

    @lidge-jun
    Owner

    Resolved on dev by #4370, landed today as part of a 36-pull-request batch.

    enrichReasoningMetadataByDestination in src/providers/derive.ts fill-merges the destination's modelReasoningEfforts, so a renamed Command Code key row inherits COMMAND_CODE_MODEL_REASONING_EFFORTS instead of losing it.

    #4370 linked this as a reference, but the destination fill and the CommandCode export coverage are the fix this issue asked for.

    Verified against origin/dev at 72601a173 after the batch landed, rather than from the pull request description. Closing on that evidence; reopen if the behavior does not match on your setup.

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