Skip to content

[Bug] Dashboard cannot save Gemini web-search sidecar; selection reverts to Luna #2457

Closed

Description

@jaychou0642-create

Client or integration

OpenCodex Dashboard / Codex App

Area

Dashboard · Proxy and routing · Web-search sidecar

Summary

On OpenCodex 2.31.0, selecting Gemini 3.7 Flash as the web-search sidecar in the Dashboard does not persist when the current sidecar backend is OpenAI (or unset). The save request is rejected with HTTP 400, and after the UI refreshes the picker returns to the default gpt-5.6-luna.

Writing the same pair directly to ~/.opencodex/config.json works, and the runtime successfully uses the Gemini sidecar:

"webSearchSidecar": {
  "backend": "gemini",
  "model": "gemini-3.7-flash"
}

This appears to be limited to the Dashboard management write validation, not the Gemini executor.

Version

2.31.0 (current npm latest)

Operating system

macOS 26.6.2 (Build 25G83)

Reproduction

  1. Start with webSearchSidecar unset or configured as:
    {
      "backend": "openai",
      "model": "gpt-5.6-luna"
    }
  2. Open the OpenCodex Dashboard.
  3. In the web-search sidecar picker, select Gemini / gemini-3.7-flash.
  4. Save the setting.
  5. Observe that the request is rejected with HTTP 400 and the picker returns to gpt-5.6-luna.

Expected behavior

The Dashboard should persist the offered backend/model pair:

{
  "backend": "gemini",
  "model": "gemini-3.7-flash"
}

The same should work for every backend included in the web-search backend union.

Actual behavior

The backend is effectively validated as openai, so gemini-3.7-flash is rejected as an invalid OpenAI web-search model. The configuration is not written and the UI reloads the previous/default Luna selection.

Suspected root cause

Both management write routes still special-case only openai and anthropic when resolving the effective backend.

In src/server/management/config-routes.ts, the body.webSearch.backend resolver behaves approximately as follows:

const effectiveBackend = body.webSearch.backend === "anthropic"
  ? "anthropic"
  : body.webSearch.backend === "openai" || body.webSearch.backend === null
    ? "openai"
    : config.webSearchSidecar?.backend ?? "openai";

Therefore, a submitted backend: "gemini" is ignored during pair validation and falls back to the currently stored backend, commonly openai.

The equivalent resolver in src/server/management/agent-settings-routes.ts has the same openai/anthropic-only branching.

A possible fix is to preserve any submitted value accepted by WEB_SEARCH_BACKENDS_UNION / allowedBackends before validating the backend/model pair, and to add regression tests for switching from OpenAI/Luna to Gemini/Gemini 3.7 Flash through both PUT routes.

Workaround

Directly edit ~/.opencodex/config.json and set the Gemini pair. No source modification is required. Avoid changing the web-search picker again until the management write route is fixed.

Related work

Checks

