← 返回 Skills 市场
benediktschackenberg

Azure OpenAI Proxy

作者 BenediktSchackenberg · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1838
总下载
3
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install azure-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.
使用说明 (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

Variable Default Description
AZURE_PROXY_PORT 18790 Local proxy port
AZURE_PROXY_BIND 127.0.0.1 Bind address
AZURE_OPENAI_ENDPOINT Azure resource hostname
AZURE_OPENAI_DEPLOYMENT gpt-4o Deployment name
AZURE_OPENAI_API_VERSION 2025-01-01-preview API 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.

安全使用建议
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.
功能分析
Type: OpenClaw Skill Name: azure-proxy Version: 1.0.0 The skill bundle provides a local Node.js proxy to bridge OpenClaw's API requests with Azure OpenAI, specifically addressing an API version query parameter incompatibility. The `scripts/server.js` code correctly handles proxying requests, extracting API keys from headers, and forwarding them to the configured Azure endpoint. The `SKILL.md` and `README.md` files contain clear instructions for the user to set up the proxy and configure OpenClaw, including an optional systemd service for persistence, all of which align with the stated purpose. There is no evidence of data exfiltration, malicious execution, unauthorized persistence, prompt injection against the agent, or obfuscation. The behavior is clearly aligned with its stated purpose and lacks high-risk behaviors.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install azure-proxy
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /azure-proxy 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Lightweight proxy enabling Azure OpenAI with OpenClaw
元数据
Slug azure-proxy
版本 1.0.0
许可证
累计安装 4
当前安装数 4
历史版本数 1
常见问题

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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1838 次。

如何安装 Azure OpenAI Proxy?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install azure-proxy」即可一键安装,无需额外配置。

Azure OpenAI Proxy 是免费的吗?

是的,Azure OpenAI Proxy 完全免费(开源免费),可自由下载、安装和使用。

Azure OpenAI Proxy 支持哪些平台?

Azure OpenAI Proxy 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Azure OpenAI Proxy?

由 BenediktSchackenberg(@benediktschackenberg)开发并维护,当前版本 v1.0.0。

💬 留言讨论