Repository navigation
Description
Client or integration
Other (DeepSeek Harness, Droid, Raycast, Claude Code, OpenCode, Qoder)
Area
Catalog / models
Summary
There is a fundamental architectural disconnect in OpenCodex's core Combo system (src/codex/catalog/aggregation.ts):
When a combo combines both text-only models (e.g. DeepSeek V4.1 Flash) and vision-capable models (e.g. Gemini 3.8 Flash, Claude Sonnet) for failover/load-balancing, OpenCodex derives the combo's catalog metadata by taking a strict intersection of input modalities.
This causes the entire combo to be declared as input_modalities: ["text"], artificially stripping vision capability from all downstream client apps (DeepSeek Harness, Droid, Raycast, OpenCode, Qoder, Claude Code, etc.), even though OpenCodex's runtime proxy already supports multimodal failover perfectly.
Additionally, client ID "dsh" is omitted from the default target arrays in src/integrations/catalog-refresh.ts and src/cli/sync-command.ts.
Reproduction
- Configure a failover combo in
~/.opencodex/config.jsoncontaining a vision target and text-only targets (e.g.,google-antigravity/gemini-3.8-flash+river/deepseek-v4.1-flash). - Run
ocx sync. - Inspect the derived catalog or connect any client (e.g., DeepSeek Harness or Droid).
- Observe that the combo is marked with
input_modalities: ["text"]only. - In client UIs (e.g., DeepSeek Harness), trying to attach an image immediately blocks user submission with
"The current model does not support images; switch to a model that does". - Yet, sending the exact same image request directly to OpenCodex proxy (
/v1/chat/completions) succeeds with HTTP 200 OK because proxy failover correctly routes images to the vision target.
Root Cause
In src/codex/catalog/aggregation.ts (deriveComboCatalogModel):
const derivedInputModalities = intersectStrings(
members.map(member => member.inputModalities ?? ["text"]),
);
const inputModalities = combo.imageInput === "disabled"
? derivedInputModalities.filter(modality => modality !== "image")
: derivedInputModalities;Because intersectStrings requires 100% of member targets to declare image, any combo configured for speed with multimodal fallback has its image modality dropped completely.
In addition:
src/integrations/catalog-refresh.ts:15(clientIdsarray) andsrc/cli/sync-command.ts:175omit"dsh"from the auto-refresh targets.
Suggested Fix
- In
src/codex/catalog/aggregation.ts, ifcombo.imageInput !== "disabled"and any member target supportsimage, allow the combo to inherit theimagemodality:
const hasVisionMember = members.some(m => m.inputModalities?.includes("image"));
const derivedInputModalities = intersectStrings(
members.map(member => member.inputModalities ?? ["text"]),
);
let inputModalities = combo.imageInput === "disabled"
? derivedInputModalities.filter(modality => modality !== "image")
: derivedInputModalities;
if (combo.imageInput !== "disabled" && hasVisionMember && !inputModalities.includes("image")) {
inputModalities = [...inputModalities, "image"];
}- In
src/integrations/catalog-refresh.tsandsrc/cli/sync-command.ts, append"dsh"to the client ID refresh arrays.
Version
2.67.x
Operating system
macOS (Apple Silicon)
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
Ingwannu commentedon Nov 8, 2026
Checked against
dev(f8dfc2f). The strict intersection is the documented default, not a code bug:src/codex/catalog/aggregation.ts:75-79and:130-135implement the intersection.docs-site/src/content/docs/guides/combos.md, section "Image / multimodal capability", documents it: image is enabled only when every target advertises it.The documented way to get images through a mixed combo is the Vision Sidecar. The dashboard's Image / multimodal switch enrolls the text-only members by writing
inputModalities: ["text"]on them, so the sidecar describes images before the main call. Could you enable that switch on your combo and check whether the client still blocks the image? If it does, please send the redacted combo definition and the catalog row for the combo.Advertising image input whenever any target is text-only would let clients send images to a target that cannot accept them. The sidecar exists for that case, so changing the default is a design decision for the owner, not a bug fix.
On
dsh: it is missing from the refresh lists insrc/integrations/catalog-refresh.ts:15andsrc/cli/sync-command.ts:175, and it has never been in them, so this is not a regression. Whether DSH should be refreshed automatically is a separate decision, because DSH edits its profile patch under its own lock.oya254 commentedon Nov 8, 2026
Thank you for the quick triage and for clarifying the design rationale behind
intersectStringsand the Vision Sidecar!1. Vision Sidecar vs. Native Multimodal Failover
The Vision Sidecar is a great feature for enabling text-only targets to comprehend images via OCR / description preprocessing.
However, there is an important distinction between Sidecar Preprocessing and Native Multimodal Failover:
river/deepseek-v4.1-flash) and fallback targets are native vision models (e.g.,gemini-3.8-flashorclaude-sonnet), the intent for multimodal queries (like complex UI screenshots, diagram interpretation, or spatial reasoning) is often for the native vision model to evaluate the raw image tokens directly.2. Runtime Proxy Already Anticipates Multimodal Hops
What is notable about OpenCodex's design is that the runtime proxy engine already has explicit support for multimodal hopping!
In
src/combos/failover.ts(lines 862–867):And lines 489–492:
The runtime proxy already recognizes
unsupported_input_modalityas a request-local target incompatibility that hops to the next candidate without cooling the route. If an image request reaches the proxy, it handles it gracefully!3. The Core Issue: Client-Side Catalog Gatekeeping
The disconnect happens because client apps (DeepSeek Harness, Raycast, Droid, OpenCode, Claude Code, etc.) inspect the advertised catalog (
input_modalities) client-side before dispatching:aggregation.tstakes a strict intersection, the combo advertisesinput_modalities: ["text"]."The current model does not support images", aborting the request locally before it ever reaches OpenCodex.4. Proposed Backwards-Compatible Solution
To respect the existing design and avoid breaking users who rely on strict intersection, would you consider allowing an explicit opt-in on the combo configuration?
For example, extending
combo.imageInput:imageInput: "intersect"(default — keeps existing behavior / documentation intact)imageInput: "union"(or"native-failover"— advertisesimageif any target has vision, allowing client apps to send images and lettingfailover.ts:865hop to the vision target)imageInput: "disabled"(existing — explicitly drops vision)In
src/codex/catalog/aggregation.ts:This keeps the default 100% safe and adheres to the docs, while unlocking native multimodal failover for mixed combos without requiring the sidecar.
5. Regarding DSH & Profile Lock
Understood on the DSH profile lock considerations. DSH writes its profile patch under its own lock, so an unconditional file write in
catalog-refresh.tscould indeed risk lock contention.Perhaps a safe non-intrusive approach could be:
cordis.patch.yml, orocx integration client sync dsh).Happy to submit a clean PR for the
imageInput: "union"option if you are open to this design direction!fix(sync): refresh owned DeepSeek Harness catalogs (#8910)
lidge-jun commentedon Nov 19, 2026
Both halves have landed: #8910 (DeepSeek Harness catalog refresh, 270161a) and #8651 (union capability policy incl. vision, 51775ce).