Activity

  1. added
    bugSomething isn't working
    guiDashboard, tray, settings UI
    toolstool_calls, MCP, web-search / sidecar tools
    on Aug 23, 2026
  2. github-actions commented on Aug 23, 2026

    @github-actions
    Contributor

    Issue reopened

    The report now contains the information required by the automated check. Thanks for updating it.

  3. lidge-jun commented on Aug 23, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 58 / 80

    설명: 이 이슈는 대시보드에서 웹 검색 사이드카를 제미니 3.7 플래시로 고르면 저장이 400 으로 거절되고, 고르기가 루나로 돌아간다고 한다. 같은 쌍을 설정 파일에 직접 쓰면 런타임은 제미니 사이드카를 쓴다. 작성자는 엔피엠 최신 2.31.0 맥에서 재현했다. 품질 봇이 한 번 닫았다가 다시 열었다. 지금 CURRENT dev HEAD 는 35a89903c 이다. 이번 시간에 origin/dev 는 6b0f61f64 에서 여기로 왔다. 새 머지는 2454 와 2456 이다. package.json 은 2.27.0 이다. src/config.ts 는 3238줄이다. src/runtime 폴더는 지금 HEAD 에 없다. 내가 HEAD 를 열어 보니 작성자가 적은 분기와 같다.

    살아 있는 재현은 이렇다. 웹 검색이 비어 있거나 오픈에이아이와 루나로 되어 있다. 대시보드 고르기에서 제미니와 gemini-3.7-flash 를 고른다. 저장을 누르면 관리 쓰기가 400 이다. 화면이 새로 고쳐지며 루나로 돌아간다. 기대는 유니온에 있는 백엔드와 모델 쌍이 그대로 저장되는 것이다. 우회는 설정 파일을 직접 고치는 것이다. 실행기는 살아 있다. 깨진 것은 관리 쓰기 검사다.

    지금 HEAD 의 src/server/management/config-routes.ts 591줄 유니온은 openai, anthropic, xai, gemini, exa 다. 백엔드 글자 검사는 제미니를 받는다. 그런데 666줄 쌍 검사는 백엔드가 앤트로픽이면 앤트로픽, 오픈에이아이이거나 널이면 오픈에이아이, 그 밖이면 지금 저장된 백엔드, 없으면 오픈에이아이다. 지금 저장이 오픈에이아이이거나 비어 있으면, 제출한 제미니는 쌍 검사에서 오픈에이아이가 된다. gemini-3.7-flash 는 오픈에이아이 후보가 아니라서 400 이다. 백엔드를 넣는 일은 687줄 뒤에 있다. 거절이 먼저라서 제미니는 저장되지 않는다. src/server/management/agent-settings-routes.ts 1081줄 허용 목록도 제미니가 있다. 1121줄 쌍 검사는 같은 오픈에이아이와 앤트로픽만 본다.

    src/web-search/backends.ts 70줄에 제미니 실행기가 있다. 안티그래비티 로그인이 살아 있으면 구글 안티그래비티 후보를 받는다. src/server/management/web-search-sidecar-options.ts 91줄 멤버십 게이트는 그 백엔드와 그 아이디가 같이 맞을 때만 통과다. 백엔드를 오픈에이아이로 바꿔 읽으면 제미니 모델은 항상 거절된다. tests/web-search-backend-union.test.ts 는 백엔드 xai 만 저장되는지 잠근다. 오픈에이아이 루나에서 제미니 플래시로 바꾸는 시험은 없다. 그래서 구멍이 고정되어 있다. 2188 유니온은 이미 dev 다. 이 이슈는 그 유니온을 쌍 검사가 따라가지 못한 것이다. 파일 직접 쓰기는 관리 게이트를 건너뛰도록 되어 있다. 그 우회는 맞다. 대시보드 길을 고치는 편이 맞다.

    사용자 길이로는 고르기에 있는 제미니 쌍을 대시보드가 거절해서 58. 실행기는 산다. 카탈로그 팁은 Ox Alpha x-preview-f-free + deepseek-v4-flash-vision-exp. Cursor 정적 카탈로그는 opus-4-8-fast / opus-5-fast. 2334 CursorCredentialRouter 는 여전히 src/providers/cursor-pool.ts 모듈+테스트만 있고 어댑터에 연결되지 않았다. 2332 H2 는 discovery 전용. 2320 overflow + 2342 는 이미 dev. 2188 사이드카는 이미 dev. 2361 __omit__ 는 이미 HEAD 다. 이번 시간 2454 가 착지해서 콤보 할당량 화면이 HEAD 에 있다. 오너가 1702 를 2454 로 닫았다. 2458 동영상 502 와 길이 다르다. src/lib/bounded-body.ts 128줄 취소 없는 던짐과 2426 나가는 크기 가드는 그대로다. 2451 wait 허용 목록은 아직 하이픈이다.

    src/server/management/config-routes.ts 라인 591 - 유니온에 제미니가 있다. 글자 검사는 통과한다
    src/server/management/config-routes.ts 라인 668 - 쌍 검사는 오픈에이아이와 앤트로픽만 본다. 제미니는 저장된 오픈에이아이가 된다
    src/server/management/config-routes.ts 라인 687 - 백엔드를 넣는 일은 거절 뒤에 있다. 제미니는 저장되지 않는다
    src/server/management/agent-settings-routes.ts 라인 1121 - 클로드 코드 덮어쓰기도 같은 분기다
    src/server/management/web-search-sidecar-options.ts 라인 91 - 멤버십은 백엔드와 아이디가 같이 맞아야 한다
    tests/web-search-backend-union.test.ts - 루나에서 제미니 플래시로 바꾸는 시험이 없다

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

    • 제출한 유니온 백엔드를 쌍 검사에 그대로 넣을지. 넣는 편이 맞다. 저장된 오픈에이아이로 바꾸지 말 것
    • 엑스에이아이와 엑사도 같은 구멍인지. 모델 없이 백엔드만 바꾸면 시험이 통과한다. 모델과 같이 바꾸면 막힐 수 있다. 유니온 전체를 잠근다
    • 2188 을 다시 열지 말 것. 유니온은 이미 있다. 이번은 쓰기 검사가 따라가지 못한 것이다
    • 2458 동영상 가드와 한 기차에 섞지 말 것

    너의 추천
    이슈는 열어 둔다. 두 관리 쓰기에서 제출한 유니온 백엔드를 쌍 검사에 그대로 넣는다. 루나에서 제미니 플래시로 바꾸는 시험을 두 길에 넣는다. 실행기와 파일 직접 쓰기는 건드리지 말 것. 2188 과 2458 과 2451 은 닫지 않는다. 호출 길을 넓히지 말 것. 라벨은 그대로 둔다. 프리뷰 배포가 아니다.

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

  4. lidge-jun commented on Aug 25, 2026

    @lidge-jun
    Owner

    Landed via #2514 at 3be3e55

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 workingguiDashboard, tray, settings UIlanded-via-maintainerOriginal PR closed after landing via a maintainer merge traintoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions