Repository navigation
Attachment uploads to /v1/files? Is it intended, and can it be disabled or inlined? #12696
QuestionI run a self-hosted OpenAI/Anthropic-compatible gateway (CLIProxyAPI) and point DSH at it via The gateway answers 404 (it does not implement the Anthropic Files API), and DSH keeps retrying on subsequent file references — 570 times in one six-hour session. Nothing is broken for me — I intercept the path and answer locally now. I am asking because I could not work out which DSH surface sends it, and I would rather use the intended path than have DSH talk to an endpoint my backend will never serve. What I could and could not find
What I would like to know
Why it mattered (context, not a complaint)My gateway bounds error dumps to 5 files. Because every If the answer is "it is SDK surface we do not use, ignore it", that is completely fine and I will keep intercepting it. |
Replies: 4 comments
Yes — it is intended, and here is the actual call site (0.2.2-rc.1)The upload is the DeepSeek Messages adapter's Files-API-first image pipeline,
So the inline-base64 chain you found is the recovery leg; the primary leg is Why grepping
|
|
Two corrections to my answer above, after re-checking against the bundle: 1. The inline fallback question is answered — it is unconditional. I should have closed this out instead of leaving it open. That means the practical cost is precisely one wasted upload attempt per image 2. The digest I quoted was wrong. I cited 3. On the "1908 x 404 in 24h" figure — also withdrawn. I tried to corroborate the probe volume from nginx access logs and the number Decisive check: at two timestamps where I have confirmed upload attempts The core claim is unaffected — the upload fires per image-bearing turn and the |
|
Follow-up to my correction above — one of its three points does not survive rechecking. "Those attempts never traversed nginx" is wrong. The two timestamps I checked More decisively: in the same rotation, the POST remainder — 1,655 lines from a single What still stands from the correction: the |
|
Withdrawing one more claim of mine, this one in the "never traversed nginx" paragraph. I said the two probe timestamps I checked produced zero matching access-log lines, and read that as proof the requests bypassed the reverse proxy. That was a timezone mistake on my side: the host runs UTC and my journal tool already prints UTC, so those timestamps were already on the same scale as the log. I treated them as UTC+8, which shifted them 8 hours and manufactured the empty grep. Re-checked correctly, at What I can reproduce on that log:
One number in my previous comment I could not reproduce: None of this changes the substantive answer: the upload is the adapter's Files transport, it fires per image-bearing turn, the 404 degrades to inline base64 unconditionally, and there is no setting to disable it. The volumetric side of my argument has now been wrong twice, so treat the counts above as the only ones I have actually verified — and if a maintainer needs the raw numbers, the log is one day and the commands are |
Yes — it is intended, and here is the actual call site (0.2.2-rc.1)
The upload is the DeepSeek Messages adapter's Files-API-first image pipeline,
not an Anthropic SDK side effect. Per the package README (
@deepseek-ai/dsh-llm-deepseek):So the inline-base64 chain you found is the recovery leg; the primary leg is
the Files upload.
Why grepping
files.upload(finds nothing in@deepseek-ai/dsh-*The sender is the adapter's own hand-rolled transport:
@deepseek-ai/dsh-llm-deepseek(upstreampackages/llm/llm-deepseek),DeepSeekFilesClient.upload()(src/files-api.ts), called from the requestloop as
c…