Skip to content

Conversation

@hanouticelina
Copy link
Contributor

@hanouticelina hanouticelina commented Jan 16, 2026

related to this comment (private link).

When using textToImage with outputType: "url", together and nebius providers returned base64 URLs instead of actual http URLs. Some providers don't support URL format : hf-inference, nscale, hyperbolic.

cc @kefranabg

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

}
if (outputType === "url") {
console.warn("hyperbolic provider does not support URL output, returning base64 data URL instead");
return `data:image/jpeg;base64,${response.images[0].image}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd expect an exception to be thrown rather than an alternative format. IMO choosing the outputType should be left to the user, based on the formats supported by the providers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in ba01d73

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add a new dataUrl type then? because here we are introducing a breaking change so at least we should provide a drop-in replacement I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^yes agree, i added dataUrl type in 7e18606
regarding the breaking change, I first thought it was okay since it was kind of a bug to return base64 URLs when outputType: "url" (similar to response_format: "url" in other APIs), users would expect an actual http URL but agree about adding a drop-in replacement 👍

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.

5 participants