microsoft/semantic-kernel · error · ArgumentException
The option key '{bindingType}.storage_service_endpoint' is r
Error message
The option key '{bindingType}.storage_service_endpoint' is required. What it means
Thrown while constructing an AzureFunctionBinding via GetAzureFunctionBinding. After fetching the required option dict for the given bindingType, it must contain a 'storage_service_endpoint' key whose value is a string. If the key is missing or the value is not a string, ArgumentException is thrown. The endpoint identifies the Azure Storage account backing the function queue.
Source
Thrown at dotnet/src/Agents/AzureAI/Extensions/AgentToolDefinitionExtensions.cs:181
{
throw new ArgumentException("The option keys 'store_name' and 'data_sources' are required for a vector store configuration.");
}
configurations.Add(new VectorStoreConfigurations(storeName, new VectorStoreConfiguration(dataSources)));
}
}
return configurations;
}
private static AzureFunctionBinding GetAzureFunctionBinding(this AgentToolDefinition agentToolDefinition, string bindingType)
{
Verify.NotNull(agentToolDefinition.Options);
var binding = agentToolDefinition.GetRequiredOption<Dictionary<object, object>>(bindingType);
if (!binding.TryGetValue("storage_service_endpoint", out var endpointValue) || endpointValue is not string storageServiceEndpoint)
{
throw new ArgumentException($"The option key '{bindingType}.storage_service_endpoint' is required.");
}
if (!binding.TryGetValue("queue_name", out var nameValue) || nameValue is not string queueName)
{
throw new ArgumentException($"The option key '{bindingType}.queue_name' is required.");
}
return new AzureFunctionBinding(new AzureFunctionStorageQueue(storageServiceEndpoint, queueName));
}
internal static int? GetTopK(this AgentToolDefinition agentToolDefinition)
{
return agentToolDefinition.Options?.TryGetValue("top_k", out var topKValue) ?? false
? int.Parse((string)topKValue!)
: null;
}
internal static string? GetFilter(this AgentToolDefinition agentToolDefinition)
{View on GitHub (pinned to c028a0c7dc)
Solutions
- Add 'storage_service_endpoint' (string) under the binding-type key in the tool options.
- Ensure the value is the full Azure Storage queue service endpoint URL.
Example fix
// before storage_queue: queue_name: myqueue # storage_service_endpoint missing -> throws 165 // after storage_queue: storage_service_endpoint: https://mystorage.queue.core.windows.net queue_name: myqueue
Defensive patterns
Strategy: validation
Validate before calling
var binding = tool.GetRequiredOption<Dictionary<object, object>>(bindingType);
if (!binding.TryGetValue("storage_service_endpoint", out var e) || e is not string)
throw new ArgumentException($"{bindingType}.storage_service_endpoint (string) is required."); Type guard
static bool HasStorageEndpoint(Dictionary<object, object> b) =>
b.TryGetValue("storage_service_endpoint", out var e) && e is string s && !string.IsNullOrEmpty(s); Prevention
- Always set storage_service_endpoint under the binding-type key.
- Validate Azure Function tool binding options before agent creation.
When it happens
Trigger: An Azure Function tool binding (e.g., 'storage_queue') option dictionary lacks 'storage_service_endpoint', or its value is a non-string type.
Common situations: Agent definition YAML missing the storage endpoint for an Azure Function tool; endpoint set to a null or numeric value; bindingType key itself misnamed.
Related errors
- The option key '{bindingType}.queue_name' is required.
- Azure AI Search tool definition must have both 'index_connec
- The option keys 'asset_identifiers' and 'asset_type' are req
- The option keys 'store_name' and 'data_sources' are required
- Invalid kernel selection. {selectedKernelName} is not a vali
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/526305b4149fab3f.
Report an issue: GitHub.