Deuz SDK 2.0 is out — stores, guardrails, handoffs, and zero-config MCP. What is new in 2.0
Deuz SDK

Azure OpenAI

Azure OpenAI and Azure AI Foundry over the Chat Completions wire with api-key or Entra auth.

Azure OpenAI (and Azure AI Foundry OpenAI-compatible endpoints) use the Chat Completions wire (surface: 'chat_completions'). Classic Azure URLs are deployment-scoped and require an api-version query param. Auth defaults to the api-key header — not Bearer.

createAzure

import { createAzure } from '@deuz-sdk/core/azure';
import { streamChat } from '@deuz-sdk/core';

const azure = createAzure({
  apiKey: process.env.AZURE_OPENAI_API_KEY!,
  resourceName: 'my-resource',
  // apiVersion: '2024-12-01-preview', // default
});

const result = streamChat({
  model: azure('gpt-4o'), // deployment name
  messages: [{ role: 'user', content: 'Hello from Azure.' }],
});

for await (const delta of result.textStream) {
  process.stdout.write(delta);
}

Also re-exported from @deuz-sdk/core/providers for createProviderRegistry.

Settings

OptionTypeDefaultNotes
apiKeystringAzure OpenAI key, or Entra access token when auth: 'bearer'.
resourceNamestringBuilds https://{resource}.openai.azure.com/openai/deployments/{deployment}. Required unless baseURL is set.
apiVersionstring2024-12-01-previewAppended as ?api-version=… on every request.
baseURLstringFoundry / proxy root (adapter still appends /chat/completions).
auth'api-key' | 'bearer''api-key'Entra ID → 'bearer'.
fetchtypeof fetchglobalFactory fetch wins over deps.fetch.
headersRecord<string, string>Merged under adapter auth.

The argument to the returned Provider is the deployment name. Key precedence is the usual G1 rule (deps.keyProvider → factory → createClient apiKeys.azure).

Foundry / custom gateway

const azure = createAzure({
  apiKey: process.env.AZURE_OPENAI_API_KEY!,
  baseURL: 'https://<foundry-host>/openai/v1',
});

Notes

  • This is not the Azure AI Agents / Assistants REST surface — Chat Completions only.
  • Unknown deployment slugs do not throw at the registry; capabilities fall back conservatively.
  • Zero AWS/Azure SDKs — pure fetch + Web headers.

On this page