Skip to content

Fetch provider image URLs and convert to data: URIs#106

Closed
adambalogh wants to merge 3 commits into
mainfrom
claude/sharp-bardeen-sqll82
Closed

Fetch provider image URLs and convert to data: URIs#106
adambalogh wants to merge 3 commits into
mainfrom
claude/sharp-bardeen-sqll82

Conversation

@adambalogh

Copy link
Copy Markdown
Contributor

Providers like ByteDance Seedance return pre-signed CDN URLs rather than base64 blobs. The gateway now fetches those URLs inline and converts them to data: URIs so the SDK always receives self-contained base64 images. Without this the SDK example saved garbage by trying to base64-decode the URL string itself.

Falls back to returning the raw URL if the fetch fails.

Claude-Session: https://claude.ai/code/session_01XxsSjnuypVUhpDPiEDA1Md

claude added 2 commits June 23, 2026 21:07
Providers like ByteDance Seedance return pre-signed CDN URLs rather than
base64 blobs. The gateway now fetches those URLs inline and converts them
to data: URIs so the SDK always receives self-contained base64 images.
Without this the SDK example saved garbage by trying to base64-decode
the URL string itself.

Falls back to returning the raw URL if the fetch fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XxsSjnuypVUhpDPiEDA1Md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XxsSjnuypVUhpDPiEDA1Md
@adambalogh adambalogh marked this pull request as ready for review June 23, 2026 21:08
@adambalogh adambalogh closed this Jun 23, 2026
@adambalogh adambalogh reopened this Jun 23, 2026
@adambalogh adambalogh closed this Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants