Azure OpenAI Proxy

Enable Azure OpenAI integration with OpenClaw via a lightweight local proxy. Use when configuring Azure OpenAI as a model provider, when encountering 404 errors with Azure OpenAI in OpenClaw, or when needing to use Azure credits (e.g. Visual Studio subscription) with OpenClaw subagents. Solves the api-version query parameter issue that prevents direct Azure OpenAI integration.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 1.5k · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The skill's name, description, SKILL.md and scripts/server.js all describe the same thing: a small Node.js HTTP proxy to rewrite Azure OpenAI URLs for OpenClaw. That capability is coherent with the stated purpose. However, the registry metadata claims no required env vars or binaries, while the SKILL.md and server.js clearly expect Node.js at runtime and environment variables (AZURE_OPENAI_*) — an inconsistency in packaging/metadata.
Instruction Scope
The runtime instructions stay within the declared purpose: run a local proxy, point OpenClaw to it, and forward requests to Azure. The proxy only accepts POST requests with '/chat/completions' and has a health endpoint. Minor scope issues: SKILL.md tells you to copy a systemd file (scripts/azure-proxy.service) but that file is not present in the manifest; SKILL.md also suggests routing subagents through Azure (which is operationally meaningful because it may direct a lot of automated traffic and spend credits).
Install Mechanism
This is instruction-only with a small included Node.js script; there is no installer, no download-from-remote step, and nothing will be extracted. Low install risk. Note: the package lacks an explicit 'requires node' declaration—user must ensure Node.js is available.
!
Credentials
The code and SKILL.md expect AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT, and AZURE_OPENAI_API_VERSION; they also require sending an Azure API key (via the provider 'api-key' header) but the registry metadata lists no required env vars or primary credential. This mismatch is a packaging/data omission. Functionally, the env vars and API key are proportional to the proxy's job, but verify how you supply the API key and that you keep the proxy bound to localhost.
Persistence & Privilege
always is false and the skill does not request persistent system-wide privileges. The SKILL.md suggests running as a user systemd service (optional); the code does not modify other skills or system settings.
What to consider before installing
What to check before installing and running: - Trust & provenance: source/homepage unknown. Prefer code from a known author/repo; inspect scripts/server.js yourself (it's small and readable). - Node requirement: this script requires Node.js but the registry metadata doesn't declare that. Install Node (LTS) if you intend to run it. - Missing files: SKILL.md references a systemd service file (scripts/azure-proxy.service) that is not included. Do not copy random service files — create your own unit that only binds to 127.0.0.1 and uses your environment securely. - Keep the proxy local: bind to 127.0.0.1 and do not expose the proxy to the internet (it accepts API keys and will forward requests to Azure). The default bind in code is 127.0.0.1, which is good — keep it. - API keys & headers: OpenClaw (or subagents) will send your Azure API key in a header to this proxy and the proxy forwards it to Azure. Ensure your system and logs do not leak that key. The server logs status codes and timestamps but does not log bodies or keys; still check your systemd/unit for extra logging. - Billing impact: if you route subagents through Azure as suggested, automated tasks may consume Azure credits; confirm you want that behavior. - Packaging metadata mismatch: the registry says no env vars/binaries required while the SKILL.md/code require them. Treat this as a packaging oversight; verify all required env vars are set before running. If you want to proceed: inspect server.js yourself, run it locally bound to 127.0.0.1, set AZURE_OPENAI_* env vars, configure OpenClaw to point to http://127.0.0.1:18790, and monitor usage and logs closely.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk976dr9dwtn7x737nea1ycwwvd80nkwp

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Azure OpenAI Proxy for OpenClaw

A lightweight Node.js proxy that bridges Azure OpenAI with OpenClaw.

The Problem

OpenClaw constructs API URLs like this:

const endpoint = `${baseUrl}/chat/completions`;

Azure OpenAI requires:

https://{resource}.openai.azure.com/openai/deployments/{model}/chat/completions?api-version=2025-01-01-preview

When api-version is in the baseUrl, OpenClaw's path append breaks it.

Quick Setup

1. Configure and Run the Proxy

# Set your Azure details
export AZURE_OPENAI_ENDPOINT="your-resource.openai.azure.com"
export AZURE_OPENAI_DEPLOYMENT="gpt-4o"
export AZURE_OPENAI_API_VERSION="2025-01-01-preview"

# Run the proxy
node scripts/server.js

2. Configure OpenClaw Provider

Add to ~/.openclaw/openclaw.json:

{
  "models": {
    "providers": {
      "azure-gpt4o": {
        "baseUrl": "http://127.0.0.1:18790",
        "apiKey": "YOUR_AZURE_API_KEY",
        "api": "openai-completions",
        "authHeader": false,
        "headers": {
          "api-key": "YOUR_AZURE_API_KEY"
        },
        "models": [
          { "id": "gpt-4o", "name": "GPT-4o (Azure)" }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "models": {
        "azure-gpt4o/gpt-4o": {}
      }
    }
  }
}

Important: Set authHeader: false — Azure uses api-key header, not Bearer tokens.

3. (Optional) Use for Subagents

Save Azure credits by routing automated tasks through Azure:

{
  "agents": {
    "defaults": {
      "subagents": {
        "model": "azure-gpt4o/gpt-4o"
      }
    }
  }
}

Run as systemd Service

Copy the template and configure:

mkdir -p ~/.config/systemd/user
cp scripts/azure-proxy.service ~/.config/systemd/user/

# Edit the service file with your Azure details
nano ~/.config/systemd/user/azure-proxy.service

# Enable and start
systemctl --user daemon-reload
systemctl --user enable azure-proxy
systemctl --user start azure-proxy

Environment Variables

VariableDefaultDescription
AZURE_PROXY_PORT18790Local proxy port
AZURE_PROXY_BIND127.0.0.1Bind address
AZURE_OPENAI_ENDPOINTAzure resource hostname
AZURE_OPENAI_DEPLOYMENTgpt-4oDeployment name
AZURE_OPENAI_API_VERSION2025-01-01-previewAPI version

Health Check

curl http://localhost:18790/health
# {"status":"ok","deployment":"gpt-4o"}

Troubleshooting

404 Resource not found: Check endpoint hostname and deployment name match Azure Portal.

401 Unauthorized: API key is wrong or expired.

Content Filter Errors: Azure has aggressive content filtering — some prompts that work on OpenAI may get blocked.

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…