Skip to main content

langchain-azure-ai

This package contains the LangChain integration for Microsoft Foundry (formerly known Azure AI). To learn more about how to use this package, see the LangChain documentation in Microsoft Foundry.

Start here

I want to... Start with
Call Microsoft Foundry models from LangChain or LangGraph Model quick start and development guide
Host an existing compiled graph on Azure Hosting guide and configuration-driven sample
Find deployable examples of hosted-agent features Hosted-agent sample chooser
Branch, rewind, or regenerate from a completed response Branching sample
Access agents on Microsoft Foundry Agent Service Agent Service quick start
Apply guardrails or use Foundry tools Content Safety and Microsoft Foundry Tools
Trace graph, model, and tool calls Application Insights tracing
Persist graph state FoundryCheckpointSaver backed by Foundry State Store or Azure Cosmos DB checkpointer
Store long-term memory across threads Azure Cosmos DB store

Installation

pip install -U langchain-azure-ai

For using tools, including Azure AI Document Intelligence, Azure AI Text Analytics for Health, or Azure LogicApps, please install the extras tools:

pip install -U langchain-azure-ai[tools]

For using tracing capabilities with OpenTelemetry, you need to add the extras opentelemetry:

pip install -U langchain-azure-ai[opentelemetry]

For hosting LangGraph agents with the Responses or Invocations protocol, install the hosting extra:

pip install -U langchain-azure-ai[hosting]

If you are transitioning from Microsoft Foundry classic and you need access to deprecated classes, use [v1] extra.

pip install -U langchain-azure-ai[v1]

Quick Start with langchain-azure-ai

The langchain-azure-ai package uses the Microsoft Foundry family of SDKs and client libraries for Azure to provide first-class support of Microsoft Foundry capabilities in LangChain and LangGraph.

This package includes:

  • Calling Microsoft Foundry models: use the model integrations from LangChain and LangGraph.
  • Accessing agents on Microsoft Foundry Agent Service: use managed agents as nodes in your graph.
  • Applying Content Safety guardrails via middleware: check agent, model, and tool inputs and outputs with Microsoft Foundry Content Safety.
  • Hosting LangGraph agents on Microsoft Foundry (server): serve your own LangGraph agents on Microsoft Foundry through Responses or Invocations HTTP endpoints.
  • Using Microsoft Foundry Tools: call Azure services such as Content Understanding and Document Intelligence with Microsoft Foundry Tools.
  • Searching documents (vector store): index and search documents with Azure AI Search.

For more details and tutorials, see Get started with LangChain and LangGraph with Foundry.

Calling Microsoft Foundry models

Call a Microsoft Foundry model using the Chat Completions API:

from langchain_azure_ai.chat_models import AzureAIOpenAIApiChatModel
from langchain_core.messages import HumanMessage, SystemMessage

model = AzureAIOpenAIApiChatModel(
    endpoint="https://{your-resource-name}.services.ai.azure.com/openai/v1",
    credential="your-api-key", #if using Entra ID you can should use DefaultAzureCredential() instead
    model="gpt-5"
)

messages = [
    SystemMessage(
      content="Translate the following from English into Italian"
    ),
    HumanMessage(content="hi!"),
]

model.invoke(messages).pretty_print()
================================== Ai Message ==================================
Ciao!

You can also use builtin tools with them:

from langchain_azure_ai.tools.builtin import ImageGenerationTool

model_with_image_gen = model.bind_tools([ImageGenerationTool(model="gpt-image-1.5", size="1024x1024")])
result = model_with_image_gen.invoke(
    "Generate an image based on the following description: A futuristic cityscape at sunset with flying cars and neon lights."
)

Models in Microsoft Foundry Models are OpenAI-compatible and can be used with the class:

model = AzureAIOpenAIApiChatModel(
    endpoint="https://{your-resource-name}.services.ai.azure.com/openai/v1",
    credential="your-api-key",
    model="Mistral-Large-3"
)

Generate embeddings for search and retrieval using an embedding model deployment:

