Skip to content

[Bug]: Claude Code /model renders the OCX alias instead of the display name #6926

Closed

Description

@vibewriter-hand

Summary

Claude Code's /model list renders the opaque OpenCodex alias id for a native OpenAI route instead of the injected human-readable display name.

Evidence

The Herdr investigation in section 3 of 189_hns_herdr_chat/1_report.md recorded:

  • OpenCodex creates native Claude ids such as ocx-claude-native--gpt-6.1-sol.
  • The local catalog row has the display name gpt-sol6.1.
  • The Claude picker injection carries separate model, name, and description fields.
  • Claude's /model surface showed the opaque alias id, so the visible label does not use the injected display name.

The alias is correct for routing and persistence. The problem is the presentation field used by Claude Code.

Expected behavior

Keep the reversible alias in the machine-facing id and routing field, but render the injected catalog display name in the /model list.

Reproduction

  1. Start Claude Code through ocx claude with a native OpenAI route such as gpt-6.1-sol.
  2. Open /model.
  3. Observe ocx-claude-native--gpt-6.1-sol in the visible row.
  4. Expected: gpt-sol6.1 (or the injected name) while selection still submits the opaque alias id.

Scope

This report is about Claude Code's rendering of the injected catalog row. It does not request changing the alias format or the routing id.

Checks

  • I searched existing issues for Claude model alias and display-name problems.
  • I removed secrets, tokens, account details, and personal data.

Activity

  1. added
    bugSomething isn't working
    cliCLI, config inject, packaging flags
    on Oct 11, 2026
  2. Ingwannu commented on Oct 11, 2026

    @Ingwannu
    Owner

    The routing/presentation split in this report is important: please keep the reversible alias as the submitted model ID. Changing that ID to the friendly label would break saved selections and inbound resolution rather than fix the picker.

    I checked current dev 9b6f4b2632492b3df637dccc009d6a01ed47c85d. There are two distinct CLI catalog paths, so the { model, name, description } evidence alone does not identify which one rendered this row:

    • The gateway discovery/cache path uses /v1/models?ids=cli, readable ocx-claude-* IDs and a separate display_name (src/claude/model-info.ts, src/claude/gateway-cache.ts). Native discovery currently constructs ${slug} (native); it does not establish that a separate catalog nickname such as gpt-sol6.1 is carried through this path.
    • The first-party CLI intercept uses the cc model selector and /api/claude_cli/bootstrap. buildCliPickerModels uses resolvable Desktop registry aliases with profile labels; injectCliBootstrapOptions writes independent model, name and description fields (src/claude/intercept/picker-models.ts:80, cli-catalog.ts:72). Existing tests assert that serialized shape, not Claude Code's actual rendered label. A passing injector test therefore would not resolve this report.

    Could you add the exact Claude Code and OpenCodex versions, whether this was proxy/gateway mode or first-party intercept, and one redacted affected catalog row from the path actually consumed, plus a cropped /model screenshot? Please omit credentials, organization/account identifiers, full bootstrap payloads and private endpoints. A short excerpt from the referenced report is enough; no access to its working directory is required.

    The follow-up should preserve selection/alias round-trip and cover the appropriate label field for that specific client path, followed by a real picker observation on the reported client version. I have not launched a native client, changed live caches/configuration, or claimed a rendering reproduction. Keeping this open while we distinguish the discovery-label projection from client-side rendering avoids fixing the wrong surface.

  3. vibewriter-hand commented on Oct 11, 2026

    @vibewriter-hand
    ContributorAuthor

    Thanks. Confirmed versions: Claude Code 2.1.296 (claude --version) and OpenCodex 2.81.0 (ocx --version). This is gateway mode: ANTHROPIC_BASE_URL points to the local OCX and CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1; there is no first-party intercept.

    Measured /v1/models?ids=cli row (redacted to the relevant fields):

    {"id":"ocx-claude-native--gpt-6.1-sol","display_name":"gpt-6.1-sol (native)"}

    The alias remains the submitted model ID for round-trip resolution. I will change only the label field. A cropped /model screenshot follows; I cannot upload the author's local screenshot through gh from this environment.

  4. Ingwannu commented on Oct 11, 2026

    @Ingwannu
    Owner

    Thanks; this identifies gateway discovery on Claude Code 2.1.296 / OCX 2.81.0, not first-party cc/bootstrap injection. The measured /v1/models?ids=cli row already carries a non-alias display_name, while its id correctly remains the reversible routing selector.

    That narrows the remaining question to the gateway cache/rendering path. It does not establish that changing the first-party {model,name,description} serializer, or renaming the submitted ID, would fix this case. Please keep the alias unchanged. If you prepare the label-only change, a focused PR identifying the exact field/consumer is welcome; please include the cropped picker evidence when available and preserve selection round-trip in its regression coverage.

    If the client still shows the alias after a fresh discovery, compare only the affected cached row's id/display_name fields locally with the row above; do not publish the whole cache, base URL, account data or session files. That distinguishes a stale/missing cached label from the renderer ignoring a correctly cached one. I have not launched Claude or modified its live cache, and do not yet claim a client-rendering reproduction or fix. This remains open.

  5. vibewriter-hand commented on Oct 11, 2026

    @vibewriter-hand
    ContributorAuthor

    Measured locally with OpenCodex 2.81.0 in gateway mode.

    • Gateway discovery path: /v1/models?ids=cli
    • Redacted affected catalog row:
    {"id":"ocx-claude-native--gpt-6.1-sol","display_name":"gpt-6.1-sol (native)"}

    The submitted alias remains the reversible model id for selection round-trip. The user-facing label is carried by display_name. I will keep the alias unchanged and limit any follow-up to the gateway cache/label field that consumes this row, with regression coverage for id preservation. I will compare only the cached row's id and display_name fields and will not publish cache, endpoint, account, or session data.

  6. lidge-jun commented on Oct 11, 2026

    @lidge-jun
    Owner

    #6950 (7d78598) pairs each alias tier slot OpenCodex writes with its ANTHROPIC_DEFAULT__MODEL_NAME label (launch env, launchd and the shell file), so Claude Code's /model tier row shows the readable name. This issue stays open until someone confirms the label on a real /model picker.

  7. lidge-jun commented on Oct 12, 2026

    @lidge-jun
    Owner

    Confirmed on a real /model picker, which was the condition left on this issue after #6950 (7d78598).

    Setup: Claude Code 2.1.288 (~/.local/share/claude/versions/2.1.288), an isolated CLAUDE_CONFIG_DIR, a dummy unreachable ANTHROPIC_BASE_URL, and the two slot variables OpenCodex now writes together:

    ANTHROPIC_DEFAULT_OPUS_MODEL=ocx-claude-native--gpt-6.1-sol
    ANTHROPIC_DEFAULT_OPUS_MODEL_NAME=gpt-6.1-sol (native)
    

    /model rendered the Opus tier row as:

    2. gpt-6.1-sol (native)   Custom Opus model
    

    so the tier row now shows the readable name instead of the alias. The shipped 2.1.288 binary reads ANTHROPIC_DEFAULT_{OPUS,SONNET,FABLE,HAIKU}_MODEL_NAME, matching the four slots #6950 labels.

    One residual, outside what an env label can change: Claude Code's own "Default (recommended)" description and the session header still print the resolved model id (currently ocx-claude-native--gpt-6.1-sol[1m]). Those strings come from Claude Code's model id, not from a label slot. If that line matters to you, please open a new issue so it can be tracked separately.

    Closing as fixed by #6950 on dev.

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 workingcliCLI, config inject, packaging flags

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions