anomalyco / anomalyco/opencode

pdf not readable by Z.AI/GLM 5.3 Flash through OpenCode

Open
#49,028 3 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Sep 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

For the same PDF :

  • joined in a prompt to GLM 5.3 Flash on the web : no problem
  • joined in a prompt to GLM 5.3 Flash API through OpenCode 1.18.30, I get the message "Failed to parse the file. Please check its accessibility and format." (no problem if I join a PNG image);
  • same in OpenCode Web 1.18.30 : no problem

According to GLM analysis, that error happens with this PDF because it contains an image. I tested a PDF without image and it is accepted!

And GLM says : opencode retains failed attachments in the session history: once the is uploaded, all subsequent requests in the session fail, even with a valid file. That is why it never worked during initialization, whereas it did work in a fresh session. The skill wasn't the variable; the "poisoned" pdf was.

Once I got a message "Failed to parse..." then it is necessary to end the session as I always get the same message whatever the prompt

PDF Failed to parse.pdf
PDF Failed to parse - Libre office created.pdf

Finally what surprises me is that one pdf is correctly accepted by GLM API via OpenCode...

Plugins

No response

OpenCode version

1.18.30

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

LINUX MINT

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.