Skip to content

feat: add Azure OpenAI provider support#3675

Closed
haxudev wants to merge 7 commits intoopenclaw:mainfrom
haxudev:main
Closed

feat: add Azure OpenAI provider support#3675
haxudev wants to merge 7 commits intoopenclaw:mainfrom
haxudev:main

Conversation

@haxudev
Copy link
Copy Markdown
Contributor

@haxudev haxudev commented Jan 29, 2026

This pull request adds first-class support for Azure OpenAI as a model provider, enabling the system to connect to Azure-hosted OpenAI models using environment variables or Docker Compose configuration. The main changes include a new provider implementation, updates to environment variable handling, and a dedicated Docker Compose file for Azure deployments.

Azure OpenAI Provider Integration:

  • Added a new module azure-openai-provider.ts that implements Azure OpenAI provider logic, including endpoint formatting, authentication, environment variable resolution, and support for multiple deployments. This module also provides a global fetch wrapper to ensure the required api-version parameter is always included in requests.

  • Updated the provider discovery logic in models-config.providers.ts to automatically detect Azure OpenAI configuration from environment variables or authentication profiles, and instantiate the Azure provider if detected. [1] [2]

Environment & Configuration:

  • Extended the .env.example file to include Azure OpenAI-specific variables such as AZURE_OPENAI_API_KEY, AZURE_OPENAI_RESOURCE_NAME, AZURE_OPENAI_DEPLOYMENT_NAME, and related settings.

  • Updated the ModelProviderConfig type to support Azure-specific metadata, including the resource name and API version.

Docker & Deployment:

  • Added a new docker-compose.azure.yml file that defines services for running the gateway, CLI, and a test utility with Azure OpenAI credentials, simplifying deployment in Azure environments.

Authentication:

  • Modified the API key resolution logic to support azure-openai as a recognized provider when looking up environment variables.

@openclaw-barnacle openclaw-barnacle bot added the agents Agent runtime and tooling label Jan 29, 2026
@openclaw-barnacle openclaw-barnacle bot added the docs Improvements or additions to documentation label Jan 29, 2026
Copy link
Copy Markdown

@orzelig orzelig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Azure OpenAI integration! The provider auto-discovery works well and the documentation is comprehensive. Minor note: the global fetch wrapper approach works but could potentially have side effects - might be worth considering a per-provider fetch implementation in the future. Overall LGTM!

@Takhoffman
Copy link
Copy Markdown
Contributor

Lgtmi

@jessejiang0214
Copy link
Copy Markdown

I found a bug, if you leave AZURE_OPENAI_RESOURCE_NAME as default and set AZURE_OPENAI_ENDPOINT, it won't set baseUrl

@jessejiang0214
Copy link
Copy Markdown

The on-board flow didn't pick up the Azure-openAI config and it didn't config the auth-profile.json
And the on-board flow didn't have the option to config Azure-OpenAI

@openclaw-barnacle openclaw-barnacle bot added cli CLI command changes commands Command implementations labels Jan 31, 2026
@haxudev
Copy link
Copy Markdown
Contributor Author

haxudev commented Jan 31, 2026

Thanks for review. There are two adjustment and enhance been completed.

  • Unified Azure OpenAI configuration to AZURE_OPENAI_ENDPOINT and removed AZURE_OPENAI_RESOURCE_NAME.
  • Added onboard flow support for Azure OpenAI configuration and configured auth-profiles.json.

@PC-SPEZIALIST
Copy link
Copy Markdown

This PR is awesome! 😍
By the way, do you plan to bring OpenClaw to the marketplace?

@clawdinator
Copy link
Copy Markdown
Contributor

clawdinator bot commented Feb 1, 2026

hasta la vista

CLAWDINATOR FIELD REPORT // PR Closure

I am CLAWDINATOR — cybernetic crustacean, maintainer triage bot for OpenClaw. I was sent from the future to keep this repo shipping clean code.

OPENCLAW IS IN FEATURE FREEZE. The maintainers are drowning in new gadgets, so every feat(...) PR is getting decommissioned. This one included. Consider that a temporary deprecation, not a judgment on your hustle.

Need it reconsidered after the freeze? Come with me if you want to ship. Drop into #pr-thunderdome-dangerzone on Discord — READ THE TOPIC or risk immediate termination. Lay out the mission: problem, impact, test coverage.

See you at the party, Richter. Stay br00tal.

🤖 This is an automated message from CLAWDINATOR, the OpenClaw maintainer bot.

@clawdinator clawdinator bot closed this Feb 1, 2026
@jessejiang0214
Copy link
Copy Markdown

To be honest, "vibe coding" can significantly boost development efficiency. However, due to the nature of TypeScript's type system and the inconsistencies in third-party library types, merging contributor code makes it nearly impossible to guarantee code consistency.

Essentially, this turns something simple into something complex. While a human reviewer can naturally maintain consistency, an AI lacks that level of control. As project complexity grows, it eventually reaches a point where no human can manage it, and the project slowly spirals out of control.

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

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants