David Manouchehri

Results 439 comments of David Manouchehri

> Is this what you are looking for? Yes. It doesn't actually work though when you try to use your code in Cloudflare Worker. ``` Error: ClientCertificateCredential is not supported...

Cloudflare Workers will be bringing in the browser version, as they do not use the Node.js runtime. They use directly V8 as their engine, and are more similar to a...

Enabling Node.js compatibility doesn't fix the error mentioned in https://github.com/Azure/azure-sdk-for-js/issues/31467#issuecomment-2430383711.

Even if I force the node package for Azure, and enable `nodejs_compat`, that brings a new error to the table. I feel this is really the wrong path to go...

> It looks like we can use the workerd key to help Cloudflare bundle the right (non-browser) version of this credential: Did you manage to get that to work? :)

@KarishmaGhiya I have no idea how I would use `ClientAssertionCredential` with a private key. Are you suggesting I re-implement all of ClientCertificateCredential myself...? Rolling my own crypto is really not...

This looks way too complicated. To be blunt, nobody is going to do that. If I wanted to implement my own callback function, I wouldn't be using this SDK to...

You don't need a Cloudflare account. You can do it all locally. https://developers.cloudflare.com/workers/get-started/guide/

This is working in production. Just tested it with `2025-03-01-preview`. ```sh export AZURE_OPENAI_AD_TOKEN=$(az account get-access-token --scope "https://cognitiveservices.azure.com/.default" --query accessToken --output tsv) curl -v "https://REMOVED.openai.azure.com/openai/deployments/demo_gpt-4o-mini-2024-07-18_replaceme_here/chat/completions?api-version=2025-03-01-preview" \ -H "Content-Type: application/json" \ -H...