Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 19, 2026

Related GitHub Issue

Closes: #10782

Description

This PR attempts to address Issue #10782 by adding Azure Foundry as a dedicated provider, addressing the request from @NWessel to have a standalone provider that supports:

  • Full URL configuration: Users can provide their complete Azure Foundry endpoint URL, including API version if desired (e.g., ?api-version=2024-06-01-preview)
  • API key authentication: Simple API key-based authentication
  • Model ID configuration: Users can specify their deployment model ID

The dedicated provider avoids Azure-specific parameter incompatibilities (such as prompt_cache_retention) that cause issues when using Azure Foundry through the generic OpenAI provider.

Implementation details:

  • Added "azure-foundry" to provider types and schema in packages/types/src/provider-settings.ts
  • Created AzureFoundryHandler API handler in src/api/providers/azure-foundry.ts
  • Created AzureFoundry settings UI component in webview-ui/src/components/settings/providers/AzureFoundry.tsx
  • Added case in useSelectedModel hook for azure-foundry provider
  • Wired the provider into exports, buildApiHandler, constants, and ApiOptions
  • Added English translations for Azure Foundry UI labels

Test Procedure

  1. Unit tests: Run cd src && npx vitest run api/providers/__tests__/azure-foundry.spec.ts - all 22 tests pass
  2. Type checking: Both cd src && npx tsc --noEmit and cd webview-ui && npx tsc --noEmit pass
  3. Lint: pnpm lint passes with no warnings

Manual testing steps:

  1. Select "Azure Foundry" from the provider dropdown
  2. Enter your Azure Foundry base URL (e.g., https://your-endpoint.openai.azure.com/openai/deployments/your-model/chat/completions?api-version=2024-06-01-preview)
  3. Enter your API key
  4. Enter your model ID
  5. Test chat completions

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

Feedback and guidance are welcome! This is a first attempt at implementing the dedicated Azure Foundry provider as requested.


Important

Adds Azure Foundry as a dedicated provider with full URL configuration, API key authentication, and model ID configuration, avoiding Azure-specific parameter incompatibilities.

  • Behavior:
    • Adds Azure Foundry as a dedicated provider with full URL configuration, API key authentication, and model ID configuration.
    • Avoids Azure-specific parameter incompatibilities like prompt_cache_retention.
  • Implementation:
    • Adds azure-foundry to provider types and schema in provider-settings.ts.
    • Implements AzureFoundryHandler in azure-foundry.ts.
    • Integrates Azure Foundry in buildApiHandler() in index.ts.
  • UI:
    • Adds AzureFoundry component in AzureFoundry.tsx for settings UI.
    • Updates ApiOptions.tsx to include Azure Foundry in provider selection.
    • Adds English translations for Azure Foundry UI labels in settings.json.
  • Testing:
    • Adds unit tests for AzureFoundryHandler in azure-foundry.spec.ts.

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

This adds Azure Foundry as a dedicated provider option, addressing the request
in issue #10782 to have a dedicated provider that supports:
- Full URL configuration (with ability to specify API version)
- API key authentication
- Model ID configuration

The dedicated provider avoids Azure-specific parameter incompatibilities
(such as prompt_cache_retention) that cause issues when using Azure Foundry
through the generic OpenAI provider.

Changes:
- Add "azure-foundry" to provider types and schema
- Create AzureFoundryHandler API handler
- Create AzureFoundry settings UI component
- Add useSelectedModel case for azure-foundry
- Add translations for Azure Foundry UI
- Add comprehensive unit tests
@roomote
Copy link
Contributor Author

roomote bot commented Jan 19, 2026

Rooviewer Clock   See task on Roo Cloud

Reviewed all changes. No issues found.

The implementation correctly adds Azure Foundry as a dedicated provider with:

  • Full URL configuration support (including API version)
  • API key authentication
  • Model ID configuration
  • Proper avoidance of the prompt_cache_retention parameter (the main purpose of this dedicated provider)

All necessary files are properly integrated and unit tests provide comprehensive coverage (22 tests).

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Azure provider to support Azure Foundry

2 participants