Skip to main content
The Azure AI Foundry model provides access to Azure-hosted AI Foundry models.

Parameters

ParameterTypeDefaultDescription
idstr"gpt-4o"The id of the model to use
namestr"AzureAIFoundry"The name of the model
providerstr"Azure"The provider of the model
temperatureOptional[float]NoneControls randomness in the model’s output (0.0 to 2.0)
max_tokensOptional[int]NoneMaximum number of tokens to generate in the response
frequency_penaltyOptional[float]NonePenalizes new tokens based on their frequency in the text so far (-2.0 to 2.0)
presence_penaltyOptional[float]NonePenalizes new tokens based on whether they appear in the text so far (-2.0 to 2.0)
top_pOptional[float]NoneControls diversity via nucleus sampling (0.0 to 1.0)
stopOptional[Union[str, List[str]]]NoneUp to 4 sequences where the API will stop generating further tokens
seedOptional[int]NoneRandom seed for deterministic sampling
model_extrasOptional[Dict[str, Any]]NoneAdditional model-specific parameters
request_paramsOptional[Dict[str, Any]]NoneAdditional parameters to include in the request
api_keyOptional[str]NoneThe API key for Azure AI Foundry (defaults to AZURE_API_KEY env var)
api_versionOptional[str]NoneThe API version to use (defaults to AZURE_API_VERSION env var)
azure_endpointOptional[str]NoneThe Azure endpoint URL (defaults to AZURE_ENDPOINT env var)
timeoutOptional[float]NoneRequest timeout in seconds
max_retriesOptional[int]NoneMaximum number of retries for failed requests
http_clientOptional[httpx.Client]NoneHTTP client instance for making requests
client_paramsOptional[Dict[str, Any]]NoneAdditional parameters for client configuration
I