Skip to content

Commit 8ca03b4

Browse files
Merge pull request #6209 from MicrosoftDocs/main
Auto Publish – main to live - 2025-07-24 22:05 UTC
2 parents 310b7c0 + d0433c5 commit 8ca03b4

16 files changed

+76
-40
lines changed

articles/ai-foundry/agents/how-to/use-your-own-resources.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: cognitive-services
66
manager: nitinme
77
ms.service: azure-ai-agent-service
88
ms.topic: how-to
9-
ms.date: 06/18/2025
9+
ms.date: 07/23/2025
1010
author: aahill
1111
ms.author: aahi
1212
ms.reviewer: fosteramanda
@@ -19,7 +19,29 @@ Use this article if you want to set up your Foundry project with your own resour
1919

2020
## Limitations
2121

22-
**Use Azure Cosmos DB for NoSQL to store threads**
22+
There are some limitations you should be aware of when you plan to use existing resources with the Azure AI Foundry Agent Service.
23+
24+
### If you are using a hub-based project or Azure OpenAI Assistants
25+
26+
At this time, there is no direct upgrade path to migrate existing agents or their associated data assets such as files, threads, or vector stores from a hub-based project to an Azure AI Foundry project. There is also no upgrade path to convert existing Azure OpenAI Assistants into Foundry Agents, nor a way to automatically migrate Assistants' files, threads, or vector stores.
27+
28+
You can reuse your existing model deployments and quota from Azure AI Services or Azure OpenAI resources within a Foundry project.
29+
30+
### SDK usage with hub-based projects
31+
32+
Starting in May 2025, the Azure AI Agent Service uses an endpoint for [Foundry projects](../../what-is-azure-ai-foundry.md#project-types) instead of the connection string that was used for hub-based projects before this time. Connection strings are no longer supported in current versions of the SDKs and REST API. We recommend creating a new foundry project.
33+
34+
If you want to continue using your hub-based project and connection string, you will need to:
35+
* Use the connection string for your project located under **Connection string** in the overview of your project.
36+
37+
:::image type="content" source="../../media/quickstarts/azure-ai-sdk/connection-string.png" alt-text="A screenshot showing the legacy connection string for a hub-based project.":::
38+
39+
* Use one of the previous versions of the SDK and the associated sample code:
40+
* [C#](https://github.com/Azure/azure-sdk-for-net/tree/feature/azure-ai-agents/sdk/ai/Azure.AI.Projects/samples): `1.0.0-beta.2` or earlier
41+
* [Python](https://github.com/Azure/azure-sdk-for-python/tree/feature/azure-ai-projects-beta10/sdk/ai/azure-ai-projects/samples/agents): `1.0.0b10` or earlier
42+
43+
### Azure Cosmos DB for NoSQL to store threads
44+
2345
- Your existing Azure Cosmos DB for NoSQL account used in a [standard setup](#choose-basic-or-standard-agent-setup) must have a total throughput limit of at least 3000 RU/s. Both provisioned throughput and serverless are supported.
2446
- Three containers will be provisioned in your existing Cosmos DB account, each requiring 1000 RU/s
2547

@@ -70,7 +92,7 @@ Includes everything in the basic setup and fine-grained control over your data b
7092

7193
## Basic agent setup: Use an existing Azure OpenAI resource
7294

73-
Replace the parameter value for `existingAoaiResourceId` with the full arm resource ID of the Azure OpenAI resource you want to use.
95+
Replace the parameter value for `existingAoaiResourceId`in the [template](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/infrastructure-setup/42-basic-agent-setup-with-customization) with the full arm resource ID of the Azure OpenAI resource you want to use.
7496

7597
1. To get the Azure OpenAI account resource ID, sign in to the Azure CLI and select the subscription with your AI Services account:
7698
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
manager: nitinme
3+
author: aahill
4+
ms.author: aahi
5+
ms.service: azure-ai-agent-service
6+
ms.topic: include
7+
ms.date: 07/23/2025
8+
---
9+
10+
> [!IMPORTANT]
11+
> Starting in May 2025, the Azure AI Agent Service uses an endpoint for [Foundry projects](../../what-is-azure-ai-foundry.md#project-types) instead of the connection string that was previously used for hub-based projects. If you're using a hub-based project, you won't be able to use the current versions of the SDK and REST API. For more information, see [SDK usage with hub-based projects](../how-to/use-your-own-resources.md#sdk-usage-with-hub-based-projects).

articles/ai-foundry/agents/includes/quickstart-csharp.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ Use the following code to create and run an agent. To run this code, you will ne
4646

4747
`https://<AIFoundryResourceName>.services.ai.azure.com/api/projects/<ProjectName>`
4848

49-
[!INCLUDE [endpoint-string-portal](endpoint-string-portal.md)]
50-
51-
For example, your endpoint may look something like:
49+
[!INCLUDE [connection-string-deprecation](connection-string-deprecation.md)]
5250

53-
`https://myresource.services.ai.azure.com/api/projects/myproject`
51+
[!INCLUDE [endpoint-string-portal](endpoint-string-portal.md)]
5452

55-
Set this endpoint in an environment variable variable named `ProjectEndpoint`.
53+
Set this endpoint in an environment variable named `ProjectEndpoint`.
5654

5755
[!INCLUDE [model-name-portal](model-name-portal.md)]
5856

articles/ai-foundry/agents/includes/quickstart-python.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ Use the following code to create and run an agent. To run this code, you will ne
4343

4444
`https://<AIFoundryResourceName>.services.ai.azure.com/api/projects/<ProjectName>`
4545

46+
[!INCLUDE [connection-string-deprecation](connection-string-deprecation.md)]
47+
4648
[!INCLUDE [endpoint-string-portal](endpoint-string-portal.md)]
4749

48-
For example, your endpoint may look something like:
50+
Set this endpoint as an environment variable named `PROJECT_ENDPOINT`.
4951

50-
`https://myresource.services.ai.azure.com/api/projects/myproject`
52+
[!INCLUDE [model-name-portal](model-name-portal.md)]
5153

52-
Set this endpoint as an environment variable named `PROJECT_ENDPOINT`.
54+
Save the name of your model deployment name as an environment variable named `MODEL_DEPLOYMENT_NAME`.
5355

5456
```python
5557
import os

articles/ai-foundry/agents/includes/quickstart-typescript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ Use the following code to create and run an agent which uploads [a CSV file](htt
5858

5959
[!INCLUDE [endpoint-string-portal](endpoint-string-portal.md)]
6060

61-
For example, your endpoint looks something like:
61+
Set this endpoint as an environment variable named `PROJECT_ENDPOINT` in a `.env` file.
6262

63-
`https://myresource.services.ai.azure.com/api/projects/myproject`
63+
[!INCLUDE [model-name-portal](model-name-portal.md)]
6464

65-
Set this endpoint as an environment variable named `PROJECT_ENDPOINT` in a `.env` file.
65+
Save the name of your model deployment name as an environment variable named `MODEL_DEPLOYMENT_NAME`.
6666

6767
> [!IMPORTANT]
6868
> * This quickstart code uses environment variables for sensitive configuration. Never commit your `.env` file to version control by making sure `.env` is listed in your `.gitignore` file.

articles/ai-foundry/concepts/rbac-azure-ai-foundry.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Here's a table of the built-in roles and their permissions for the hub:
270270
| --- | --- |
271271
| Owner | Full access to the hub, including the ability to manage and create new hubs and assign permissions. This role is automatically assigned to the hub creator|
272272
| Contributor | User has full access to the hub, including the ability to create new hubs, but isn't able to manage hub permissions on the existing resource. |
273-
| Azure AI Administrator (preview) | This role is automatically assigned to the system-assigned managed identity for the hub. The Azure AI Administrator role has the minimum permissions needed for the managed identity to perform its tasks. For more information, see [Azure AI Administrator role (preview)](#azure-ai-administrator-role-preview). |
273+
| Azure AI Administrator | This role is automatically assigned to the system-assigned managed identity for the hub. The Azure AI Administrator role has the minimum permissions needed for the managed identity to perform its tasks. For more information, see [Azure AI Administrator role](#azure-ai-administrator-role). |
274274
| Azure AI Developer | Perform all actions except create new hubs and manage the hub permissions. For example, users can create projects, compute, and connections. Users can assign permissions within their project. Users can interact with existing Azure AI resources such as Azure OpenAI, Azure AI Search, and Azure AI services. |
275275
| Azure AI Inference Deployment Operator | Perform all actions required to create a resource deployment within a resource group. |
276276
| Reader | Read only access to the hub. This role is automatically assigned to all project members within the hub. |
@@ -279,14 +279,10 @@ The key difference between Contributor and Azure AI Developer is the ability to
279279

280280
Only the Owner and Contributor roles allow you to make a hub. At this time, custom roles can't grant you permission to make hubs.
281281

282-
### Azure AI Administrator role (preview)
282+
### Azure AI Administrator role
283283

284284
Before 11/19/2024, the system-assigned managed identity created for the hub was automatically assigned the __Contributor__ role for the resource group that contains the hub and projects. Hubs created after this date have the system-assigned managed identity assigned to the __Azure AI Administrator__ role. This role is more narrowly scoped to the minimum permissions needed for the managed identity to perform its tasks.
285285

286-
The __Azure AI Administrator__ role is currently in public preview.
287-
288-
[!INCLUDE [feature-preview](../includes/feature-preview.md)]
289-
290286
The __Azure AI Administrator__ role has the following permissions:
291287

292288
```json
@@ -419,7 +415,7 @@ Here's a table of the built-in roles and their permissions for the project:
419415
| --- | --- |
420416
| Owner | Full access to the project, including the ability to assign permissions to project users. |
421417
| Contributor | User has full access to the project but can't assign permissions to project users. |
422-
| Azure AI Administrator (preview) | This role is automatically assigned to the system-assigned managed identity for the hub. The Azure AI Administrator role has the minimum permissions needed for the managed identity to perform its tasks. For more information, see [Azure AI Administrator role (preview)](#azure-ai-administrator-role-preview). |
418+
| Azure AI Administrator | This role is automatically assigned to the system-assigned managed identity for the hub. The Azure AI Administrator role has the minimum permissions needed for the managed identity to perform its tasks. For more information, see [Azure AI Administrator role](#azure-ai-administrator-role). |
423419
| Azure AI Developer | User can perform most actions, including create deployments, but can't assign permissions to project users. |
424420
| Azure AI Inference Deployment Operator | Perform all actions required to create a resource deployment within a resource group. |
425421
| Reader | Read only access to the project. |
@@ -767,4 +763,4 @@ If you create a new hub and encounter errors with the new default role assignmen
767763
- [How to create an Azure AI Foundry project](../how-to/create-projects.md)
768764
- [How to create a connection in Azure AI Foundry portal](../how-to/connections-add.md)
769765
770-
::: zone-end
766+
::: zone-end

articles/ai-foundry/how-to/develop/trace-application.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ When developing with the OpenAI SDK, you can instrument your code so traces are
116116
1. Use the OpenAI SDK as usual:
117117

118118
```python
119-
client = project_client.get_azure_openai_client()
119+
client = project_client.inference.get_azure_openai_client()
120120

121121
response = client.chat.completions.create(
122122
model="deepseek-v3-0324",
@@ -194,7 +194,7 @@ When developing with the OpenAI SDK, you can instrument your code so traces are
194194

195195
## Trace to console
196196

197-
It may be useful to also trace your application and send the traces to the local execution console. Such approach may result beneficial when running unit tests or integration tests in your application using an automated CI/CD pipeline. Traces can be sent to the console and captured by your CI/CD tool to further analysis.
197+
It may be useful to also trace your application and send the traces to the local execution console. Such approach may be beneficial when running unit tests or integration tests in your application using an automated CI/CD pipeline. Traces can be sent to the console and captured by your CI/CD tool to further analysis.
198198

199199
Configure tracing as follows:
200200

articles/ai-foundry/openai/how-to/fine-tune-test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The following example shows how to use the REST API to create a model deployment
9090

9191

9292
```bash
93-
curl -X POST "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>api-version=2025-04-01-preview" \
93+
curl -X POST "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2025-04-01-preview" \
9494
-H "Authorization: Bearer <TOKEN>" \
9595
-H "Content-Type: application/json" \
9696
-d '{
@@ -203,7 +203,7 @@ To use the [Deployments - Delete REST API](/rest/api/aiservices/accountmanagemen
203203
Below is the REST API example to delete a deployment:
204204

205205
```bash
206-
curl -X DELETE "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>api-version=2025-04-01-preview" \
206+
curl -X DELETE "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2025-04-01-preview" \
207207
-H "Authorization: Bearer <TOKEN>"
208208
```
209209

articles/ai-foundry/openai/how-to/fine-tuning-deploy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The following example shows how to use the REST API to create a model deployment
197197

198198

199199
```bash
200-
curl -X POST "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>api-version=2024-10-21" \
200+
curl -X POST "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2024-10-21" \
201201
-H "Authorization: Bearer <TOKEN>" \
202202
-H "Content-Type: application/json" \
203203
-d '{
@@ -231,7 +231,7 @@ The only limitations are that the new region must also support fine-tuning and w
231231
Below is an example of deploying a model that was fine-tuned in one subscription/region to another.
232232

233233
```bash
234-
curl -X PUT "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>api-version=2024-10-21" \
234+
curl -X PUT "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2024-10-21" \
235235
-H "Authorization: Bearer <TOKEN>" \
236236
-H "Content-Type: application/json" \
237237
-d '{
@@ -401,7 +401,7 @@ To delete a deployment, use the [Deployments - Delete REST API](/rest/api/aiserv
401401
Below is the REST API example to delete a deployment:
402402

403403
```bash
404-
curl -X DELETE "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>api-version=2024-10-21" \
404+
curl -X DELETE "https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<RESOURCE_NAME>/deployments/<MODEL_DEPLOYMENT_NAME>?api-version=2024-10-21" \
405405
-H "Authorization: Bearer <TOKEN>"
406406
```
407407

articles/ai-foundry/openai/how-to/prompt-caching.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ services: cognitive-services
66
manager: nitinme
77
ms.service: azure-ai-openai
88
ms.topic: how-to
9-
ms.date: 07/23/2025
9+
ms.date: 07/24/2025
1010
author: mrbullwinkle
1111
ms.author: mbullwin
1212
recommendations: false
1313
---
1414

1515
# Prompt caching
1616

17-
Prompt caching allows you to reduce overall request latency and cost for longer prompts that have identical content at the beginning of the prompt. *"Prompt"* in this context is referring to the input you send to the model as part of your chat completions request. Rather than reprocess the same input tokens over and over again, the service is able to retain a temporary cache of processed input token computations to improve overall performance. Prompt caching has no impact on the output content returned in the model response beyond a reduction in latency and cost. For supported models, cached tokens are billed at a [discount on input token pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) for Standard deployment types and up to [100% discount on input tokens](/azure/ai-services/openai/concepts/provisioned-throughput) for Provisioned deployment types. If you provide the `user` parameter, it's combined with a prefix hash, allowing you to influence routing and improve cache hit rates. This is especially beneficial when many requests share long, common prefixes.
17+
Prompt caching allows you to reduce overall request latency and cost for longer prompts that have identical content at the beginning of the prompt. *"Prompt"* in this context is referring to the input you send to the model as part of your chat completions request. Rather than reprocess the same input tokens over and over again, the service is able to retain a temporary cache of processed input token computations to improve overall performance. Prompt caching has no impact on the output content returned in the model response beyond a reduction in latency and cost. For supported models, cached tokens are billed at a [discount on input token pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) for Standard deployment types and up to [100% discount on input tokens](/azure/ai-services/openai/concepts/provisioned-throughput) for Provisioned deployment types.
1818

1919
Caches are typically cleared within 5-10 minutes of inactivity and are always removed within one hour of the cache's last use. Prompt caches aren't shared between Azure subscriptions.
2020

@@ -27,13 +27,15 @@ Caches are typically cleared within 5-10 minutes of inactivity and are always re
2727

2828
Official support for prompt caching was first added in API version `2024-10-01-preview`. At this time, only the o-series model family supports the `cached_tokens` API response parameter.
2929

30-
## Get started
30+
## Getting started
3131

3232
For a request to take advantage of prompt caching the request must be both:
3333

3434
- A minimum of 1,024 tokens in length.
3535
- The first 1,024 tokens in the prompt must be identical.
3636

37+
Requests are routed based on a hash of the initial prefix of a prompt.
38+
3739
When a match is found between the token computations in a prompt and the current content of the prompt cache, it's referred to as a cache hit. Cache hits will show up as [`cached_tokens`](/azure/ai-services/openai/reference-preview#cached_tokens) under [`prompt_tokens_details`](/azure/ai-services/openai/reference-preview#properties-for-prompt_tokens_details) in the chat completions response.
3840

3941
```json
@@ -63,6 +65,8 @@ After the first 1,024 tokens cache hits will occur for every 128 additional iden
6365

6466
A single character difference in the first 1,024 tokens will result in a cache miss which is characterized by a `cached_tokens` value of 0. Prompt caching is enabled by default with no additional configuration needed for supported models.
6567

68+
If you provide the [`user`](/azure/ai-foundry/openai/reference-preview-latest#request-body-2) parameter, it's combined with the prefix hash, allowing you to influence routing and improve cache hit rates. This is especially beneficial when many requests share long, common prefixes.
69+
6670
## What is cached?
6771

6872
o1-series models feature support varies by model. For more information, see our dedicated [reasoning models guide](./reasoning.md).

0 commit comments

Comments
 (0)