You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Adds an Azure AI Foundry resource named `foundry`.
77
-
- Adds an Azure AI Foundry deployment resource named `chat`with a model name of `Phi-4`. The model name must correspond to an [available model](/azure/ai-foundry/foundry-models/concepts/models) in the Azure AI Foundry service.
78
+
- Adds an Azure AI Foundry deployment resource named `chat`using the <xref:Aspire.Hosting.Azure.AIFoundryModel> constant for Phi-4. The model must correspond to an [available model](/azure/ai-foundry/foundry-models/concepts/models) in the Azure AI Foundry service.
78
79
79
-
> [!NOTE]
80
-
> The `format` parameter of the `AddDeployment(...)` method can be found in the Azure AI Foundry portal in the details page of the model, right after the `Quick facts` text.
80
+
> [!TIP]
81
+
> Use the strongly-typed <xref:Aspire.Hosting.Azure.AIFoundryModel> constants to avoid typos and ensure you're using valid model identifiers. These constants are grouped by publisher (for example, `AIFoundryModel.Microsoft.Phi4`, `AIFoundryModel.OpenAI.Gpt4o`).
81
82
82
83
### Configure deployment properties
83
84
84
85
You can customize deployment properties using the <xref:Aspire.Hosting.AzureAIFoundryExtensions.WithProperties*> method:
@@ -143,6 +146,9 @@ When the AppHost starts up, the local foundry service is also started. This requ
143
146
144
147
The <xref:Aspire.Hosting.AzureAIFoundryExtensions.RunAsFoundryLocal*> method configures the resource to run as an emulator. It downloads and loads the specified models locally. The method provides health checks for the local service and automatically manages the Foundry Local lifecycle.
145
148
149
+
> [!TIP]
150
+
> Use the strongly-typed `AIFoundryModel.Local` constants for local development models. These constants are specifically optimized for Foundry Local (for example, `AIFoundryModel.Local.Phi4Mini`, `AIFoundryModel.Local.DeepseekR17b`).
151
+
146
152
### Assign roles to resources
147
153
148
154
You can assign specific roles to resources that need to access the Azure AI Foundry service. Use the <xref:Aspire.Hosting.AzureAIFoundryExtensions.WithRoleAssignments*> method:
The preceding code adds a GitHub Model resource named `chat` using the `openai/gpt-4o-mini` model. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference*> method passes the connection information to the `ExampleProject` project.
51
+
The preceding code adds a GitHub Model resource named `chat` using the <xref:Aspire.Hosting.GitHub.GitHubModel> constant for OpenAI's GPT-4o-mini model. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference*> method passes the connection information to the `ExampleProject` project.
52
+
53
+
> [!TIP]
54
+
> Use the strongly-typed <xref:Aspire.Hosting.GitHub.GitHubModel> constants to avoid typos and ensure you're using valid model identifiers. These constants are grouped by publisher (for example, `GitHubModel.OpenAI.OpenAIGpt4oMini`, `GitHubModel.Microsoft.Phi4MiniInstruct`, `GitHubModel.DeepSeek.DeepSeekV30324`).
51
55
52
56
### Specify an organization
53
57
@@ -57,7 +61,8 @@ For organization-specific requests, you can specify an organization parameter:
@@ -76,7 +81,8 @@ The GitHub Models integration supports multiple ways to configure authentication
76
81
By default, the integration creates a parameter named `{resource_name}-gh-apikey` that automatically falls back to the `GITHUB_TOKEN` environment variable:
@@ -123,14 +131,14 @@ var chat = builder.AddGitHubModel("chat", "openai/gpt-4o-mini")
123
131
124
132
### Available models
125
133
126
-
GitHub Models supports various AI models. Some popular options include:
134
+
GitHub Models supports various AI models. Use the strongly-typed <xref:Aspire.Hosting.GitHub.GitHubModel> constants for the most up-to-date list of available models. Some popular options include:
127
135
128
-
-`openai/gpt-4o-mini`
129
-
-`openai/gpt-4o`
130
-
-`deepseek/DeepSeek-V3-0324`
131
-
-`microsoft/Phi-4-mini-instruct`
136
+
-`GitHubModel.OpenAI.OpenAIGpt4oMini`
137
+
-`GitHubModel.OpenAI.OpenAIGpt41Mini`
138
+
-`GitHubModel.DeepSeek.DeepSeekV30324`
139
+
-`GitHubModel.Microsoft.Phi4MiniInstruct`
132
140
133
-
Check the [GitHub Models documentation](https://docs.github.com/github-models) for the most up-to-date list of available models.
141
+
Check the [GitHub Models documentation](https://docs.github.com/github-models) for more information about these models and their capabilities.
134
142
135
143
## Client integration
136
144
@@ -171,7 +179,6 @@ public class ExampleService(ChatCompletionsClient client)
0 commit comments