new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

azure/setup

7 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Azure OpenAI provider module installation

The Azure OpenAI provider is available in the `@ai-sdk/azure` module and can be installed with the package manager.

Azure provider instance import

Import the default provider instance `azure` from `@ai-sdk/azure`: `import { azure } from '@ai-sdk/azure';`

Create customized Azure provider with createAzure

Import `createAzure` from `@ai-sdk/azure` to create a provider instance with custom settings including resourceName, apiKey, tokenProvider, apiVersion, baseURL, headers, fetch, and useDeploymentBasedUrls.

Azure provider configuration options

The Azure OpenAI provider accepts the following configuration options: resourceName (string, defaults to AZURE_RESOURCE_NAME environment variable), apiKey (string, defaults to AZURE_API_KEY environment variable), tokenProvider (function returning Promise<string> for Microsoft Entra ID), apiVersion (string, defaults to v1), baseURL (string for custom URL prefix), headers (Record<string,string> for custom headers), fetch (custom fetch implementation), and useDeploymentBasedUrls (boolean, defaults to false for legacy deployment format).

Azure Microsoft Entra ID authentication setup

For Microsoft Entra ID authentication, install `@azure/identity` separately. Create a credential using DefaultAzureCredential, get a bearer token provider using getBearerTokenProvider with scope 'https://cognitiveservices.azure.com/.default', and pass the tokenProvider to createAzure instead of apiKey.

Azure resourceName URL construction

The Azure resource name is used to construct the API URL as: https://{resourceName}.openai.azure.com/openai/v1{path}. The baseURL parameter can be used instead to specify a custom URL prefix.

Azure transcription DeploymentNotFound error resolution

If encountering a 'DeploymentNotFound' error with transcription models, try enabling deployment-based URLs by setting useDeploymentBasedUrls: true and apiVersion: '2025-04-01-preview' (or an earlier value). This uses the legacy endpoint format which may be required for certain Azure OpenAI deployments.

Give your agent this brain