-
Notifications
You must be signed in to change notification settings - Fork 684
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
If I deploy a model in AI Foundry via aspire e.g.
var modelDeployment = foundry.AddDeployment("mymodel", "o4-mini", "2025-04-16", "OpenAI")
Firstly, it's hard to know what string it wants on the end i.e. "OpenAI". Could this not be internally resolved from the model name? If not, could there not be a version of this method that takes an enum of the common options rather than a string?
Secondly, when this is deployed, the instance it deploys isn't named "mymodel", it takes on the modelName as the name:

Expected Behavior
The deployment should be named with the name you give it, otherwise you go to reference it later in code and it isn't called what you expect (and you might for whatever reason deploy multiple with different names).
Steps To Reproduce
Deploy an ai model in aspire with a different name to the model name.
Exceptions (if any)
No response
.NET Version info
.NET SDK:
Version: 9.0.304
Commit: f12f5f689e
Workload version: 9.0.300-manifests.ad61bb1c
MSBuild version: 17.14.16+5d8159c5f
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.304\
.NET workloads installed:
[android]
Installation Source: SDK 9.0.300, VS 17.14.36401.2, VS 17.14.36401.2
Manifest Version: 35.0.78/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.78\WorkloadManifest.json
Install Type: Msi
[aspire]
Installation Source: SDK 9.0.300, VS 17.14.36401.2
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi
[ios]
Installation Source: SDK 9.0.300, VS 17.14.36401.2, VS 17.14.36401.2
Manifest Version: 18.5.9214/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.5.9214\WorkloadManifest.json
Install Type: Msi
[maccatalyst]
Installation Source: SDK 9.0.300, VS 17.14.36401.2, VS 17.14.36401.2
Manifest Version: 18.5.9214/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.5.9214\WorkloadManifest.json
Install Type: Msi
[maui-windows]
Installation Source: SDK 9.0.300, VS 17.14.36401.2, VS 17.14.36401.2
Manifest Version: 9.0.51/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.51\WorkloadManifest.json
Install Type: Msi
[wasm-tools]
Installation Source: SDK 9.0.300, VS 17.14.36401.2
Manifest Version: 9.0.8/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.workload.mono.toolchain.current\9.0.8\WorkloadManifest.json
Install Type: Msi
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.8
Architecture: x64
Commit: aae90fa090
.NET SDKs installed:
9.0.304 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Anything else?
No response