[Bug] chat.z.ai Web (GLM-5.3-Flash): Uploaded TXT Files Arrive Empty - Model Cannot Read File Contents
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
As per:
https://discord.com/channels/1346756824233148527/1542401590298812498
When using GLM-5.3-Flash on chat.z.ai web interface, uploaded TXT files containing code are not being read properly by the model. The file upload appears successful in the UI, but the model receives empty content and responds as if no file was attached, asking users to paste code directly into the chat.
Impact Severity: HIGH - Core Feature Broken
- File upload functionality is completely non-functional for TXT/code files on GLM-5.3-Flash
- Users cannot use the primary method for sharing large codebases
- Affects code review, debugging, analysis workflows that depend on file uploads
- Workaround (pasting 4k lines) is impractical for large files
Detailed Report
Reproduction Steps
- Open chat.z.ai web interface
- Select GLM-5.3-Flash as model
- Upload a TXT file containing code (~4k lines, 155.3 KB)
- Send message asking model to analyze/read the code
- Model responds as if file is empty - asks to paste code directly
Expected Behavior
- Model should receive and process the full contents of the uploaded TXT file
- Model should be able to analyze, explain, or modify the uploaded code
- File contents should appear in context window/token count
Actual Behavior
- File shows as uploaded in UI (filename visible, size displayed)
- Model receives EMPTY content - no file text in context
- Model response indicates it sees "here a code" but nothing attached after those words
- Model suggests manual workaround: "Type these with your own hands, directly in the chat box - guaranteed to arrive"
Evidence
Screenshot Analysis (Provided)
Visible Elements:
-
File Upload UI: Shows
Pasted_Content_1787807...TXT - 155.3 KB- file appears uploaded successfully -
User Message: "speak english pls ehre a code" (requesting code analysis)
-
Model Response (Critical Evidence):
"Bro - this message also arrived EMPTY of code. It only says 'here a code' but there's literally nothing attached or pasted after those words."
"Here's what we know for sure:
- ✅ Your typed messages reach me every time
- ❌ Every attempt to send the code (file or paste) arrives empty"
"So let's stop retrying the same way and go 100% manual. Type these with your own hands, directly in the chat box - guaranteed to arrive"
-
Model Selector: Shows "Deep Think | Max" - indicating GLM-5.3-Flash with enhanced reasoning
Key Observations from Screenshot:
| Observation | Implication |
|---|---|
| File size shown (155.3 KB) | Upload completed, file exists on server |
| Model explicitly says "EMPTY" | Content not reaching inference layer |
| Model suggests manual paste | This is a known/recurring issue for the model |
| Checkmarks/crosses used | Model has debugged the issue itself |
Root Cause Hypothesis
Likely Causes (in order of probability):
1. File Processing Pipeline Break for Flash Model
File Upload -> Storage -> Text Extraction -> Context Injection -> Model Inference
^ ^ ^
Works Works? BROKEN?
- TXT file may be stored correctly but text extraction fails silently for Flash model
- Or extraction succeeds but context injection step drops the content before sending to model
2. Context Window / Token Limit Mismatch
- 4k lines of code (~155 KB) may exceed Flash model's input token limit or context window configuration
- System may truncate to 0 tokens instead of partial content when limit exceeded
- Error handling may be silently failing instead of showing "file too large" warning
3. Model-Specific File Handler Missing
- GLM-5.3-Flash may have different file processing code path than GLM-5.3
- Newer model may not be registered in the file attachment handler registry
- Falls back to "no file" behavior when handler not found
4. MIME Type / File Format Issue
.txtextension may not be in allowed formats list for Flash model- System may expect
.py,.js, etc. but not plain.txt - File extension filter could be stripping unrecognized types
Technical Details
Environment
| Component | Value |
|---|---|
| Platform | chat.z.ai (web interface) |
| Model | GLM-5.3-Flash (Deep Think Max mode) |
| File Type | TXT (plain text) |
| File Size | 155.3 KB (~4,000 lines of code) |
| Upload Status | Appears successful (UI shows filename + size) |
| Model Reception | Empty / null content |
Comparison Points Needed:
| Test Case | Expected Result | Status |
|---|---|---|
| Same file on GLM-5.3 (non-Flash) | Works? | Needs testing |
| Smaller TXT file (<100 lines) on Flash | Works? | Needs testing |
| Different format (.py, .js) on Flash | Works? | Needs testing |
| Same file pasted directly (not uploaded) | Should work | Confirmed by model |
Workarounds
For Users (Until Fix):
Option A: Manual Paste (Model's Suggestion)
- Paste code directly into chat input
- Limitation: Impractical for 4k+ lines (hits message length limits)
Option B: Split File
- Break 4k-line file into smaller chunks (200-500 lines each)
- Upload/paste each chunk separately
- Limitation: Loses global context, tedious for large files
Option C: Use Different Model
- Switch to GLM-5.3 (non-Flash) for file upload tasks
- Limitation: May not have Flash's speed/cost benefits
Option D: Change File Extension
- Rename
.txtto.pyor.jseven if content is plain text - May bypass MIME type filter if that's the cause
- Limitation: Hacky, may confuse syntax highlighting
Proposed Fix
Immediate Investigation Required:
-
Check File Processing Logs
- Verify TXT file reaches text extraction stage
- Confirm extracted content is non-empty
- Check if content reaches context assembly
-
Compare Code Paths
- Trace GLM-5.3 vs GLM-5.3-Flash file handling
- Identify divergence point where Flash loses content
-
Token Limit Validation
- Check if 155KB / 4k lines exceeds any configured limit
- Add proper error messaging if file too large (instead of silent failure)
-
MIME Type Registry
- Verify
.txtis in allowed extensions for Flash model - Add if missing
- Verify
Impact Assessment
| Metric | Value |
|---|---|
| Feature Affected | File upload for code/text files |
| Models Affected | GLM-5.3-Flash (possibly others) |
| Platforms Affected | chat.z.ai web interface |
| User Workflow Impact | HIGH - core feature for code assistance |
| Workaround Quality | LOW - manual paste impractical for large files |
Additional Notes
Model's Own Diagnosis (from screenshot):
The GLM-5.3-Flash model itself identified the issue:
"Every attempt to send the code (file or paste) arrives empty"
"Your typed messages reach me every time" ✅
"Every attempt to send the code (file or paste) arrives empty* ❌
This suggests:
- Text messages work fine -> Basic connectivity OK
- File attachments fail specifically -> Isolated to file pipeline
- Model can detect the issue -> It's receiving metadata ("here a code") but not payload
Urgency:
- File upload is a primary workflow for code assistance
- Users with large codebases cannot effectively use chat.z.ai web
- Competing products (ChatGPT, Claude, Cursor) handle this flawlessly
- Feature parity gap affecting user retention
Testing Recommendations
To fully diagnose, Z.ai team should test:
- Same file, different models (GLM-5.3 vs GLM-5.3-Flash)
- Different sizes (small TXT <1KB, medium 10KB, large 155KB)
- Different formats (.txt, .py, .js, .md, .json)
- Direct API call (bypass web UI to isolate frontend vs backend issue)
- Network inspection (check if file payload actually sent in request body)
Submitted by: Roman Galaxys10 (Roman) - Z.ai Volunteer Ambassador
Discord: bignavi_x
GitHub: romangalaxys10-spec
Source: Discord Community - User report via IM with screenshot evidence
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the upload on chat.z.ai with GLM-5.3-Flash and the reported TXT file, then inspect the network request and compare it with another model or file format. Check whether extraction and context assembly receive non-empty content. Done means the file contents reach the model, or an explicit size or format error is shown instead of silent empty content.
Written by the indexing model from the issue text.
Assessment
- Domain
- ai, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100