Skip to content

fix(catalog): sidecar-covered combo members keep image advertising - #4044

Draft
x3M3x wants to merge 1 commit into
lidge-jun:devfrom
x3M3x:codex/combo-sidecar-image-advertising
Draft

fix(catalog): sidecar-covered combo members keep image advertising#4044
x3M3x wants to merge 1 commit into
lidge-jun:devfrom
x3M3x:codex/combo-sidecar-image-advertising

Conversation

@x3M3x

@x3M3x x3M3x commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Combo models whose members are text-only but covered by the vision sidecar (for example a planners combo over no-vision DeepSeek members) collapsed to ["text"] in the Codex catalog, so Codex blocked pasting images client-side with "This model does not support image inputs" before the proxy could translate them.
  • Root cause: complete discovery rows reach resolveComboCatalogMember through the withFallbackMetadata identity fast path un-hinted, so the sidecar image advertising that fix(catalog): advertise image input for modalities-declared sidecar rows #3105 added for direct provider rows never reached derived combo members.
  • Fix: withFallbackMetadata now appends "image" to a member's modalities when the provider's vision sidecar covers that model — the same rule direct rows already get — so derived combo rows keep image support. imageInput: "disabled" still strips it, and providers without sidecar coverage keep byte-identical rows.

Verification

  • New regression test in tests/codex-integration/catalog-vision-sidecar-modalities.test.ts: a sidecar-covered discovery member gains ["text","image"], the derived combo keeps image, imageInput: "disabled" strips it, and an uncovered provider's row is identity-equal.
  • Focused consumer batches around the touched module: catalog/vision files 58+68 pass / 0 fail; provider/oauth/google batch 468 pass / 0 fail; serial e2e batch 193 pass / 1 pre-existing fail; bun run typecheck green.
  • Full local suite not completed on this host: the per-lane watchdog fired twice with the production proxy and Codex app running, and several unrelated failures (retained-root catalog lock wait, OrcaRouter real-callback, Kiro image buildRequest, OpenAI provider-option spine) reproduce identically on clean dev without this patch. The three-OS CI run is the gate for those lanes.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Bug Fixes
    • Vision-sidecar catalog entries now correctly advertise image input when their effective modalities do not include it.
    • Catalog-derived model metadata now preserves image-input settings and provider identity for covered and uncovered providers.

Complete discovery rows reach resolveComboCatalogMember un-hinted, so a text-only vision-sidecar consumer collapsed the whole combo to input_modalities text at derivation. The Codex app gates attachments client-side on input_modalities, so combos containing a no-vision member (e.g. planners with DeepSeek targets) blocked pasted images before the sidecar could run, even though the same member advertised image on its own provider row. Mirror the direct-row sidecar advertisement inside combo member resolution so derivation intersects the modalities the runtime actually serves.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@github-actions
github-actions Bot marked this pull request as draft September 8, 2026 15:43
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 50ccbb7d-ae71-49a4-9a3f-8ed5f59c7bc3

📥 Commits

Reviewing files that changed from the base of the PR and between 7dc7dc9 and 266df98.

📒 Files selected for processing (2)
  • src/codex/catalog/provider-fetch.ts
  • tests/codex-integration/catalog-vision-sidecar-modalities.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

resolveComboCatalogMember now adds image for vision-sidecar-covered members when effective modalities omit it. Tests verify combo derivation, disabled image input, and identity preservation for uncovered providers.

Changes

Vision-sidecar modality resolution

Layer / File(s) Summary
Resolve and validate sidecar image modalities
src/codex/catalog/provider-fetch.ts lines 1019–1031, 1041; tests/codex-integration/catalog-vision-sidecar-modalities.test.ts lines 2, 393–457
withFallbackMetadata evaluates modalities after fallback and adds image for vision-sidecar consumers when needed. Tests verify resolveComboCatalogMember, deriveComboCatalogModel, imageInput: "disabled", and identity preservation for uncovered providers.

Priority: ➖ Normal — Schedule the catalog modality fix because affected combo models can block image pasting before the proxy translates the request.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 266df

