Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 28, 2025

This PR implements Azure AI Search integration for OpenAI models from Azure Foundry, allowing users to leverage internal documentation and knowledge bases that AI models are not trained on.

Summary

This feature adds the ability to use Azure AI Search as a data source when using OpenAI models through Azure Foundry. When enabled, it adds a data_sources field to the API request that allows the model to reference and use documents from the configured search index.

Changes

  • Added Azure AI Search configuration fields to the provider settings schema
  • Updated OpenAICompatible UI component with Azure AI Search configuration options including:
    • Enable/disable toggle
    • Search endpoint and index configuration
    • Authentication settings
    • Embedding model configuration
    • Query type selection
    • Search parameters (top N documents, strictness)
  • Modified openai.ts provider to construct and include the data_sources field when Azure AI Search is enabled
  • Added comprehensive tests for all Azure AI Search functionality
  • Added translation keys for all new UI elements

Testing

  • All existing tests pass
  • Added new test suite specifically for Azure AI Search functionality
  • TypeScript compilation successful for both backend and frontend

Screenshots

The UI now includes an "Enable Azure AI Search" checkbox in the OpenAI Compatible settings. When enabled, users can configure:

  • Azure AI Search endpoint
  • Index name
  • API keys for both search and embedding models
  • Query type (simple, semantic, vector, hybrid options)
  • Number of documents to retrieve
  • Search strictness level

Notes

  • This feature only works when using Azure OpenAI (when "Use Azure" is checked)
  • The implementation follows the Azure AI Foundry API specification for data sources
  • All sensitive information (API keys) are stored securely using VSCode's secret storage

Fixes #6282


Important

Adds Azure AI Search integration to OpenAI models, enabling internal document usage via data_sources field with comprehensive configuration and testing.

  • Behavior:
    • Adds Azure AI Search integration for OpenAI models, enabling use of internal documents via data_sources field.
    • Supports configuration of search endpoint, index, authentication, embedding model, query type, and search parameters.
    • Only works with Azure OpenAI.
  • Configuration:
    • Adds Azure AI Search fields to openAiSchema in provider-settings.ts.
    • Updates OpenAICompatible component with Azure AI Search options.
  • Backend:
    • Modifies OpenAiHandler in openai.ts to include data_sources when Azure AI Search is enabled.
    • Implements buildAzureAiSearchDataSources() to construct data source configuration.
  • Testing:
    • Adds tests in openai.spec.ts to verify Azure AI Search functionality, including cases with/without embedding configuration and different query types.
  • UI:
    • Updates UI in OpenAICompatible.tsx to include Azure AI Search settings.
    • Adds translation keys for new UI elements in settings.json.

This description was created by Ellipsis for 8540bb9. You can customize this summary. It will automatically update as commits are pushed.

- Add Azure AI Search configuration fields to provider settings schema
- Update OpenAICompatible UI component with Azure AI Search options
- Add data_sources field to OpenAI API requests when Azure AI Search is enabled
- Add comprehensive tests for Azure AI Search functionality
- Add translation keys for all Azure AI Search UI elements

Implements #6282
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 28, 2025 05:34
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Jul 28, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 28, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Jul 29, 2025
@daniel-lxs daniel-lxs marked this pull request as draft July 29, 2025 23:08
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 22, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Draft / In Progress size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Adding Azure AI search lookup when using OpenAI models from Azure Foundry as backing models

3 participants