opencode-go: qwen4-max missing application/pdf input modality

オープン 初心者向け
#13,895 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@definitelynotguru がすでに取り組んでいます。

2026年11月20日 から。

  • #14155 @definitelynotguru による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
data

調査の方向性

まず providers/opencode-go/models/qwen4-max.toml を確認し、issue に PDF のサポートが記載されている models/alibaba/qwen4-max.toml と入力モダリティを比較してください。Go モデルの入力モダリティに application/pdf を追加し、PDF が記載されていないとするコメントを修正してください。メタデータで、ベースモデルと一貫して PDF 入力が宣言されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

The opencode-go/qwen4-max entry omits application/pdf from its input modalities, even though its base model (alibaba/qwen4-max) lists PDF input and the Go endpoint accepts PDF document blocks. Harnesses that rely on this metadata (e.g. OpenCode) therefore drop PDF attachments silently, making PDF input appear broken for this model.

Environment

  • opencode version: 2.3.0
  • OS: macOS (Darwin 25.6.0, arm64)
  • Terminal: xterm-256color (OpenCode desktop app; TERM_PROGRAM unset)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: none found in config

Reproduction

  1. Connect OpenCode Go and select opencode-go/qwen4-max in OpenCode.
  2. Attach a small PDF to a prompt (e.g. a one-page PDF containing the text "The secret code is BANANA-42.").
  3. Ask the model to read the attached PDF and report its contents, without using tools.

Expected Behavior

The PDF is sent to the model as document media and the model reads it. The base model entry models/alibaba/qwen4-max.toml lists application/pdf in [modalities].input, citing Alibaba's PDF understanding documentation.

Actual Behavior

OpenCode's attachment handling requires the selected model to declare PDF input; otherwise it "sends a short note in its place" (https://opencode.ai/docs/attachments/). Because providers/opencode-go/models/qwen4-max.toml lacks application/pdf, the PDF never reaches the model and it responds as if no document was attached. No error is surfaced.

Additional Context

  • Affected file: providers/opencode-go/models/qwen4-max.toml. Its comment says "Modalities: image and video input as the file already listed (not PDF); MIME types from the lab", but the lab file it references (base_model = "alibaba/qwen4-max") does include application/pdf.
  • Verified end-to-end on 2026-11-17: with a local OpenCode config override adding pdf to the model's capabilities.input, the same test PDF sent through https://opencode.ai/inference/go/anthropic/v1 (Anthropic Messages) was accepted, and the model correctly replied BANANA-42 (end_turn, ~8.4K input tokens). The endpoint supports PDF input; only the metadata omits it.
  • Suggested fix: add "application/pdf" to [modalities].input in providers/opencode-go/models/qwen4-max.toml and correct the comment.
  • Other Go models served through the same Messages translation may have the same omission; an audit of Go entries against their base models' PDF support would be worthwhile.
  • User-side workaround until fixed: override providers.opencode-go.models.qwen4-max.capabilities.input to ["text", "image", "video", "pdf"] in opencode.json.
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
7時間 1分
マージ済み PR(30日)
794

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/models.dev のほかの issue

anomalyco/models.dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。