ITADN
Azure-Samples/azure-search-openai-demo

版本发布 8

2025-11-03: Port from AzureOpenAI to OpenAI constructors2025-11-03
? · 2025-11-03

Thanks to a recent improvement in the openai Python SDK and changes in the Azure OpenAI endpoint, we can now use OpenAI to connect to AzureOpenAI endpoint. The new Azure OpenAI endpoint is at "/openai/v1/" and does not accept an API version parameter, so we were able to remove the API version parameter entirely from this codebase, and simplify the code to only use the OpenAI() constructor. If you merge in this change and see an OpenAI connection error locally, please make sure you have upgraded your local openai package version. You must have the version that accepts a token provider callback as the api_key parameter, otherwise you'll get an error about incorrect key/resource. ## What's Changed * Migrate AzureOpenAI constructors to standard OpenAI client by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2752 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-10-29...2025-11-03

2025-10-29: Support Python 3.14 and drop support for 3.92025-10-29
? · 2025-10-29

Python 3.14 is now the default version of Python downloaded from Python.org. We've upgraded all packages so that they should work in Python 3.14 environments. We've dropped 3.9 since it is reaching end-of-life and since many packages dropped 3.9 support when they added 3.14 support (like Pillow). Please update your local development environments to run at least 3.10. ## What's Changed * Bump flask from 3.0.3 to 3.1.2 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2803 * Bump httpx from 0.27.0 to 0.28.1 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2810 * Bump @types/dom-speech-recognition from 0.0.4 to 0.0.7 in /app/frontend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2807 * Add Python 3.14 support and drop Python 3.9 by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2787 * Bump click from 8.1.8 to 8.3.0 in the pallets group by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2808 * Bump the github-actions group across 1 directory with 4 updates by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2783 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-10-28...2025-10-29

2025-10-28: Upgraded ACLs to use Azure AI Search Query-time ACL 2025-10-28
? · 2025-10-28

