惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
G
Google Developers Blog
博客园_首页
有赞技术团队
有赞技术团队
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs(providers/openai): document Azure OpenAI endpoint us...
ottodeng · 2026-04-23 · via Recent Commits to openclaw:main

@@ -393,6 +393,134 @@ Legacy `plugins.entries.openai.config.personality` is still read as a compatibil

393393

</Accordion>

394394

</AccordionGroup>

395395396+

## Azure OpenAI endpoints

397+398+

The bundled `openai` provider can target an Azure OpenAI resource for image

399+

generation by overriding the base URL. On the image-generation path, OpenClaw

400+

detects Azure hostnames on `models.providers.openai.baseUrl` and switches to

401+

Azure's request shape automatically.

402+403+

<Note>

404+

Realtime voice uses a separate configuration path

405+

(`plugins.entries.voice-call.config.realtime.providers.openai.azureEndpoint`)

406+

and is not affected by `models.providers.openai.baseUrl`. See the **Realtime

407+

voice** accordion under [Voice and speech](#voice-and-speech) for its Azure

408+

settings.

409+

</Note>

410+411+

Use Azure OpenAI when:

412+413+

- You already have an Azure OpenAI subscription, quota, or enterprise agreement

414+

- You need regional data residency or compliance controls Azure provides

415+

- You want to keep traffic inside an existing Azure tenancy

416+417+

### Configuration

418+419+

For Azure image generation through the bundled `openai` provider, point

420+

`models.providers.openai.baseUrl` at your Azure resource and set `apiKey` to

421+

the Azure OpenAI key (not an OpenAI Platform key):

422+423+

```json5

424+

{

425+

models: {

426+

providers: {

427+

openai: {

428+

baseUrl: "https://<your-resource>.openai.azure.com",

429+

apiKey: "<azure-openai-api-key>",

430+

},

431+

},

432+

},

433+

}

434+

```

435+436+

OpenClaw recognizes these Azure host suffixes for the Azure image-generation

437+

route:

438+439+

- `*.openai.azure.com`

440+

- `*.services.ai.azure.com`

441+

- `*.cognitiveservices.azure.com`

442+443+

For image-generation requests on a recognized Azure host, OpenClaw:

444+445+

- Sends the `api-key` header instead of `Authorization: Bearer`

446+

- Uses deployment-scoped paths (`/openai/deployments/{deployment}/...`)

447+

- Appends `?api-version=...` to each request

448+449+

Other base URLs (public OpenAI, OpenAI-compatible proxies) keep the standard

450+

OpenAI image request shape.

451+452+

<Note>

453+

Azure routing for the `openai` provider's image-generation path requires

454+

OpenClaw 2026.4.22 or later. Earlier versions treat any custom

455+

`openai.baseUrl` like the public OpenAI endpoint and will fail against Azure

456+

image deployments.

457+

</Note>

458+459+

### API version

460+461+

Set `AZURE_OPENAI_API_VERSION` to pin a specific Azure preview or GA version

462+

for the Azure image-generation path:

463+464+

```bash

465+

export AZURE_OPENAI_API_VERSION="2024-12-01-preview"

466+

```

467+468+

The default is `2024-12-01-preview` when the variable is unset.

469+470+

### Model names are deployment names

471+472+

Azure OpenAI binds models to deployments. For Azure image-generation requests

473+

routed through the bundled `openai` provider, the `model` field in OpenClaw

474+

must be the **Azure deployment name** you configured in the Azure portal, not

475+

the public OpenAI model id.

476+477+

If you create a deployment called `gpt-image-2-prod` that serves `gpt-image-2`:

478+479+

```

480+

/tool image_generate model=openai/gpt-image-2-prod prompt="A clean poster" size=1024x1024 count=1

481+

```

482+483+

The same deployment-name rule applies to image-generation calls routed through

484+

the bundled `openai` provider.

485+486+

### Regional availability

487+488+

Azure image generation is currently available only in a subset of regions

489+

(for example `eastus2`, `swedencentral`, `polandcentral`, `westus3`,

490+

`uaenorth`). Check Microsoft's current region list before creating a

491+

deployment, and confirm the specific model is offered in your region.

492+493+

### Parameter differences

494+495+

Azure OpenAI and public OpenAI do not always accept the same image parameters.

496+

Azure may reject options that public OpenAI allows (for example certain

497+

`background` values on `gpt-image-2`) or expose them only on specific model

498+

versions. These differences come from Azure and the underlying model, not

499+

OpenClaw. If an Azure request fails with a validation error, check the

500+

parameter set supported by your specific deployment and API version in the

501+

Azure portal.

502+503+

<Note>

504+

Azure OpenAI uses native transport and compat behavior but does not receive

505+

OpenClaw's hidden attribution headers. See the **Native vs OpenAI-compatible

506+

routes** accordion under [Advanced configuration](#advanced-configuration)

507+

for details.

508+

</Note>

509+510+

<Tip>

511+

For a separate Azure OpenAI Responses provider (distinct from the `openai`

512+

provider), see the `azure-openai-responses/*` model refs in the

513+

[Server-side compaction](#server-side-compaction-responses-api) accordion.

514+

</Tip>

515+516+

<Note>

517+

Azure chat and Responses traffic need Azure-specific provider/API config in

518+

addition to a base URL override. If you want Azure model calls beyond image

519+

generation, use the onboarding flow or a provider config that sets the

520+

appropriate Azure API/auth shape rather than assuming `openai.baseUrl` alone

521+

is enough.

522+

</Note>

523+396524

## Advanced configuration

397525398526

<AccordionGroup>