from langchain_azure_ai.embeddings import AzureAIOpenAIApiEmbeddingsModel

embeddings = AzureAIOpenAIApiEmbeddingsModel(
    endpoint="https://{your-resource-name}.services.ai.azure.com/openai/v1",
    credential="your-api-key",
    model="text-embedding-3-small",  # your embedding model deployment name
)

query_vector = embeddings.embed_query("What is Microsoft Foundry?")
document_vectors = embeddings.embed_documents(
    ["Microsoft Foundry helps you build AI applications."]
)

Accessing agents on Microsoft Foundry Agent Service

Create a managed Foundry agent and add it as a LangGraph node.

For local development, install the required extra and sign in:

pip install -U "langchain-azure-ai[opentelemetry]"
az login

Set your project endpoint and model deployment name. This creates a version of my-echo-agent in your project:

from azure.identity import DefaultAzureCredential
from langchain_core.messages import HumanMessage
from langgraph.graph import END, START, StateGraph
from langchain_azure_ai.agents import AgentServiceAgentState, AgentServiceFactory
from langchain_azure_ai.utils.agents import pretty_print

factory = AgentServiceFactory(
    project_endpoint="https://{your-resource-name}.services.ai.azure.com/api/projects/{your-project}",
    credential=DefaultAzureCredential()
)

echo_node = factory.create_prompt_agent_node(
    name="my-echo-agent",
    model="gpt-4.1",  # your model deployment name
    instructions="Always reply with the opposite of what the user says.",
)

Agent Service nodes run in Microsoft Foundry but can be added to any graph:

graph = StateGraph(AgentServiceAgentState)
graph.add_node("expert_node", echo_node)
graph.add_edge(START, "expert_node")
graph.add_edge("expert_node", END)

Use the graph as usual:

agent = graph.compile()
messages = [HumanMessage(content="I'm a genius and I love programming!")]
response = agent.invoke({"messages": messages})

pretty_print(response)
================================ Human Message =================================

I'm a genius and I love programming!
================================== Ai Message ==================================
Name: my-echo-agent

You're not a genius and you don't love programming!

Applying Content Safety guardrails via middleware

Use a Content Safety guardrail policy with any LangChain create_agent agent:

from langchain.agents import create_agent
from langchain_azure_ai.agents.middleware import AzureContentSafetyPolicyMiddleware

agent = create_agent(
    model=model,
    middleware=[
        AzureContentSafetyPolicyMiddleware(
            policy_id="your-guardrail-id",
            endpoint="https://your-resource.cognitiveservices.azure.com",
        )
    ],
)

This preview integration requires azure-ai-contentsafety>=1.1.0b1. It submits agent and model input/output and tool arguments/results to the service; the guardrail policy controls each intervention point. The same text may be checked at both agent and model boundaries. A blocked policy verdict raises ContentSafetyViolationError; allowed transformations are applied, and non-blocking findings are available via get_content_safety_annotations. Agent/model hooks screen text; tool hooks screen JSON-encoded arguments and results. See the runnable example.

Hosting LangGraph agents on Microsoft Foundry

Responses protocol

Already have a compiled LangGraph graph? Keep its implementation, model, and tools. Point langgraph.json at its exported graph, as shown in the Responses run-entrypoint sample, then launch it from the directory containing that configuration:

pip install -U "langchain-azure-ai[hosting]"
python -m langchain_azure_ai.agents.hosting.run --protocol responses

For prerequisites, local requests, and Azure deployment, follow the LangGraph hosting guide or the hosted-agent samples.

For platform configuration and deployment examples, see the Foundry LangGraph samples.

You can also host the graph directly from Python, as shown below:

from langchain_azure_ai.agents.hosting import ResponsesHostServer

graph = build_my_graph()  # returns a compiled LangGraph graph

if __name__ == "__main__":
    ResponsesHostServer(graph).run()

ResponsesHostServer serves the OpenAI Responses-style /responses endpoint. The graph's input state must include a messages field. It supports JSON and streaming responses, background execution, conversation steering, and human-in-the-loop interrupts.

For current feature support and configuration combinations, see the Responses hosting overview.

The Responses host uses one conversation-state source per graph. The policy depends on whether the hosted graph has a LangGraph checkpointer:

Graph configuration Conversation source Graph input on later turns
Graph compiled with a checkpointer LangGraph checkpoint state keyed by the conversation/thread ID and, when available, the platform-provided user partition key Current request input only
Graph without a checkpointer Responses transcript history from the underlying response provider Prior Responses history plus current input

Checkpointed multi-turn conversations use an explicit conversation.id or run with steerable_conversations=True. Both modes are linear and preserve the latest LangGraph checkpoint for subsequent turns.

[Experimental] Response branching: Enable enable_response_branching=True with a history-preserving checkpointer to branch from a completed response using previous_response_id. See the branching sample for branching, rewind, regeneration, and setup requirements.

Invocations protocol

Use InvocationsHostServer to serve your graph through the /invocations endpoint:

from langchain_azure_ai.agents.hosting import InvocationsHostServer

graph = build_my_graph()  # returns a compiled LangGraph graph

if __name__ == "__main__":
    InvocationsHostServer(graph).run()

To launch with langgraph.json, use --protocol invocations.

InvocationsHostServer also supports background execution, conversation steering, and human-in-the-loop interrupts. Enable resilient_background=True for durable background turns, or steerable_conversations=True to let a new turn supersede an active turn in the same agent_session_id. Resilient background execution requires a LangGraph checkpointer; use a durable checkpointer for hosted production deployments.

See the Invocations hosting overview for configuration, request formats, polling, cancellation, and interrupt handling, and the Invocations run-entrypoint sample for setup and deployment.

Persisting graph state

Use FoundryCheckpointSaver to persist LangGraph runtime state, including checkpoints and pending writes, in Foundry State Store so a hosted graph can resume across turns and container restarts. It is an async-only checkpointer, separate from the Responses transcript store. Compile the graph with the saver and keep its async context open for the host's lifetime:

from langchain_azure_ai.agents.hosting import (
  FoundryCheckpointSaver,
  ResponsesHostServer,
)


async def main() -> None:
  async with FoundryCheckpointSaver() as checkpointer:
    graph = builder.compile(checkpointer=checkpointer)
    await ResponsesHostServer(graph).run_async()

Locally, FoundryCheckpointSaver uses files under ~/.agentserver/state_stores. Set AGENTSERVER_STATE_ROOT to choose another state root. Reuse that directory and the same conversation/thread ID across local restarts. These files stay on the local machine.

Foundry-hosted agents use Foundry State Store with container protocol 2.0.0, which supplies the hosted request context. See storage choices for the separate roles of graph checkpoints, conversation references, and response storage.

For an end-to-end example that selects an in-memory saver locally and FoundryCheckpointSaver when hosted, see the workflow sample. If you want database-backed checkpoints, use the async CosmosDBSaver in the Cosmos DB hosting guidance. Both hosts invoke graphs asynchronously, so CosmosDBSaverSync is not compatible. Cross-thread long-term memory is a separate concern; use a LangGraph store rather than a checkpointer for that purpose.

Tracing with Azure Application Insights

To trace your LangChain / LangGraph applications with Azure Application Insights, first install the OpenTelemetry extras:

pip install -U langchain-azure-ai[opentelemetry]

Then enable auto tracing in your application. Every BaseCallbackManager and LangGraph callback manager created after this call will automatically include the Azure tracer:

from langchain_azure_ai.callbacks.tracers import enable_auto_tracing

enable_auto_tracing(
    connection_string="<your-application-insights-connection-string>",
    auto_configure_azure_monitor=True,
    enable_content_recording=False,      # set to True to capture message payloads
    provider_name="azure.ai.openai",
    trace_all_langgraph_nodes=True,
)

For a complete end-to-end example, see samples/enable_auto_tracing_appinsights.py.

Using Microsoft Foundry Tools

Use tools from Azure AI services as LangChain tools via AzureAIServicesToolkit. Available tools include Azure AI Content Understanding, Document Intelligence, Image Analysis, Text Analytics for Health, and more.

Azure AI Content Understanding is also available as a document loader via AzureAIContentUnderstandingLoader. See the Content Understanding loader notebook for a full walkthrough.

Changelog

  • 1.3.1:

    • We added a hosting telemetry flag that records whether response branching is enabled. #1307
    • We fixed AzureSearch.add_texts() and aadd_texts() to upload texts supplied as generators or other one-shot iterables instead of silently returning no results. #1330 Thanks to @hyeonsang010716.
    • We fixed AzureSearch.from_embeddings() and afrom_embeddings() to accept constructor options without forwarding them to document uploads, while preserving supplied document keys. #1328 Thanks to @hyeonsang010716.
    • We fixed Azure Search authentication to use a supplied token credential or the default Azure credential when the API key is empty or omitted. Nonempty API keys retain precedence. #1327 Thanks to @hyeonsang010716.
    • We fixed Azure Search custom field names to resolve when each store is constructed, so AZURESEARCH_FIELDS_* settings work after import and remain consistent across synchronous and asynchronous operations. #918 Thanks to @cr-sbarbouche.
    • We fixed Azure Search retriever filtering so search_kwargs={"filter": ...} no longer returns unfiltered results or raises TypeError. For 1.3.0 and earlier, use search_kwargs={"filters": ...} as a workaround. Passing both names now raises ValueError. #1303 Thanks to @hyeonsang010716.
    • We fixed asynchronous Azure Search MMR searches to return an empty list when no documents match. #817 Thanks to @0xDevNinja.
    • We fixed AzureAIChatCompletionsModel to send zero-valued settings such as temperature=0 and seed=0, and to let per-call options override model defaults without duplicate-keyword errors. #1269 Thanks to @pcbeingused333.
    • We fixed AzureAIImageAnalysisTool construction and visual-feature handling, included caption and denseCaptions in its output, and surfaced service failures instead of returning an empty result. #1302 Thanks to @hyeonsang010716.
    • We fixed AzureAIOpenTelemetryTracer to use the retriever's run or class name for retriever spans when no serialized name is available. #1321 Thanks to @hyeonsang010716.
    • We improved documentation for SDK setup, Agent Service, durable state, and hosting. #1299 #1308 #1309 #1315 #1329
  • 1.3.0:

    • [NEW, Experimental] We introduced opt-in response branching through ResponsesHostServer(graph, enable_response_branching=True). Requests with previous_response_id start from the completed parent's exact saved checkpoint, creating independent siblings without advancing the shared conversation head. This requires a retained parent, a history-preserving async checkpointer, steering disabled, and no externally supplied app; paused-parent branching is not supported. See the design document for usage scenarios and implementation gaps. #1263 #1260 #1288
    • [NEW] We added toolbox_version to AzureAIProjectToolbox to select a specific toolbox version. Omitting it or setting it to None keeps the default toolbox endpoint. #1294
    • [Breaking] We made ResponsesHostServer reject store=False with HTTP 400 before streaming or graph execution when a LangGraph checkpointer is configured. Clients must omit store or set store=True; foreground requests without a checkpointer still support store=False. Parent-response and branch-checkpoint validation also runs before streaming, returning HTTP 400/404 for invalid requests and a redacted HTTP 500 for unexpected backend failures. Clients must handle these HTTP errors before consuming Response or SSE events. #1290
    • [Breaking] We removed build_runnable_config_sync() from the experimental ResponsesHostServer. Callers must use await server.build_runnable_config(request, context). #1250
    • [Breaking] We removed isolation and TTL mismatch validation from FoundryCheckpointSaver and FoundryConversationChainStore. Existing stores retain their settings without rejecting mismatches. The chain store's on_mismatch argument is now a deprecated compatibility option; "fail" no longer rejects mismatches. Applications must provision existing stores with the intended isolation and TTL. #1235
    • [Breaking] We changed Responses execution errors from internal_error with exception details to server_error with the fixed message An internal error occurred.. Clients must update error-code handling and use server logs for details. #1232
    • We fixed HITL resumes by requiring langgraph>=1.2.16,<2.0, preventing completed tasks and their side effects from running again when outstanding interrupts are answered. #1258
    • We fixed Azure AI Inference streaming to preserve complete tool calls whose deltas omit index. #1221 Thanks to @pcbeingused333.
    • We fixed AzureAIOpenTelemetryTracer to mark handled tool failures returned as ToolMessage(status="error") as failed spans. #1160 Thanks to @Ko-Ko-Kirk.
    • We fixed cosine_similarity_top_k to return empty results when no candidate qualifies, honor explicit zero limits and thresholds, and preserve eligible zero or negative similarity scores. #1238 Thanks to @cr-sbarbouche.
    • We fixed AzureCosmosDBMongoVCoreSemanticCache to use a default similarity threshold of 0.5, rejecting weak matches while preserving explicitly configured thresholds, including 0.0. #1241 Thanks to @cr-sbarbouche.
    • We reduced hosting storage overhead by reusing State Store clients within a handler and cached store bindings across requests. #1232 #1262
    • We reduced repeated checkpoint and pending-write reads within Responses requests while preserving normal durability writes and latest-checkpoint checks. #1261
    • We cached response-chain root IDs to avoid repeatedly traversing response history. #1251
  • 1.2.12:

    • We fixed FoundryCheckpointSaver to select the latest checkpoint and order checkpoint history by LangGraph checkpoint ID rather than storage insertion order, including before filtering and namespace isolation. #1070 Thanks to @tanvir-ux.
    • We fixed a TypeError when selecting similarity or hybrid search with search_type in AzureSearch.asimilarity_search_with_score. #1211 Thanks to @revanth-045.
    • We fixed AzureAISearchRetriever to report search request errors instead of an unrelated KeyError when asynchronous searches fail. #1210 Thanks to @pcbeingused333.
    • We fixed the File Search example in the models notebook by importing FileSearchTool before binding it to the model. #1208
  • 1.2.11:

    • [NEW, Preview] We introduced AzureContentSafetyPolicyMiddleware to apply a Content Safety guardrail policy to agent and model messages, tool arguments, and tool results, with support for service-provided transforms and annotations. This requires azure-ai-contentsafety>=1.1.0b1. #1141
    • We mapped MCP approval responses to ordered approve/reject decisions for LangChain HumanInTheLoopMiddleware. Invalid or conflicting decisions fail the request without resuming pending interrupts. #1058
    • We preserved image and file attachments in hosted Responses requests and tool outputs. #1072 #1073
    • We preserved Responses text citations and their streaming annotation events in hosted agent output. #1074
    • We deferred model SDK imports during hosting startup while preserving the hosting User-Agent stamp, and added wrapt to the hosting extra so this instrumentation does not require the opentelemetry extra. #1155
    • We scoped AzureCosmosDBMongoVCoreSemanticCache lookups and clearing to the requested llm_string, preventing cache hits and deletions across model configurations. #1030 Thanks to @cr-sbarbouche.
    • We fixed AzureAIOpenTelemetryTracer to accept LangGraph interrupt and resume callbacks without callback errors. #1075 Thanks to @taekop.
    • We redacted agent finish output and retriever queries in AzureAIOpenTelemetryTracer when content recording is disabled. #1089 Thanks to @taekop.
    • We fixed agent requests to honor an explicitly selected agent version while preserving dynamic version resolution for version="latest". #1041
    • We fixed project endpoint resolution to match service names exactly and honor the supplied api_version. #1099 Thanks to @revanth-045.
    • We updated hosted Responses usage typing for SDK compatibility while preserving cache-write token counts. #1048 Thanks to @jkennedyvz.
  • 1.2.10:

    • We raised the minimum supported Python version from 3.10 to 3.11 in accordance with the repository's Python support policy. Users running Python 3.10 must upgrade their runtime to install this release. #1021
  • 1.2.8:

    • We extended AzureAIProjectToolbox to forward the x-agent-foundry-call-id header on toolbox calls, ensuring per-call isolation and authorization on the toolbox side for deployed agents (hosted agent container spec 2.0.0). #785
    • We fixed an issue where the LangGraph hosting wrapper for Microsoft Foundry (langchain_azure_ai.agents.hosting) did not stream model reasoning summaries. Hosted agents configured with reasoning summaries now emit them through the streaming Responses output. #771
  • 1.2.7:

    • [NEW] We extended AzureAIProjectToolbox with skills support: new get_skills/aget_skills methods load toolbox skills as DeepAgents-ready file mappings, and new get_resources/aget_resources methods fetch toolbox resources (such as skills) as LangChain Blob objects with flexible URI-scheme filtering. #700
  • 1.2.6:

    • We added a hosting User-Agent stamp on OpenAI and Anthropic SDK clients used by LangGraph agents hosted in Microsoft Foundry, so outbound model calls from hosted agents are correctly attributed to langchain-azure-ai/hosting. #671
    • We updated dependencies including aiohttp and the uv group to incorporate maintenance and security updates. #654 #657 #663 #667
  • 1.2.5:

    • We added messages_key configurability in AzureAIMemoryMiddleware to support agent states that use non-default message field names. #647
    • We improved Azure AI Memory and content safety middleware docstrings with clearer examples, and fixed memory retriever output context formatting for better usability. #647
  • 1.2.4:

    • [NEW] We introduced support for hosting LangGraph agents in Microsoft Foundry through ResponsesHostServer and InvocationsHostServer, including checkpoint integration for conversation state. #595
    • [NEW] We introduced Azure AI Memory turn-sync middleware and an on-demand memory retrieval tool to improve multi-turn memory workflows. #637
    • We fixed duplicate conversation history handling and improved parallel tool call handling in hosted Responses flows. #626
    • We updated Azure AI Content Understanding tooling to use the SDK to_llm_input helper for improved request shaping. #554
    • We introduced AzureAIProjectToolbox.get_tools_requiring_approval to help identify tools that require explicit user approval in agent flows. #537
    • We updated key dependencies such as urllib3, idna, and starlette to incorporate maintenance and security updates. #592 #582 #616 #623
  • 1.2.3:

    • [NEW] We introduced AzureAIProjectToolbox for accessing tools managed in Azure AI Foundry projects, simplifying tool configuration and management. #525
    • [NEW] We migrated speech-to-text tool for Azure AI from the community package, enabling speech integration capabilities. #499
    • We updated AzureAIOpenTelemetryTracer to emit OpenTelemetry spec-compliant spans for GenAI operations. #509
    • We patched 21 security alerts across dependency packages including langsmith, cryptography, langchain-core, and dev dependencies to improve package security posture. #496
  • 1.2.2:

    • [NEW] We introduced AzureAIContentUnderstandingLoader document loader for extracting content from documents, images, audio, and video using Azure AI Content Understanding. #423
    • [NEW] We introduced AzureAIContentUnderstandingTool for using Content Understanding as an agent tool, also available via AzureAIServicesToolkit. #446
    • We introduced context_extractor support across content safety middleware classes, so you can control how content is extracted from agent state before safety checks run. #419
    • We introduced context_extractor support for AzureGroundednessMiddleware and added a notebook example for easier adoption. #410
    • We changed the default implementation of init_chat_model("azure_ai:<your-model>") to use the OpenAI Responses API path for improved compatibility with modern LangChain chat model initialization. #409
    • We fixed an AttributeError in AzureAIOpenTelemetryTracer.on_chain_start when chain inputs were not dictionaries. #317
    • We upgraded the requests dependency for this package to include upstream security and maintenance updates. #417
    • We patched multiple high-severity dependency vulnerabilities (including PyJWT, orjson, and tornado) to improve package security posture. #412
  • 1.2.1:

    • You can now use context_extractor argument in classes langchain_azure_ai.agents.middleware. to configre how middleware instract extract content from your state.
    • We changed the default implementation of init_chat_model("azure_ai:<your-model>") to use OpenAI Responses API (this is also the default if using langchain>=1.2.3).
  • 1.2.0:

    • We now require langchain>=1.2 so our streaming implementation matches the latest version of langchain.
    • We introduced langchain_azure_ai.agents.middleware.content_safety.* namespace which unlocks the power of Azure AI Content Safety with LangChain.
    • We introduced langchain_azure_ai.tools.builtin.* namespace with server-side tools that can be used for models running in Microsoft Foundry.
    • We fixed an issue with duplicated spans generated in OpenTelemetry tracer. #398.
    • We fixed an issue in init_embeddings(provider="azure_ai") where an incorrect kwarg was passed.
  • 1.1.0:

    • Creating agents using Foundry Agents V1 has been deprecated in favor of V2. langchain_azure_ai.agents.AgentServiceFactory now using V2 implementation. Namespace langchain_azure_ai.agents.v1.AgentServiceFactory is marked as deprecated and requires the extra v1 to be used.
    • Chat and embedding models using Azure AI Inference SDK has been deprecated in favor of OpenAI-compatible APIs. Namespace langchain_azure_ai.chat_models.inference.AzureAIChatCompletionsModel and langchain_azure_ai.embeddings.inference.AzureAIEmbeddingsModel are marked as deprecated and require the extra v1 to be used.
  • 1.0.62:

    • We introduced support for asynchhronous agents operation and tracing using our OpenTelemetry tracer for context to propagate correctly. #290.
    • We introduced support for Bash operations in langchain-azure-dynamic-session. #238.
    • We introduced support for Agent Service V2 in Microsoft Foundry. PR #257.
    • We added a new tool to generate images based on OpenAI-compatible image generation models. PR #325
    • We fixed an issue when on_tool_start ignores enable_content_recording. Now it doesn't. #261.
    • We fixed a problem when uploaded files were not considered by the CodeInterpreterTool for the Agent Service. #256.
    • We fixed an issue when using AzureAIOpenTelemetryTracer on a Mac. #234.
  • 1.0.61:

    • This release reverts the code to the state of v1.0.5 while updating the version number to 1.0.61.
  • 1.0.5:

    • We fixed an issue with the content type of messages in AzureAIChatCompletionsModel. See #245.
    • We improve metadata generated for AzureAIOpenTelemetryTracer. See #233.
  • 1.0.4:

    • We fixed an issue with dependencies resolution for azure-ai-agents where the incorrect version was picked up. See #221.
    • We fixed an issue with AzureAIOpenTelemetryTracer where spans context was not correctly propagated when called from another service. See #217.
    • We fixed an issue where AzureAIOpenTelemetryTracer where context was deallocated incorrectly, preventing tools like langdev to correctly emit traces. See #212.
    • We introduced improvements in the order in which environment variables AZURE_AI_* are read.
    • Internal: We improved AzureAIOpenTelemetryTracer test coverage. See PR #239.
  • 1.0.2:

    • We updated the AzureAIOpenTelemetryTracer to create a parent trace for multi agent scenarios. Previously, you were required to do this manually, which was unnecesary.
  • 1.0.0:

    • We introduce support for LangChain and LangGraph 1.0.
  • 0.1.8:

    • We fixed some issues with AzureAIOpenTelemetryTracer, including compliant hierarchy, tool spans under chat, finish reason normalization, conversation id. See #167
    • We fixed an issue with taking image inputs for declarative agents created with Azure AI Foundry Agents service.
    • We enhanced tool descriptions to improve tool call accuracy.
  • 0.1.7:

    • [NEW]: We introduce LangGraph support for declarative agents created in Azure AI Foundry. You can now compose complex graphs in LangGraph and add nodes that take advantage of Azure AI Agent Service. See AgentServiceFactory
    • We fix an issue with the interface of AzureAIEmbeddingsModel #158.
    • We improve the signatures of the tools AzureAIDocumentIntelligenceTool, AzureAIImageAnalysisTool, and AzureAITextAnalyticsHealthTool PR #160.
  • 0.1.6:

    • [Breaking change]: Using parameter project_connection_string to create AzureAIEmbeddingsModel and AzureAIChatCompletionsModel is not longer supported. Use project_endpoint instead.
    • [Breaking change]: Class AzureAIInferenceTracer has been removed in favor of AzureAIOpenTelemetryTracer which has a better support for OpenTelemetry and the new semantic conventions for GenAI.
    • Adding the following tools to the package: AzureAIDocumentIntelligenceTool, AzureAIImageAnalysisTool, and AzureAITextAnalyticsHealthTool. You can also use AIServicesToolkit to have access to all the tools in Azure AI Services.
  • 0.1.4:

  • 0.1.3:

    • [Breaking change]: We renamed the parameter model_name in AzureAIEmbeddingsModel and AzureAIChatCompletionsModel to model, which is the parameter expected by the method langchain.chat_models.init_chat_model.
    • We fixed an issue with JSON mode in chat models #81.
    • We fixed the dependencies for NumpPy #70.
    • We fixed an issue when tracing Pyndantic objects in the inputs #65.
    • We made connection_string parameter optional as suggested at #65.
  • 0.1.2:

  • 0.1.1:

    • Adding AzureCosmosDBNoSqlVectorSearch and AzureCosmosDBNoSqlSemanticCache for vector search and full text search.
    • Adding AzureCosmosDBMongoVCoreVectorSearch and AzureCosmosDBMongoVCoreSemanticCache for vector search.
    • You can now create AzureAIEmbeddingsModel and AzureAIChatCompletionsModel clients directly from your AI project's connection string using the parameter project_connection_string. Your default Azure AI Services connection is used to find the model requested. This requires to have azure-ai-projects package installed.
    • Support for native LLM structure outputs. Use with_structured_output(method="json_schema") to use native structured schema support. Use with_structured_output(method="json_mode") to use native JSON outputs capabilities. By default, LangChain uses method="function_calling" which uses tool calling capabilities to generate valid structure JSON payloads. This requires to have azure-ai-inference >= 1.0.0b7.
    • Bug fix #18 and #31.
  • 0.1.0:

    • Introduce AzureAIEmbeddingsModel for embedding generation and AzureAIChatCompletionsModel for chat completions generation using the Azure AI Inference API. This client also supports GitHub Models endpoint.
    • Introduce AzureAIOpenTelemetryTracer for tracing with OpenTelemetry and Azure Application Insights.

Metadata

Release files for langchain-azure-ai 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-azure-ai 1.3.1
File Size Uploaded Provenance Actions
langchain_azure_ai-1.3.1.tar.gz 302.9 kB Without provenance Details for langchain_azure_ai-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-azure-ai 1.3.1
File Interpreter ABI Platform Actions
langchain_azure_ai-1.3.1-py3-none-any.whl Python 3 none any Details for langchain_azure_ai-1.3.1-py3-none-any.whl

Total release size: 655.3 kB

Release files / langchain_azure_ai-1.3.1.tar.gz

Download URL langchain_azure_ai-1.3.1.tar.gz
Size 302.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a70ca083b7e4d06f0d4dcd37c99af7cdafe08cc17804d4b5ccde0a2c7ee3e835
BLAKE2b-256 checksum
How to use checksums
ff35d775f3463831945577e3ed6498fe194746a68a909a99130ca8442b8fdb79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / langchain_azure_ai-1.3.1-py3-none-any.whl

Download URL langchain_azure_ai-1.3.1-py3-none-any.whl
Size 352.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8a60b615993e45872f5d40230f4be653c63b601153dd246e547c0e4b478341d
BLAKE2b-256 checksum
How to use checksums
9bce06fbab8c799b0fa53f005ef7ef1baf0d798dc8b3d0f54aa6fa4a7f4dbd36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for langchain-azure-ai 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page