Skip to content

fix(provider): respect attachment image capability - #41527

Open
manuelfedele wants to merge 2 commits into
anomalyco:devfrom
manuelfedele:cmd-paste
Open

fix(provider): respect attachment image capability#41527
manuelfedele wants to merge 2 commits into
anomalyco:devfrom
manuelfedele:cmd-paste

Conversation

@manuelfedele

@manuelfedele manuelfedele commented Aug 10, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #33542

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Custom provider models configured with attachment: true were still marked as not accepting image input unless modalities was also provided. OpenCode then replaced the image with an error before building the provider request.

This preserves the existing precedence: explicit modalities.input wins, then discovered model metadata, then attachment: true enables image input for custom model configuration.

How did you verify your code works?

  • bun test test/provider/provider.test.ts --timeout 30000 from packages/opencode
  • bun typecheck from packages/opencode
  • bun test test/config.test.tsx --timeout 30000 from packages/tui
  • TURBO_CONCURRENCY=1 bun typecheck from the repository root
  • The pre-push hook passed with TURBO_CONCURRENCY=1

Screenshots / recordings

N/A. This is a provider capability fix with no visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@manuelfedele manuelfedele changed the title fix(tui): support Cmd+V image paste fix(provider): respect attachment image capability Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ttachment: true in custom provider model config has no effect - image upload blocked with 'does not support image input'

1 participant