Skip to content

[Bug]: Manual OpenAI model duplicates the native dashboard row and cannot be toggled #3650

Closed

Description

@robin-bially

Client or integration

OpenCodex dashboard

Area

Catalog / models

Summary

Adding a manual model to the canonical OpenAI provider leaves the original bare dashboard row visible beside the routed custom row with the same provider/model ID. The manual row cannot be enabled or disabled: the Models page sends a routed target while the visibility endpoint requires every OpenAI target to be native.

Expected: the manual row replaces the matching bare row in the dashboard, retains its existing openai/<model> selector, and supports visibility changes. Removing the manual row restores the native dashboard row. Account-qualified routes and account entitlement checks should remain unchanged.

Reproduction

  1. Configure the canonical OpenAI Codex-login provider.
  2. Add gpt-5.5 as a manual model from the Models page.
  3. Observe both gpt-5.5 and openai/gpt-5.5 for the same provider/model ID.
  4. Toggle the manual row. PUT /api/model-visibility with provider: openai, target id: gpt-5.5, native: false returns HTTP 400.
  5. The same provider/model override on an ordinary routed provider replaces the discovered row correctly.

Reproduced with an isolated configuration through the actual management row loader and API handler.

Version

Observed in 2.42.0; reproduced in source at 917d5dc and current dev 45f3bed.

Operating system

macOS, Bun 1.3.14; the failure is a platform-independent identity/validation mismatch.

Provider and model

OpenAI (Codex login), gpt-5.5

Logs or error output

HTTP 400
{"error":"invalid model visibility target"}

Screenshots and supporting files

A focused regression will accompany the fix, including replacement, removal/restoration, mixed native/custom visibility targets, and rejection of unconfigured routed OpenAI targets.

Redacted configuration

{"providers":{"openai":{"adapter":"openai-responses","authMode":"forward","baseUrl":"https://chatgpt.com/backend-api/codex","liveModels":false}},"customModels":[{"id":"example-custom","provider":"openai","modelId":"gpt-5.5","contextWindow":128000}]}

Checks

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

Activity

  1. added
    bug
    catalog
    gui
    on Sep 5, 2026
  2. lidge-jun commented on Sep 5, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 66 / 80

    지금 dev(HEAD 09335d7d4, 패키지 2.43.0)에서는 OpenAI Codex 로그인 제공자에 수동 모델(customModels)을 넣으면 Models 대시보드에 같은 provider/model ID의 줄이 두 줄 생깁니다. 하나는 네이티브 맨줄(gpt-5.5처럼 bare id), 다른 하나는 라우티드 커스텀 줄(openai/gpt-5.5)입니다. 다른 보통 라우티드 제공자에서는 커스텀이 같은 슬러그를 대체하는데, OpenAI만 네이티브 목록과 커스텀 목록이 나란히 남습니다.

    더 나쁜 쪽은 켜기/끄기입니다. GUI가 수동 줄을 토글할 때 PUT /api/model-visibility에 provider: openai, native: false, id: gpt-5.5를 보냅니다. 그런데 서버 검증은 “openai면 반드시 native여야 한다”는 규칙을 써서, 라우티드(수동) OpenAI 타깃을 전부 invalid model visibility target(HTTP 400)으로 거절합니다. 그래서 수동 줄은 보이고, 대체도 안 되고, 켜고 끌 수도 없습니다. 계정 한정 네이티브 줄(selector/slug)과 권한(entitlement) 게이트는 이 버그와 별개로 그대로 두는 게 맞습니다.

    재현 요약은 이슈에 적힌 그대로입니다. 캐노니컬 OpenAI에 gpt-5.5 수동 모델을 추가하면 중복 행이 생기고, 수동 행 토글이 400을 냅니다. 보고된 재현 SHA(45f3bed84)와 현재 HEAD 사이의 관련 검증 로직은 그대로입니다. 고치려면 (1) 같은 provider+modelId 수동 행이 bare 네이티브 행을 대체하고, (2) 그 수동 모델에 한해 native: false 가시성 타깃을 허용하며, (3) 수동 행을 지우면 bare 네이티브를 복원하면 됩니다. 이미 같은 작성자의 초안 수정 PR이 #3653으로 열려 있습니다.

    src/server/management/model-routes.ts 약 569–571행 근처 - (provider === "openai") !== native 때문에 openai+native:false 타깃이 무조건 400이 됩니다. 수동 customModels에 같은 modelId가 있을 때는 예외가 필요합니다.
    src/server/management/model-rows.ts - 네이티브 배열과 visibleCustomModels를 같이 붙이면서, OpenAI bare id가 커스텀 네임스페이스(openai/<id>)와 겹쳐도 네이티브 줄을 걸러 내지 않습니다. 그래서 중복 행이 남습니다.
    gui/src/models-groups.ts - 수동 행만 남으면 nativeProviderGroup이 false가 되어 OpenAI 카드의 네이티브 컨트롤이 사라질 수 있습니다. 수정 시 forward auth OpenAI는 카드 정체성을 유지해야 합니다.

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

    • 수동 OpenAI 행의 라우팅 정체성을 계속 openai/<model>로 둘지, bare native와 완전히 합칠지
    • 계정 한정 네이티브 행(account/slug)은 항상 별도 행으로 둘지(이슈 기대와 #3653은 별도 유지)
    • #3653을 이 이슈의 정식 수정으로 묶을지, 다른 유지보수 열차에 실을지

    너의 추천
    #3653이 draft를 벗고 CI·리뷰 준비를 마치면 그 PR로 닫으세요. 지금은 이슈를 열린 채로 두고, 중복 수정 PR은 받지 마세요. types/config 대형 분리와는 무관해서 닫을 이유가 없습니다.

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

  3. lidge-jun commented on Sep 5, 2026

    @lidge-jun
    Owner

    Fixed on dev by #3685 (carry of #3653), merge 9115b17. Manual OpenAI rows replace the matching bare native row, remain independently toggleable, and retain account-qualified native rows. Exact-head Cross-platform CI 33978686258 passed; mixed-group/export regressions and isolated browser verification passed.

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

    bugcataloggui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions