langchain-azure-ai>=1.4.1 that implement LangChain’s shared BaseDecisionModel interface (Runnable[ClassifierRequest, ClassifierResponse]):
Both adapters answer named
Noul, Choice, and Score questions from langchain_core.decisions (also re-exported from langchain_azure_ai.decisions) and return structured answers on nouls, choices, scores, and answers. Neither adapter supports Box questions.
AzureAIOpenAIApiDecisionsClassifier extends the beta OpenAIClassifier from langchain-openai>=1.8.0 and emits ExperimentalWarning on construction.Setup
Installlangchain-azure-ai 1.4.1 or later:
AZURE_AI_PROJECT_ENDPOINT (or FOUNDRY_PROJECT_ENDPOINT) to your Microsoft Foundry project URL and authenticate with Microsoft Entra ID (az login for local development). Pass your Foundry deployment name, not the underlying model name, as model.
Quickstart
- Microsoft Decision models
- Azure OpenAI Decisions API
Adapter differences
Microsoft Decision
AzureAIMicrosoftDecisionsClassifier calls compatible Microsoft Decision deployments through /providers/microsoft/v1/systemone.
- Inputs: Accepts text strings, JSON objects, and JSON arrays. It does not convert LangChain messages or send image assets.
- Endpoints: Accepts
project_endpoint(defaults toAZURE_AI_PROJECT_ENDPOINT, thenFOUNDRY_PROJECT_ENDPOINT) or a direct Foundry resource URL viaendpoint. - Authentication: Defaults to
DefaultAzureCredential(). Pass an API key string orAzureKeyCredentialascredentialfor key-based authentication. Async-only credentials requireainvokeorabatch.
Azure OpenAI Decisions
AzureAIOpenAIApiDecisionsClassifier extends OpenAIClassifier and calls /openai/v1/decisions.
- Inputs: Accepts strings, JSON objects and arrays, and root LangChain messages (including supported images). Media nested inside JSON state is dropped with a warning. If the API refuses any question,
ModelRefusalErroris raised for the entire request. - Endpoints: Accepts
project_endpoint(derives<resource>/openai/v1) or a direct resourceendpointending in/openai/v1(falls back toAZURE_AI_OPENAI_ENDPOINT, thenAZURE_OPENAI_ENDPOINTwith/openai/v1appended). - Authentication:
project_endpointrequires a Microsoft Entra token credential and defaults toDefaultAzureCredential(). For API key authentication, pass a direct resourceendpointending in/openai/v1withcredential(or setAZURE_OPENAI_API_KEY). - Compatibility alias:
AzureAIOpenAIApiDecisionsremains available as an alias forAzureAIOpenAIApiDecisionsClassifier.
See also
- Microsoft Decision model guide
- Azure OpenAI Decisions API guide
- Foundry Decision Models reference in
langchain-azure OpenAIClassifierintegration
Connect these docs to your agent of choice via MCP for real-time answers.

