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
@@ -59,45 +59,6 @@ When creating capability hosts, be aware of these important constraints to avoid
59
59
> [!IMPORTANT]
60
60
> **One capability host per scope**: Each account and each project can only have one active capability host. Attempting to create a second capability host with a different name at the same scope will result in a 409 conflict.
61
61
62
-
### Common 409 conflict scenarios
63
-
64
-
#### 1. **Multiple capability hosts per scope**
65
-
66
-
**What happens:** You try to create a capability host with a different name when one already exists at the same scope (account or project level).
67
-
68
-
**Error example:**
69
-
```json
70
-
{
71
-
"error": {
72
-
"code": "Conflict",
73
-
"message": "There is an existing Capability Host with name: existing-host, provisioning state: Succeeded for workspace: /subscriptions/.../workspaces/my-workspace, cannot create a new Capability Host with name: new-host for the same ClientId."
74
-
}
75
-
}
76
-
```
77
-
78
-
**How to avoid:**
79
-
-**Check existing capability hosts first** before creating new ones
80
-
-**Use consistent naming** across all requests for the same scope
81
-
-**Query existing resources** to understand current state
82
-
83
-
#### 2. **Concurrent operations**
84
-
85
-
**What happens:** You try to create a capability host while another operation (update, delete, modify) is in progress at the same scope.
86
-
87
-
**Error example:**
88
-
```json
89
-
{
90
-
"error": {
91
-
"code": "Conflict",
92
-
"message": "Create: Capability Host my-host is currently in non creating, retry after its complete: /subscriptions/.../workspaces/my-workspace"
93
-
}
94
-
}
95
-
```
96
-
97
-
**How to avoid:**
98
-
-**Monitor operation status** before making new requests
99
-
-**Wait for operations to complete** before starting new ones
100
-
101
62
### Best practices to prevent conflicts
102
63
103
64
#### 1. **Pre-request validation**
@@ -159,7 +120,9 @@ A capability host must be configured with the following three properties at eith
|`aiServicesConnections`| Use your own model deployments | Azure OpenAI | When you want to use models from your existing Azure OpenAI resource instead of the built-in account level ones. |
161
122
162
-
**Account capability host**
123
+
### Account capability host
124
+
Create an account-level capability host that provides shared defaults:
125
+
163
126
```http
164
127
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/capabilityHosts/{name}?api-version=2025-06-01
165
128
@@ -169,7 +132,9 @@ PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{
169
132
}
170
133
}
171
134
```
172
-
**Project capability host**
135
+
136
+
### Project capability host
137
+
Create a project-level capability host that overrides service defaults and any account-level settings:
173
138
174
139
```http
175
140
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/capabilityHosts/{name}?api-version=2025-06-01
@@ -185,6 +150,18 @@ PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{
**What happens:** You try to create a capability host with a different name when one already exists at the same scope (account or project level).
210
+
211
+
**Error example:**
212
+
```json
213
+
{
214
+
"error": {
215
+
"code": "Conflict",
216
+
"message": "There is an existing Capability Host with name: existing-host, provisioning state: Succeeded for workspace: /subscriptions/.../workspaces/my-workspace, cannot create a new Capability Host with name: new-host for the same ClientId."
217
+
}
218
+
}
219
+
```
220
+
221
+
**How to avoid:**
222
+
-**Check existing capability hosts first** before creating new ones
223
+
-**Use consistent naming** across all requests for the same scope
224
+
-**Query existing resources** to understand current state
225
+
226
+
#### 2. **Concurrent operations**
227
+
228
+
**What happens:** You try to create a capability host while another operation (update, delete, modify) is in progress at the same scope.
229
+
230
+
**Error example:**
231
+
```json
232
+
{
233
+
"error": {
234
+
"code": "Conflict",
235
+
"message": "Create: Capability Host my-host is currently in non creating, retry after its complete: /subscriptions/.../workspaces/my-workspace"
236
+
}
237
+
}
238
+
```
239
+
240
+
**How to avoid:**
241
+
-**Monitor operation status** before making new requests
242
+
-**Wait for operations to complete** before starting new ones
0 commit comments