This release makes a [significant change](https://github.com/Azure-Samples/azure-search-openai-demo/pull/2771) to our optional ACL feature, which builds on the login feature. Previously we implemented access controls by storing oids and groups in the search index for each chunk, and dynamically building a search filter based off the oids/groups in the logged in user's token. Now, Azure AI Search has [built-in support](https://learn.microsoft.com/azure/search/search-query-access-control-rbac-enforcement) to filter documents based off a user's token, so we keep the same index setup, but we delegate the filtering to the AI Search query itself. If you already have the ACL feature enabled, you should be able to pull in the new changes, run "azd up", and have prepdocs setup the new permission filtering option on the index. If you have the `AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS` option enabled, then you'll also need to run [the migration script](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/login_and_acl.md#migrate-to-built-in-document-access-control) to explicitly add a global identifier to the ACLs for those documents. Please also ensure that your azd environment has `AZURE_ENFORCE_ACCESS_CONTROL`, as we discovered some code paths weren't requiring that before (but do now). If you are new to using the feature, please read through the [login and ACL developer's guide](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/login_and_acl.md] to learn more. ## What's Changed * Better support for coding agents by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2725 * added polish locales by @michuhu in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2729 * Bump jiter from 0.8.2 to 0.11.0 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2731 * Bump msal from 1.30.0 to 1.33.0 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2713 * Resolve issues with colliding private endpoint names, and redundant private endpoints by @kachihro in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2740 * Add missing set in command by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2746 * Add tests for auth_init.py by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2741 * Bump oauthlib from 3.2.2 to 3.3.1 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2747 * Sanitize image markdown in sources by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2765 * Restrict locations due to App Insights components availability by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2764 * Add 'australiaeast' to allowed regions by @kachihro in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2770 * Bump multidict from 6.0.5 to 6.7.0 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2768 * Group telemetry together for pip updates by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2792 * Bump prismjs and react-syntax-highlighter in /app/frontend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2791 * Bump the telemetry group with 21 updates by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2793 * Add dependabot group for pydantic by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2795 * Bump markupsafe from 2.1.5 to 3.0.3 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2794 * Bump vite from 5.4.19 to 6 in /app/frontend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2782 * Bump pypdf from 6.0.0 to 6.1.3 in /app/backend by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2799 * Bump rapidfuzz from 3.13.0 to 3.14.1 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2798 * Bump asgiref from 3.8.1 to 3.10.0 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2797 * Update link thats now 404ing by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2801 * Bump the pydantic group with 2 updates by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2796 * Switch from security filter to built-in ACL enforcement by @mattgotteiner in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2771 ## New Contributors * @michuhu made their first contribution in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2729 * @kachihro made their first contribution in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2740 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-09-11...2025-10-28

2025-08-29: New approach to multimodal RAG2025-08-29
? · 2025-08-29

This release introduces a large change, a new approach to multimodal RAG based off learnings from our original vision feature: The new multimodal approach affects both data ingestion and the RAG flow. During data ingestion, the prepdocs script will: * extract images (using Azure Document Intelligence) and stores them separately in Azure Blob storage * compute embeddings of extracted images using Azure AI Vision * Use LLM to describe the images inside the text chunk, and embed that description inside the text chunk * associate each text chunk in the Azure AI Search index with any nearby images During the RAG flow, the Chat and Ask approaches will: * [Optionally] perform a multivector search on both text and image embeddings * [Optionally] send images associated with search results to the multimodal LLM Here's what it looks like in the UI: ![Screenshot of app with Developer Settings open, showing multimodal settings highlighted](https://github.com/Azure-Samples/azure-search-openai-demo/raw/main/docs/images/multimodal.png) For more information: * Read the [multimodal guide in the docs](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/multimodal.md) * See the [Pull Request](https://github.com/Azure-Samples/azure-search-openai-demo/pull/2558) * Watch a [demo video](https://www.youtube.com/watch?v=3RujWrBmjsc) This is a significant change, so it will be difficult to merge into existing forks of the repository. We know that developers like when it is easy to merge in new features, but we realized we needed to do some refactoring to achieve the goals. If you're merging into an existing branch, the best approach is probably to review the PR to understand the scope of the changes. Notably, we removed the separate *Vision approaches, and integrated multimodal directly into the main Chat/Ask approaches. For those of you who are using integrated vectorization or the new agentic retrieval feature, the multimodal support is not yet fully compatible with those, but we will prioritize compatibility for a release in the near future. ## What's Changed * Add GPT-5 evals and "minimal" to reasoning dropdown by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2671 * Adding custom debug chat mode for GitHub Copilot Agent mode development by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2672 * Use lowest reasoning effort appropriate for a model by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2673 * Improved custom chat mode and Copilot instructions file by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2681 * Update error message to be platform agnostic by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2682 * Bump Azure/setup-azd from 2.1.0 to 2.2.0 in the github-actions group by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2669 * Add additional eval results for gpt-5-mini by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2683 * Bump actions/checkout from 4 to 5 in the github-actions group by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2684 * Bump pypdf from 4.3.1 to 6.0.0 in /app/backend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2674 * Add markdownlint extension by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2689 * Hyperlink leads to random Korean betting website by @Daimler-Garay in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2691 * Fix a11y landmark issue and add Axe Playwright test by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2687 * Add test coverage to CI workflow by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2690 * Bump azure-monitor-opentelemetry from 1.6.1 to 1.6.13 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2663 * Fix useAgenticRetrieval missing Japanese translations by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2694 * Initialize MSAL before use to fix auth regression by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2685 * New approach to multimodal document ingestion by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2558 ## New Contributors * @Daimler-Garay made their first contribution in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2691 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-08-07...2025-08-29

2025-08-04a: Support for o3 and o4-mini2025-08-04
? · 2025-08-04

The only significant feature change in this release is the support of the o3 and o4-mini models when using [reasoning. The other changes were dependency upgrades and a new [architecture documentation page](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/architecture.md). ## What's Changed * Bump urllib3 from 2.2.2 to 2.5.0 in /app/backend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2581 * Update README.md with Foundry buttons, RAG Deep Dive link by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2587 * Bump attrs from 24.2.0 to 25.3.0 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2563 * Bump python-dotenv from 1.0.1 to 1.1.1 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2588 * Bump requests from 2.32.3 to 2.32.4 in /app/backend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2566 * Bump std-uritemplate from 2.0.3 to 2.0.5 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2536 * Upgrade h11 dependency by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2596 * Updates to add latest omni models, upgrade package lock by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2597 * Bump soupsieve from 2.6 to 2.7 by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2601 * Bump aiohttp from 3.10.11 to 3.12.14 in /app/backend by @dependabot[bot] in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2606 * Remove conditional Azure login steps and simplify authentication in deployment workflows by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2625 * Fix Dependabot MSAL package upgrade by updating compatible versions by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2632 * Upgrade rapidfuzz from 3.12.1 to 3.13.0 to fix failed Dependabot PR #2504 by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2646 * Fix Vite 7.0.6 upgrade by updating @vitejs/plugin-react to v4.7.0 by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2630 * Add comprehensive Mermaid architecture diagrams for application documentation by @Copilot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2653 * Revert vite to earlier version for node v20.14 compatibility by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2657 ## New Contributors * @Copilot made their first contribution in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2625 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-06-03...2025-08-04

2025-06-03: Default chat completion model is gpt-4.1-mini2025-06-03
? · 2025-06-03

After careful consideration and evaluation, the new default chat completion model for the RAG flow is gpt-4.1-mini. This model is slightly more expensive than gpt-4o-mini, but has significantly better industry benchmarks and RAG evaluation results than gpt-4o-mini. You can still point your application at any GPT model, following the steps in [the documentation](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/deploy_features.md#using-different-chat-completion-models). There's also new documentation available, about the [HTTP protocol used between backend and frontend](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/http_protocol.md). ## What's Changed * Fix: UploadFile button incorrectly disabled when user is logged in by @AstroMC98 in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2545 * Remove earth_at_night_508.pdf from data folder by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2547 * Disable ThoughtProcess/SupportingContent buttons during streaming by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2548 * Bump typing-extensions from 4.12.2 to 4.13.2 by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2505 * Bump pymupdf from 1.25.1 to 1.26.0 by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2546 * Add HTTP protocol doc by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2549 * Switch to gpt-41-mini as default chat model by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2557 ## New Contributors * @AstroMC98 made their first contribution in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2545 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-05-23...2025-06-03

2025-05-08: Default to text-embedding-3-large, compression optimization, GlobalStandard SKU2025-05-08
? · 2025-05-09

This release upgrades the infrastructure and code to default to the text-embedding-3-large model from OpenAI. The model has a maximum dimensions of 3072, but we are using BinaryQuantizationCompression and truncating the dimensions to 1024, with oversampling and rescoring enabled. That means the embeddings will be stored efficiently, but search quality should remain high. Learn more about compression from [this RAG time episode](https://github.com/microsoft/rag-time/blob/main/Journey%203%20-%20Optimize%20your%20Vector%20Index%20for%20Scale/README.md) or [Azure AI Search documentation](https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-quantization?tabs=2024-07-01%2Cquery-2024-07-01). If you are already using the repository and don't wish to use the new embedding model, you can continue to use text-embedding-ada-002. You may need to set azd environment variables if they aren't already set, see the [embedding models customization guide](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/deploy_features.md#using-different-embedding-models). If you want to switch over to the new embedding model, you will either need to re-ingest your data from scratch in a new index, or you will need to add a new field for the new model and re-generate embeddings for just that field. The code now has a variable for the embedding column field, so it should be possible to have a search index with fields for two different embedding models. Please let us know in the issue tracker if you encounter any issues with the new default embedding model configuration. ## What's Changed * Upgrade syntax to Python 3.9 by @tonybaloney in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2484 * Remove outdated docs by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2492 * Use ENFORCE_ACCESS_CONTROL to decide whether to make acls by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2494 * Bump idna from 3.8 to 3.10 by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2464 * Bump vite from 5.4.14 to 5.4.18 in /app/frontend by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2486 * Bump types-html5lib from 1.1.11.20240806 to 1.1.11.20241018 by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2462 * Bump msal-extensions from 1.2.0 to 1.3.1 by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2463 * Update reasoning docs to include API version by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2499 * Bump @babel/runtime from 7.25.6 to 7.27.0 in /app/frontend by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2497 * Upgrade Bicep versions of resources by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2500 * Add missing output for reasoning effort, updated evals including o3-mini by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2501 * Resolve datetime deprecation warnings by @emmanuel-ferdman in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2502 * Upgrade to text-embedding-3-large model as default, with vector storage optimizations by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2470 * Update evals requirements by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2528 * Raise minimum node version by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2519 * Add migration script for Azure Cosmos DB, old container to new container by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2442 * Bump astral-sh/setup-uv from 5 to 6 in the github-actions group by @dependabot in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2512 ## New Contributors * @emmanuel-ferdman made their first contribution in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2502 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-04-02...2025-05-08

2025-04-02: Support for reasoning models and token usage display2025-04-02
? · 2025-04-03

You can now optionally use a reasoning model (o1 or o3-mini) for all chat completion requests, following the [reasoning guide](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/reasoning.md). When using a reasoning model, you can select the reasoning effort (low/medium/high): ![Screenshot of developer settings with reasoning model](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/images/reasoning.png) For all models, you can now see token usage in the "Thought process" tab: ![Display of token usage counts](https://github.com/user-attachments/assets/d9658291-36c6-4fb4-a89f-fa4bc590e115) Reasoning models incur more latency, due to the thinking process, so it is an option for developers to try, but not necessarily what you want to use for most RAG domains. This PR also includes several fixes for performance, Windows support, and deployment. ## What's Changed * Add quotes to azd env set by @mattgotteiner in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2413 * Upgrade ms graph SDK packages to remove pendulum dependency by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2454 * Reduce list to only the available ones for gpt-4o-mini/Standard by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2459 * Add support for reasoning models and token usage display by @mattgotteiner in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2448 * Upgrade prompty by @pamelafox in https://github.com/Azure-Samples/azure-search-openai-demo/pull/2475 **Full Changelog**: https://github.com/Azure-Samples/azure-search-openai-demo/compare/2025-03-26...2025-04-02