I'm trying to use Cloudflare-hosted GPT
I'm trying to use Cloudflare-hosted GPT OSS models with AI SDK v5. I integrated workers-ai-provider, but it doesn't seem to support these models, as I'm getting empty responses. @Sunil Pai any input?
3 Replies
You’re likely hitting similar issues to what I did this weekend: https://x.com/cherryjimbo/status/1967239653330985154
James Ross (@CherryJimbo)
The @CloudflareDev Cloudflare Workers AI DX is still extremely rough.
Types are still wonky, "partner" models aren't even recognised by them, and some model outputs aren't even documented.
I might just use @vercel's AI SDK with OpenAI or something.
X
https://github.com/cloudflare/workerd/pull/5111 adds types for these which can then be landed upstream in the workers ai provider and should fix what you’re describing
GitHub
Update Workers AI Types by thatsKevinJain · Pull Request #5111 · ...
Adds TS types for following new models
@cf/google/embeddinggemma-300m
@cf/deepgram/aura-1
@cf/deepgram/nova-3
@cf/openai/gpt-oss-120b
@cf/openai/gpt-oss-20b
@cf/leonardo/phoenix-1.0
@cf/leonardo/l...
Thanks James! It seems you've been tracking these issues for a while. I remember having to create types by myself for Nove 3 and Aura 1 when working on OpenGPT: https://github.com/devhims/opengpt
I also noticed that the provider currently only targets /ai/run/<model> and assumes legacy response shapes, so GPT OSS Responses payloads are ignored.