cURL does if you specify the `-N` (nobuffer) flag
cURL does if you specify the
-N (nobuffer) flag-N"stream": true?/chat/completion to the end, so your URL shouldn't have that in it with the SDKhttps://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions which is what is in the docs. But I'll try it without /chat/completions!


https://*.openai.azure.com/openai/v1/* Azure OpenAI endpoint? I can't seem to get it working with AI Gateway; I'm guessing something is being mutated on the AI Gateway side incorrectly?cf-aig-authorization.${AI_GATEWAY_TOKEN}cf-aig-authorization headerv1/models endpoint or only contain /v1/chat/completions and /v1/embeddings?

gateway.run function inside workers."stream": true/chat/completionhttps://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions/chat/completionshttps://*.openai.azure.com/openai/v1/*cf-aig-authorization.${AI_GATEWAY_TOKEN}cf-aig-authorizationv1/models/v1/chat/completions/v1/embeddingsgateway.run# seems google-ai-studio streaming api not work, anybody know how to fix it?
curl "https://gateway.ai.cloudflare.com/v1/7{account_id}/{gateway_id}/google-ai-studio/v1beta/models/gemini-2.5-flash-preview-05-20:streamGenerateContent?alt=sse" \
--header 'content-type: application/json' \
--header 'x-goog-api-key: '(pass GEMINI_API_KEY) \
--data '{
"contents": [
{
"role":"user",
"parts": [
{"text":"What is Cloudflare?"}
]
}
]
}'createOpenAI({
baseURL: `https://gateway.ai.cloudflare.com/v1/${env.CLOUDFLARE_ACCOUNT_ID}/${customer.gatewayId}/openai`,
apiKey: env.OPENAI_API_KEY,
headers: {
'cf-aig-authorization': env.CLOUDFLARE_API_KEY,
},
});