Skip to content

[Bug]: GitHub Copilot provider: all models report text-only input — image attachments blocked #2941

Description

@DamnUi

Client or integration

Codex App

Area

Catalog / models

Summary

When using the github-copilot provider, every modeli s cataloged with inputModalities: ["text"], which makes Codex block image attachments with "This model does not support image inputs." This affects all 32+ vision-capable models (Claude Opus/Sonnet, GPT-4o/4.1/5.x, Gemini, Grok, etc.).

Expected: models that support vision should be cataloged with ["text", "image"] so users can attach images.

Root cause

Three compounding gaps in the github-copilot provider:

1. Copilot API uses a non-standard capabilities structure

GitHub Copilot's /models endpoint reports vision support in a nested format that OpenCodex does not parse:

{
  "id": "claude-opus-4.6",
  "capabilities": {
    "supports": { "vision": true },
    "limits": { "vision": { "max_prompt_images": 20 } }
  }
}

OpenCodex's modelInputModalities() function (in provider-fetch.ts) checks:

  • item.input_modalities / item.modalities — Copilot does not have these fields
  • capabilityRecord?.vision — but capabilityRecord is plainRecord(item.capabilities) which yields { supports: {...}, limits: {...} }, so .vision is undefined (it is nested under .supports)
  • capabilities array from modelCapabilities() — iterates capabilityFields looking for value === true, but supports is an object not true

Result: every path returns undefined, the fallback chain lands on ["text"], and Codex blocks images.

2. No modelInputModalities in the registry entry

The github-copilot entry in src/providers/registry.ts (line 2694) has no modelInputModalities field. Other major providers include one as a cold-start seed.

3. Not in PROVIDER_ALIASES

github-copilot is absent from PROVIDER_ALIASES in src/generated/model-metadata.ts. Providers like openrouter are aliased, so their models can fall back to the metadata database. Without an alias, this fallback is also dead.

Reproduction

  1. Install OpenCodex 2.33.0 and log in via the github-copilot provider
  2. Select any vision-capable model (e.g. claude-opus-4.6, gpt-4o, gpt-5.4)
  3. Try to attach/paste an image in the Codex App
  4. Codex blocks it with: "This model does not support image inputs"
  5. Compare: switch to the same model via openrouter provider — images work fine

Proposed fix

parse the nested Copilot structure

In modelInputModalities() in provider-fetch.ts, add a check for the nested capabilities.supports.vision structure:

const supports = plainRecord(capabilityRecord?.supports);
if (supports?.vision === true) return ["text", "image"];

This would automatically handle all current and future Copilot models.

or the eaiser way is to just

Add modelInputModalities to the github-copilot registry entry.

Version

2.33.0

OS

macOS 26.2 (arm64)

Provider and model

github-copilot / claude-opus-4.6 (affects all 32 vision-capable models on the Copilot API)

Checks

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

Activity

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 workingcatalogModel catalog, slugs, visibility, routed entries

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions