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

Abierto Apto para principiantes
#13,895 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@definitelynotguru ya está trabajando en esto.

Desde el 20/11/2026.

  • #14155 de @definitelynotguru — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
data

Línea de trabajo

Empieza con providers/opencode-go/models/qwen4-max.toml y compara sus modalidades de entrada con models/alibaba/qwen4-max.toml, que, según indica el issue, enumera la compatibilidad con PDF. Añade application/pdf a las modalidades de entrada del modelo de Go y corrige el comentario que dice que PDF no aparece en la lista. La tarea está terminada cuando los metadatos declaren la entrada de PDF de forma coherente con el modelo base.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
7.8k
Forks
2.2k
Merge medio
7 h 1 min
PR fusionados (30 d)
794

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anomalyco/models.dev

Todos los issues de anomalyco/models.dev

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.