DeepSeek API Smoke Test

ask-deepseek v1.1 • deepseek-v4-pro • 1M context

3
Tests Passed
3
Tests Failed
2
Bugs Fixed

Test Results

Test File Size Lines Tokens Time Status Notes
sandbox-client.js ~400 KB 12,481 ~100k 6m 3s PASS 816 lines / 23KB response
codex-tui.log (10k) 1.6 MB 10,000 ~680k ~45s PASS Error categorization worked
codex-tui.log (12k) 2.1 MB 12,000 854,427 55s PASS 99.9% cache hit, full analysis
codex-tui.log (50k) 11 MB 50,000 4,195,364 - FAIL Token limit exceeded (4.2M > 1M)
codex-tui.log (100k) 23 MB 100,000 ~8M - FAIL HTTP 413 + token limit
codex-tui.log (full) 116 MB 454,891 ~36M - FAIL HTTP 413 payload too large

Discovered Limits

Model Context
1,048,576tokens
1M tokens max input
Max Output
384,000tokens
Per response limit
HTTP Payload
~20MB
nginx infrastructure limit
Practical Max
~2.5MB
~850k tokens safe zone
Token Ratio
0.38tok/byte
2.6 bytes per token

Token Math

11 MB file (50k lines) = 4,195,364 tokens
2.1 MB file (12k lines) = 854,427 tokens
Token density ~0.38 tokens/byte
Safe file size 1M tokens รท 0.38 โ‰ˆ 2.6 MB

Data Flow

๐Ÿ“„
Input File
Large source file
โ†’
๐Ÿ“
Temp File
Avoids arg limits
โ†’
๐Ÿ”ง
jq
Build JSON payload
โ†’
๐Ÿ“ฆ
Payload File
Avoids curl limits
โ†’
๐ŸŒ
curl POST
-d @payload.json
โ†’
๐Ÿค–
DeepSeek API
v4-pro / 1M ctx

Bugs Fixed

"Argument list too long" when passing large files
Fixed by writing content to temp file and using jq --rawfile instead of --arg
curl failing with large JSON payloads
Fixed by writing JSON to payload file and using curl -d @file instead of inline