Has anyone been successful using the openai python library to call AzureOpenAI through Cloudflare G
Has anyone been successful using the openai python library to call AzureOpenAI through Cloudflare Gateway?
Custom costs will appear in the logs with an underline, making it easy to identify when custom pricing has been applied.But that is no longer the case (I haven't used custom costs before so I don't know when it disappeared).








2009 Unauthorized consistently on every request going to any authenticated gateway (any provider/model). I rolled a new ai gateway token and azure ai tokens and manually tried them, but they're failing too. Last known good request was April 1, 2025
200 OKe9b82b39aa91575a2643529d24a1bf02


\ns). I am really considering build a 3rd party viewer for it.

ai-gateway or cache will get mixed up?
--header 'cf-aig-metadata: {"team": "AI", "user": 12345, "test":true}' \
{
"result": null,
"success": false,
"errors": [
{
"code": 7010,
"message": "Service unavailable"
}
],
"messages": [
]
}import { createWorkersAI } from 'workers-ai-provider';
import { streamText } from 'ai';
...
const model = '@cf/meta/llama-3.1-70b-instruct';
const workersai = createWorkersAI({ binding: env.AI,
gateway: {
id: "ai-gateway-id ?"
},
baseURL: 'https://gateway.ai.cloudflare.com/...?'
});
...
const result = streamText({
model: workersai(model),
prompt: finalPrompt,
});