Combo models backed by a vision sidecar now advertise image input correctly, while explicitly disabled image input and uncovered providers retain their existing behavior. The change is covered by focused regression tests and has no remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: preserving image advertising for combo members covered by a vision sidecar. It matches the implementation and regression tests.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 71 / 80

이 PR은 Codex 카탈로그에서 콤보(combo) 멤버가 비전 사이드카(vision sidecar)로 이미지를 처리할 수 있는데도, 카탈로그에는 input_modalities가 텍스트만으로 남는 구멍을 막는다. 지금 dev HEAD는 7dc7dc99e(#4037 스택 기록 머지 뒤)이고, 직접 provider 행에 사이드카 image를 붙이는 규칙은 이미 #3105 / applyProviderConfigHints에 있다. 문제는 그 힌트가 콤보 멤버 해석까지는 안 가는 경우다.

흐름을 초등학생에게 설명하듯 풀면 이렇다. Codex 앱은 이미지를 붙이기 전에 카탈로그의 input_modalities를 보고, 목록에 image가 없으면 "This model does not support image inputs"로 클라이언트에서 막아 버린다. 프록시(사이드카)가 나중에 이미지를 텍스트로 바꿔 줄 기회가 있어도, 앱이 먼저 막으면 소용없다. planners처럼 DeepSeek 같은 no-vision 멤버가 들어 있는 콤보가 대표 사례다. 멤버 혼자 provider 행으로 보면 사이드카 덕분에 image가 붙는데, 콤보로 묶을 때는 교집합이 텍스트만 남아 붙이기가 막혔다.

코드 위치는 src/codex/catalog/provider-fetch.tsresolveComboCatalogMemberwithFallbackMetadata다. 완전한 discovery 행은 이미 context/메타가 채워져 있어서 applyProviderConfigHints를 타지 않고 이 헬퍼만 거친다. 그래서 #3105가 직접 행에 넣어 준 sidecar image 광고가 콤보 멤버에는 빠졌다. 이 PR은 isModelVisionSidecarConsumer(prov, member.id)가 참이면, fallback 반영 뒤 모달리티에 image가 없을 때 한 번 더 붙인다. 콤보 최종 행의 imageInput: "disabled"로 이미지를 빼는 규칙은 그대로 deriveComboCatalogModel(src/codex/catalog/aggregation.ts)에 있고, 테스트도 그걸 잠근다.

회귀 테스트 tests/codex-integration/catalog-vision-sidecar-modalities.test.ts는 (1) 사이드카로 덮인 discovery 멤버가 ["text","image"]가 되는지, (2) 그걸로 만든 planners 콤보가 image를 유지하는지, (3) imageInput: "disabled"면 다시 텍스트만인지, (4) 사이드카 없는 provider는 원본 객체 동일(identity)인지 네 가지를 본다. 지금 dev 방향(2.49.x 제품 팁·provider runtime 스택)과 충돌하지 않는 독립 카탈로그 버그픽스다. types.ts/config.ts 분할에 무효화되지도 않는다.

라인 쪽은 전체적으로 의도가 맞고 범위도 작다. 한 가지 읽을 때만 주의할 점은 spread 순서다. addModalities로 fallback 모달리티를 먼저 쓰고, 그다음 addSidecarImagemodalitiesAfterFallback 기준으로 image를 덧붙인다. 순서가 바뀌면 sidecar 광고가 덮일 수 있는데, 지금 패치는 올바른 순서다.

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

  • CI 전체 레인(특히 작성자가 말한 pre-existing fail 레인)이 초록인지, 이 패치와 무관한 실패로 게이트만 흐려지는지
  • #3863(combo capabilities 보존)과 겹치는 후속 작업이 있으면 머지 순서만 한 번 확인
  • noVisionModels / sidecar 설정이 없는 커스텀 provider에서 의도치 않게 image가 붙는지(테스트는 uncovered identity를 잠갔음)

너의 추천
CI hygiene·enforce-target은 이미 통과했다. CodeRabbit만 pending이다. 전체 CI가 이 변경과 무관한 실패만 남기면 머지 후보로 받아도 된다. 범위가 #3105의 콤보 경로 구멍 메우기라서, 따로 리베이스나 닫을 이유는 없다. 머지 후 leftover 이슈가 있으면 Landed via #4044 처리만 하면 된다.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants