Constructor initializes with API key only
API key for Azure AI
Protected_Protected property to store additional provider-specific settings
ProtectedthinkingState tracking for streaming thinking extraction Providers should initialize this if they support thinking models
Get the current additional settings
ProtectedapiOnly sub-classes can access the API key
ProtectedClientGet the Azure AI client, initializing if necessary
Get the Azure endpoint URL from additional settings
Whether this LLM provider supports assistant prefill (pre-seeding the start of the model's response). Providers that support prefill should override this to return true. This is used as a code-level default when database metadata (AIModelType/AIModel/AIModelVendor.SupportsPrefill) is null. Database values of true/false override this getter.
Azure AI supports streaming
ProtectedaddAdd thinking content to a chat completion message
OptionalthinkingContent: stringProtectedbuildStructured error info for a cancelled request. Cancellation is deliberate, so it is marked
Fatal and non-failover-able — retrying or failing over to another vendor would defeat the
cancellation. (AIErrorType has no dedicated cancellation member, so Unknown is used with
an explicit provider error code.)
ProtectedbuildBuild the ChatResult returned when a request is cancelled mid-flight — a clean, typed failure in the same shape as the driver's other error results.
Process a chat completion request. If streaming is enabled and supported, this will route to the streaming implementation.
Process multiple chat completion requests in parallel. This is useful for:
Array of chat completion parameter objects
Optionalcallbacks: ParallelChatCompletionsCallbacksOptional callbacks for progress and individual completions
Promise resolving to an array of ChatResults in the same order as the input params
Classify text using Azure AI
Classification parameters
Classification result
Clear all additional settings and reset the client
ProtectedcreateProtectedextractExtract thinking content from non-streaming content This method handles case-insensitive extraction of thinking blocks
ProtectedfinalizeCreate the final response from streaming results for Azure AI
Returns the native file input capabilities of this LLM driver, or null if the driver does not support file attachments. Subclasses that accept files (PDFs, images, etc.) should override this method.
ProtectedgetGet the thinking tag format for this provider Providers can override this to customize the thinking tag format
ProtectedhandleTemplate method for handling streaming chat completion This implements the common pattern across providers while delegating provider-specific logic to abstract methods.
ProtectedinitializeInitialize thinking stream state for streaming extraction
ProtectedisTrue when error represents a cancellation of the request rather than a provider failure.
The Azure core pipeline rejects with an AbortError when the supplied abortSignal fires.
OptionalcancellationToken: AbortSignalProtectednonImplementation of non-streaming chat completion for Azure AI
ProtectedprocessProcess streaming chunk with thinking extraction This method handles case-insensitive extraction across chunk boundaries
ProtectedprocessProcess a streaming chunk from Azure AI
ProtectedresetClears per-request streaming state. BaseLLM calls this at the start of every streaming request
and again in its finally, so the captured cancellation token never leaks across requests.
ProtectedresetReset thinking stream state
Sets additional settings required for Azure AI
Azure-specific settings
ProtectedsupportsCheck if the provider supports thinking models Providers should override this to return true if they support thinking extraction
Implementation of the Azure AI Large Language Model AzureLLM