{"id":"2a4fb91e-095e-45bb-baff-18e9a006fbdf","entityType":"agent","slug":"clawhub-andypeng09-opencode-responses-bridge-skill","name":"opencode-responses-bridge-skill","canonicalUrl":"https://www.xpersona.co/agent/clawhub-andypeng09-opencode-responses-bridge-skill","canonicalPath":"/agent/clawhub-andypeng09-opencode-responses-bridge-skill","generatedAt":"2026-10-10T06:43:20.961Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":null},"description":"Local stdlib-only proxy that adapts OpenAI Chat Completions to/from the Responses API so any OpenAI-compatible agent client (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) can use Responses-API-only models such as OpenCode Go gpt-5.6-luna. Use when: setting up a Chat Completions to Responses API bridge, local proxy for responses-only models, fixing 'model only supports responses API', 'invalid_prompt' HTTP 400, 'custom model error 10000', or protocol transcoding for any Responses API endpoint (OPENCODE_UPSTREAM). 使用场景：协议转接/本地代理/把只支持 Responses API 的模型接入 OpenAI 兼容客户端/模型报 invalid_prompt 或自定义模型错误 10000。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.3K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s179287h5dgtt822wrwrcv6nes8b3c0y:opencode-responses-bridge-skill","sourceUrl":"https://clawhub.ai/andypeng09/opencode-responses-bridge-skill","homepage":"https://clawhub.ai/andypeng09/skills/opencode-responses-bridge-skill","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/andypeng09/opencode-responses-bridge-skill","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/andypeng09/skills/opencode-responses-bridge-skill","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":67,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"opencode-responses-bridge-skill technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":null},"stars":null,"forks":null,"downloads":2299,"packageName":null,"latestVersion":"0.1.0","tractionLabel":"2.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T16:34:36.719Z","lastCrawledAt":"2026-10-09T16:34:36.719Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T16:34:36.719Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.0","createdAt":"2026-08-08T07:30:29.304Z","changelog":"- Major update: introduces a zero-dependency local proxy to bridge OpenAI Chat Completions with Responses API-only models. - Supports seamless use of OpenAI-compatible clients with Responses-API-only models like OpenCode Go gpt-5.6-luna. - Enables streaming, tool call/function support, reasoning content, and multi-modal input through protocol conversion. - Provides easy setup via Python script; configurable upstream endpoint and proxy host/port. - Adds troubleshooting guide, compatibility notes, and extensive usage examples and protocol mapping docs.","fileCount":18,"zipByteSize":25359}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s179287h5dgtt822wrwrcv6nes8b3c0y:opencode-responses-bridge-skill","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s179287h5dgtt822wrwrcv6nes8b3c0y:opencode-responses-bridge-skill` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/andypeng09/opencode-responses-bridge-skill before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T06:43:20.960Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-andypeng09-opencode-responses-bridge-skill/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":null},"readme":"Skill: opencode-responses-bridge-skill\n\nOwner: andypeng09\n\nSummary: Local stdlib-only proxy that adapts OpenAI Chat Completions to/from the Responses API so any OpenAI-compatible agent client (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) can use Responses-API-only models such as OpenCode Go gpt-5.6-luna. Use when: setting up a Chat Completions to Responses API bridge, local proxy for responses-only models, fixing 'model only supports responses API', 'invalid_prompt' HTTP 400, 'custom model error 10000', or protocol transcoding for any Responses API endpoint (OPENCODE_UPSTREAM). 使用场景：协议转接/本地代理/把只支持 Responses API 的模型接入 OpenAI 兼容客户端/模型报 invalid_prompt 或自定义模型错误 10000。\n\nTags: latest:0.1.0\n\nVersion history:\n\nv0.1.0 | 2026-08-08T07:30:29.304Z | auto\n\n- Major update: introduces a zero-dependency local proxy to bridge OpenAI Chat Completions with Responses API-only models.\n- Supports seamless use of OpenAI-compatible clients with Responses-API-only models like OpenCode Go gpt-5.6-luna.\n- Enables streaming, tool call/function support, reasoning content, and multi-modal input through protocol conversion.\n- Provides easy setup via Python script; configurable upstream endpoint and proxy host/port.\n- Adds troubleshooting guide, compatibility notes, and extensive usage examples and protocol mapping docs.\n\nArchive index:\n\nArchive v0.1.0: 18 files, 25359 bytes\n\nFiles: .clawhubignore (207b), .gitignore (114b), examples (0b), examples/basic.md (2891b), examples/generic-client-setup.md (1207b), examples/workbuddy-setup.md (1290b), LICENSE (1082b), README.md (5457b), README.zh-CN.md (5301b), references (0b), references/protocol-mapping.md (5270b), scripts (0b), scripts/proxy.py (19164b), scripts/start_proxy.bat (255b), skill-card.md (2447b), skill-info.md (1816b), SKILL.md (7747b), _meta.json (150b)\n\nFile v0.1.0:SKILL.md\n\n---\nname: opencode-responses-bridge-skill\nversion: 1.1.0\ndescription: \"Local stdlib-only proxy that adapts OpenAI Chat Completions to/from the Responses API so any OpenAI-compatible agent client (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) can use Responses-API-only models such as OpenCode Go gpt-5.6-luna. Use when: setting up a Chat Completions to Responses API bridge, local proxy for responses-only models, fixing 'model only supports responses API', 'invalid_prompt' HTTP 400, 'custom model error 10000', or protocol transcoding for any Responses API endpoint (OPENCODE_UPSTREAM). 使用场景：协议转接/本地代理/把只支持 Responses API 的模型接入 OpenAI 兼容客户端/模型报 invalid_prompt 或自定义模型错误 10000。\"\nagent_created: true\nallowed-tools: python3, curl\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n    envVars:\n      - name: OPENCODE_UPSTREAM\n        required: false\n        description: Responses API endpoint to forward to (default https://opencode.ai/zen/go/v1/responses).\n      - name: PROXY_HOST\n        required: false\n        description: Local listen host (default 127.0.0.1).\n      - name: PROXY_PORT\n        required: false\n        description: Local listen port (default 8787).\n    emoji: \"🔄\"\n    homepage: https://github.com/ANDYPENG09/opencode-responses-bridge-skill\n    os:\n      - windows\n      - macos\n      - linux\n---\n\n# OpenCode Responses Bridge（Responses API ↔ Chat Completions 本地转接）\n\n## Overview\n\n许多 AI 客户端的自定义模型通道只发 OpenAI **Chat Completions** 请求，而部分上游模型\n（典型：OpenCode Go 的 `gpt-5.6-luna`）只暴露 OpenAI **Responses API**，直接配置必然不可用\n（典型报错：`invalid_prompt` / `Invalid Responses API request` / WorkBuddy「自定义模型错误 10000」）。\n\n本技能提供**零依赖本地转接代理**：客户端把 Chat Completions 打到本机代理，代理翻译成\nResponses API 转发给上游，再把返回翻回 Chat Completions（含流式 SSE、工具调用、reasoning、\n多模态输入）。任何能配置 OpenAI 兼容模型地址的客户端都可以接入。\n\n## 快速开始\n\n### 1. 获取代理脚本\n从本技能 `scripts/` 复制两个文件到任意稳定目录（例如 `~/responses-bridge/`）：\n- `proxy.py`（纯 Python 标准库，Python 3.8+，无需安装依赖）\n- `start_proxy.bat`（Windows 一键启动，双击即可；macOS/Linux 直接 `python3 proxy.py`）\n\n### 2. 启动代理\n```\npython3 proxy.py        # 默认监听 http://127.0.0.1:8787\n```\n可选环境变量：`OPENCODE_UPSTREAM`（上游 Responses 端点，默认 OpenCode Go）、\n`PROXY_HOST`（默认 127.0.0.1）、`PROXY_PORT`（默认 8787）。代理从入站请求的\n`Authorization: Bearer <key>` 头取上游密钥透传，密钥只在客户端配置里维护一份。\n\n### 3. 冒烟测试（不经客户端）\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'\n```\n返回 HTTP 200 且为 `chat.completion` 结构即通过。\n\n### 4. 配置客户端\n把客户端的自定义模型 URL 指向 `http://127.0.0.1:8787/v1/chat/completions`，模型名填上游\n实际模型 ID（OpenCode Go 网关的模型 ID **不带前缀**，如 `gpt-5.6-luna`）。\n分客户端示例见 `examples/`（WorkBuddy `models.json`、通用 OpenAI 兼容客户端、curl）。\n\n### 5. 验证\n在客户端发送一条消息，正常流式返回即成功。\n\n## 核心能力\n\n- **文本与流式**：非流式返回标准 `chat.completion`；流式输出标准 SSE（role 开头 → content 增量 → `[DONE]`）。\n- **工具调用**：`tools`/`tool_choice` 双向映射；多轮 tool 循环（assistant `tool_calls` → `function_call`，tool 消息 → `function_call_output`）；流式多函数并发按 `item_id` 累积不丢参。\n- **Reasoning**：上游 reasoning 摘要 → `reasoning_content`（流式与非流式均支持）。\n- **多模态输入**：user 消息 `image_url` part → `input_image` part（base64 data URL 原样透传）。\n- **可配置上游**：`OPENCODE_UPSTREAM` 指向任意 OpenAI Responses API 兼容端点，不限于 OpenCode Go。\n\n## 输入输出规范\n\n- **入站**（客户端 → 代理）：标准 OpenAI Chat Completions 请求（`POST /v1/chat/completions`），支持 `messages`（system/user/assistant/tool）、`tools`、`tool_choice`、`max_tokens`、`temperature`、`top_p`、`stream`。\n- **出站**（代理 → 上游）：Responses API 请求（`input`/`instructions`/`tools`/`max_output_tokens`）。\n- **响应**：标准 Chat Completions（非流式 JSON 或 SSE 流），含 `usage`、`reasoning_content`、`tool_calls`。\n- 完整字段映射表见 `references/protocol-mapping.md`。\n\n## 使用示例\n\n**把 luna 接入 WorkBuddy（models.json）：**\n```\n{\n\t\"id\": \"gpt-5.6-luna\",\n\t\"name\": \"gpt-5.6-luna (via proxy)\",\n\t\"vendor\": \"Custom\",\n\t\"url\": \"http://127.0.0.1:8787/v1/chat/completions\",\n\t\"apiKey\": \"sk-你的上游key\",\n\t\"supportsToolCall\": true,\n\t\"supportsImages\": true,\n\t\"supportsReasoning\": true,\n\t\"useCustomProtocol\": false\n}\n```\n\n**期望输出**（非流式）：\n```\n{\"id\":\"chatcmpl-...\",\"object\":\"chat.completion\",\"model\":\"gpt-5.6-luna\",\n\t\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"2 + 3 equals 5.\"},\"finish_reason\":\"stop\"}]}\n```\n\n更多示例（含工具调用/流式/多模态输入输出对）见 `examples/`。\n\n## 已知限制（能力边界）\n\n1. **仅适配 OpenAI 协议族**：代理面向 OpenAI 兼容客户端；使用 Anthropic Messages 协议的客户端（如 Claude Code 直连）需要额外的 Anthropic↔Responses 适配层，不在本技能范围内。\n2. **模型 ID 不带前缀**：OpenCode Go 网关模型 ID 是 `gpt-5.6-luna` 而非 `opencode-go/gpt-5.6-luna`，带前缀会返回 401。其他上游以各自文档为准。\n3. **默认上游为 OpenCode Go**：`opencode.ai` 在大陆网络可能不可达，请按需设置 `OPENCODE_UPSTREAM` 到可达的 Responses API 端点。\n4. **图片输入**：仅转换 `image_url` part（URL 或 base64 data URL）；多模态能力取决于上游模型是否支持 `input_image`。\n5. **安全边界**：代理只监听 `127.0.0.1`（默认），不对外网开放；密钥不落盘、不进代码。\n\n## 排障\n\n| 症状 | 原因 | 处理 |\n|---|---|---|\n| 401 | 模型 ID 带了 `opencode-go/` 前缀 | 去掉前缀；见 `references/protocol-mapping.md` §2 |\n| 403 `error code: 1010` | Cloudflare 拦截默认 UA | 代理已内置浏览器 UA；勿用裸 urllib 直连 |\n| 400 `invalid_prompt`（客户端报「自定义模型错误 10000」） | 会话历史里 assistant 消息 content 是数组，part 类型 `text` 未转成 `output_text` | 升级到最新 `scripts/proxy.py`；新会话正常、有历史即报错是此 bug 的典型特征 |\n| 返回 `response` 对象而非 `chat.completion` | 直连了 `/responses` 端点 | 必须经代理 `http://127.0.0.1:8787/v1/chat/completions` |\n| 端口占用 | 代理重复启动 | 换 `PROXY_PORT` 或结束旧进程 |\n| 客户端报错但 curl 正常 | 请求结构差异 | 看代理同目录 `proxy-requests.log`（摘要、auth 脱敏）及 `proxy-last-request.json` / `proxy-last-upstream.json` / `proxy-last-error.txt` |\n\n## 资源\n\n- `scripts/proxy.py` — 转接代理（唯一运行入口，零依赖）\n- `scripts/start_proxy.bat` — Windows 启动脚本\n- `references/protocol-mapping.md` — 完整字段映射、SSE 事件表、实测样例与扩展指引\n- `examples/` — 各客户端接入示例（WorkBuddy / 通用 OpenAI 兼容 / curl 输入输出对）\n\nFile v0.1.0:README.md\n\n# OpenCode Responses Bridge (Chat Completions ↔ Responses API local adapter)\n\n> **🌏 Languages:** [English](README.md) · [中文](README.zh-CN.md)\n\n> **Skill Overview**\n>\n> **OpenCode Responses Bridge** is a zero-dependency local proxy that adapts OpenAI\n> **Chat Completions** ↔ **Responses API**. It lets any OpenAI-compatible agent client\n> (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) use Responses-API-only models such as\n> OpenCode Go `gpt-5.6-luna` — with streaming SSE, tool calls, reasoning passthrough and\n> multimodal input. Python 3.8+, standard library only, no installs.\n>\n> **How to install**\n>\n> - **WorkBuddy / SkillHub:** install the skill from SkillHub (zip or CLI), then copy\n>   `scripts/proxy.py` + `scripts/start_proxy.bat` to a stable folder and run it.\n> - **ClawHub:** `clawhub install opencode-responses-bridge-skill`\n> - **GitHub:** `git clone https://github.com/ANDYPENG09/opencode-responses-bridge-skill`\n>\n> **How to invoke**\n>\n> - Start the proxy: `python3 proxy.py` (defaults to `http://127.0.0.1:8787`).\n> - Point your client's custom model URL at `http://127.0.0.1:8787/v1/chat/completions`.\n> - Smoke test: `curl http://127.0.0.1:8787/v1/chat/completions -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'`\n\n---\n\n## What problem does it solve\n\nCustom-model channels in AI agent clients typically only speak the OpenAI **Chat Completions**\nprotocol, while some upstream models (typically OpenCode Go's `gpt-5.6-luna`) only expose the\nOpenAI **Responses API**. Direct configuration always fails, with common errors:\n\n- `HTTP 400 invalid_prompt` / `Invalid Responses API request`\n- WorkBuddy \"custom model error 10000\"\n- First message works, but **any message after history fails** (assistant history message\n  `content` arrays are not converted)\n\nThis proxy performs a **local protocol translation**: client → Chat Completions → proxy →\nResponses API → upstream → and back.\n\n## Features\n\n- **Zero dependencies**: pure Python standard library, Python 3.8+, no pip install\n- **Streaming SSE**: fully translated (role first → content deltas → `[DONE]`)\n- **Tool calls**: `tools`/`tool_choice` bidirectional mapping, multi-round tool loops,\n  concurrent streaming function calls with no lost arguments\n- **Reasoning**: upstream reasoning summaries → `reasoning_content` passthrough\n- **Multimodal**: `image_url` (URL / base64 data URL) → `input_image`\n- **Configurable upstream**: `OPENCODE_UPSTREAM` points to any Responses API endpoint,\n  not limited to OpenCode Go\n- **Single-point key management**: the proxy relays the key from the inbound `Authorization`\n  header; it never writes keys to disk or code\n\n## Quick start\n\n```\n# 1. Start the proxy (on Windows, double-click scripts/start_proxy.bat)\npython3 proxy.py                      # defaults to http://127.0.0.1:8787\n# 2. Smoke test\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'\n# 3. Point your client's custom model URL at:\n# http://127.0.0.1:8787/v1/chat/completions\n```\n\n## Configuration\n\n| Env var | Default | Description |\n|---|---|---|\n| `OPENCODE_UPSTREAM` | `https://opencode.ai/zen/go/v1/responses` | Upstream Responses API endpoint |\n| `PROXY_HOST` | `127.0.0.1` | Listen address (do not expose publicly) |\n| `PROXY_PORT` | `8787` | Listen port |\n\n> Note: OpenCode Go gateway model IDs have **no prefix** (`gpt-5.6-luna`, not\n> `opencode-go/gpt-5.6-luna`); a prefix returns 401.\n\n## Platform & agent client compatibility\n\n| Client | Compatibility | Notes |\n|---|---|---|\n| WorkBuddy | ✅ Verified | Point custom model `url` at the proxy, use upstream model ID |\n| Any OpenAI-compatible client (Cursor / Open WebUI / LobeChat / NextChat ...) | ✅ Protocol-level | Any client that can point a model base URL at the proxy |\n| OpenClaw / Claw / QClaw | ⚠️ Config-dependent | Point the OpenAI-compatible endpoint at the proxy |\n| Claude Code (Anthropic Messages protocol) | ❌ Not supported | Requires an Anthropic↔Responses adapter layer, out of scope |\n\n| OS | Compatibility | Notes |\n|---|---|---|\n| Windows | ✅ Verified | `start_proxy.bat` or `python proxy.py` |\n| macOS / Linux | ✅ | `python3 proxy.py`; mind firewall/port |\n\n## Per-client examples\n\n- `examples/basic.md` — curl input/output pairs (text, streaming, tool calls, multimodal)\n- `examples/workbuddy-setup.md` — WorkBuddy `models.json` integration\n- `examples/generic-client-setup.md` — generic OpenAI-compatible client integration\n\n## Debugging\n\nThe proxy logs every request to `proxy-requests.log` (summary, auth redacted) and dumps the\nfull inbound request / upstream payload / upstream error to `proxy-last-request.json`,\n`proxy-last-upstream.json`, `proxy-last-error.txt` (overwrite mode). When \"client errors but\ncurl works\", check these files first.\n\n## Security\n\n- Listens on `127.0.0.1` by default, not exposed to the network\n- Keys are never written to disk or code; relayed only from the inbound header\n- Upstream requests use a browser UA to bypass Cloudflare's default-UA block (`error code: 1010`)\n\n## License\n\n[MIT-0](./LICENSE) — anyone may freely use, modify, and redistribute (including commercially)\nwithout attribution.\n\n## Author\n\n- **ANDYPENG09**\n\nFile v0.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn778b36z5e9wm29y1m36g4m7h8b269f\",\n  \"slug\": \"opencode-responses-bridge-skill\",\n  \"version\": \"0.1.0\",\n  \"publishedAt\": 1786174229304\n}\n\nFile v0.1.0:references/protocol-mapping.md\n\n# Responses API <-> Chat Completions 协议映射参考\n\n本文件记录代理 `scripts/proxy.py` 的协议转换细节，供排障或扩展时查阅。\n映射遵循 OpenAI 官方 Responses API / Chat Completions 规范，适用于任意 OpenAI 兼容上游；\n文中结论来自 2026-08-06 对 OpenCode Go 网关的实测（模型 `gpt-5.6-luna`、`deepseek-v4-flash`）。\n\n## 1. 端点到模型能力对照（OpenCode Go，实测）\n\n| 模型 | 端点 | 协议 | WorkBuddy 是否可直接用 |\n|---|---|---|---|\n| `deepseek-v4-flash` | `https://opencode.ai/zen/go/v1/chat/completions` | Chat Completions | ✅ 直接配置即可 |\n| `gpt-5.6-luna` | `https://opencode.ai/zen/go/v1/responses` | Responses API | ❌ 需本代理转接 |\n\n## 2. 关键坑\n\n- **模型 ID 不带前缀**：Go 网关模型 ID 是 `gpt-5.6-luna` / `deepseek-v4-flash`。\n  加 `opencode-go/` 前缀会返回 **HTTP 401**（网关按模型名做权限判定，误以为无权限）。\n- **Cloudflare 拦截**：urllib 默认 UA 会触发 Cloudflare `error code: 1010`（403）。\n  代理已内置浏览器 UA + `Accept: application/json, text/event-stream`。\n- **鉴权**：`Authorization: Bearer <key>`，Go 与 Zen 共用控制台同一把 API key；\n  订阅 Go 后该 key 对 Go 端点生效。\n- **assistant/content 数组必须转换（重要 bug，2026-08-06 修复）**：WorkBuddy 的会话历史\n  会把 assistant 消息的 `content` 序列化成数组（`[{\"type\":\"text\",\"text\":...}]`）。\n  Chat Completions 的 part 类型 `text` 在 Responses API 里**不存在**，原样透传会被网关判\n  `HTTP 400 invalid_prompt`（`Invalid Responses API request`）。代理必须把所有文本 part\n  统一重写为 `input_text`（user）或 `output_text`（assistant），图片 part → `input_image`。\n  症状：新会话第一条能用，一旦对话有历史（含 assistant 数组消息）就报\n  `自定义模型 xxx 错误 10000`（Trace ID 只出现在 WorkBuddy 侧）。\n\n## 3. 请求转换（Chat Completions -> Responses API）\n\n| Chat Completions | Responses API |\n|---|---|\n| `messages[]` role=system | 顶层 `instructions`（多条拼接；content 为数组时拼接其文本 part） |\n| `messages[]` role=user content=string | `{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":...}]}` |\n| user content part `{\"type\":\"text\",\"text\":...}` | `{\"type\":\"input_text\",\"text\":...}` |\n| user content part `{\"type\":\"image_url\",\"image_url\":{\"url\":...}}` | `{\"type\":\"input_image\",\"image_url\":...}` |\n| assistant content=string | `{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":...}]}` |\n| assistant content=数组 `[{\"type\":\"text\",...}]` | `{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":...}]}`（**必须重写类型，否则 invalid_prompt**） |\n| assistant `tool_calls[]` | `{\"type\":\"function_call\",\"call_id\",\"name\",\"arguments\"}`（arguments 为 JSON 字符串） |\n| role=tool 消息 | `{\"type\":\"function_call_output\",\"call_id\",\"output\"}` |\n| `tools[]` `{type:function,function:{name,description,parameters}}` | `{type:function,name,description,parameters}` |\n| `tool_choice` `{type:function,function:{name}}` | `{type:function,name}` |\n| `max_tokens` / `max_completion_tokens` | `max_output_tokens` |\n\n## 4. 响应转换（Responses API -> Chat Completions）\n\n| Responses API | Chat Completions |\n|---|---|\n| `output[].type=message` + `content[].type=output_text` | `choices[0].message.content` |\n| `output[].type=function_call`（含 `call_id`/`name`/`arguments`） | `choices[0].message.tool_calls[]`，`finish_reason=tool_calls` |\n| `output[].type=reasoning` + `summary[].text` | `message.reasoning_content` |\n| `usage.input_tokens/output_tokens/total_tokens` | `usage.prompt_tokens/completion_tokens/total_tokens` |\n\n## 5. 流式（SSE）事件映射\n\n| Responses 事件 | Chat Completions 输出 |\n|---|---|\n| `response.created` | （隐式）首个 `delta.role=assistant` chunk |\n| `response.output_text.delta` | `delta.content` chunk |\n| `response.reasoning_summary_text.delta` | `delta.reasoning_content` chunk |\n| `response.output_item.added` (function_call) | 开始累积调用（按 `item_id` 缓存） |\n| `response.function_call_arguments.delta` | 追加 `arguments` |\n| `response.output_item.done` | 固化 arguments |\n| 流结束 | 一次性输出全部 `tool_calls` delta，然后 `finish_reason` + `[DONE]` |\n\n多函数并发时按 `item_id` 区分，不丢参数。\n\n## 6. 实测返回样例\n\n`gpt-5.6-luna` 非流式（节选）：\n```\n{\"id\":\"gen-...\",\"object\":\"response\",\"model\":\"gpt-5.6-luna\",\n\t\"output\":[{\"type\":\"message\",\"content\":[{\"type\":\"output_text\",\"text\":\"2 + 3 equals 5.\"}]}],\n\t\"usage\":{\"input_tokens\":19,\"output_tokens\":12,\"total_tokens\":31}}\n```\n\n`deepseek-v4-flash` 非流式（节选）：\n```\n{\"id\":\"...\",\"object\":\"chat.completion\",\"model\":\"deepseek-v4-flash\",\n\t\"choices\":[{\"message\":{\"role\":\"assistant\",\"content\":\"2 + 3 = 5\",\"reasoning_content\":\"...\"}}]}\n```\n\n## 7. 扩展指引\n\n- 更换上游：设置环境变量 `OPENCODE_UPSTREAM`（默认 `https://opencode.ai/zen/go/v1/responses`）。\n- 更换端口：`PROXY_PORT`（默认 8787）；绑定地址 `PROXY_HOST`（默认 127.0.0.1）。\n- 代理从入站 `Authorization` 头取 key 透传，key 只维护在客户端模型配置一处。\n\nFile v0.1.0:examples/basic.md\n\n# 示例：curl 输入/输出对\n\n以下请求直接打向本地代理 `http://127.0.0.1:8787/v1/chat/completions`，密钥放在\n`Authorization: Bearer <你的上游key>` 头。返回均为标准 OpenAI Chat Completions 结构。\n\n## 1. 文本（非流式）\n\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"What is 2+3? Answer in one short sentence.\"}],\"max_tokens\":80,\"stream\":false}'\n```\n\n期望输出（节选）：\n```\n{\n\t\"object\": \"chat.completion\",\n\t\"model\": \"gpt-5.6-luna\",\n\t\"choices\": [\n\t\t{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"2 + 3 equals 5.\"}, \"finish_reason\": \"stop\"}\n\t],\n\t\"usage\": {\"prompt_tokens\": 19, \"completion_tokens\": 12, \"total_tokens\": 31}\n}\n```\n\n## 2. 流式（SSE）\n\n```\ncurl -N http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"Count 1 to 5, one per line.\"}],\"max_tokens\":80,\"stream\":true}'\n```\n\n期望输出（节选）：\n```\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"delta\":{\"content\":\"1\\n2\\n3\\n4\\n5\"},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}]}\ndata: [DONE]\n```\n\n## 3. 工具调用\n\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\n\t\t\"messages\":[{\"role\":\"user\",\"content\":\"What is the weather in Shanghai? Use the get_weather tool.\"}],\n\t\t\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_weather\",\"description\":\"Get weather for a city\",\n\t\t\t\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"]}}}],\n\t\t\"tool_choice\":\"auto\",\"stream\":false}'\n```\n\n期望输出（节选）：\n```\n{\n\t\"choices\": [\n\t\t{\"index\": 0,\n\t\t\t\"message\": {\"role\": \"assistant\", \"content\": null,\n\t\t\t\t\"tool_calls\": [{\"id\": \"call_...\", \"type\": \"function\",\n\t\t\t\t\t\"function\": {\"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\":\\\"Shanghai\\\"}\"}}]},\n\t\t\t\"finish_reason\": \"tool_calls\"}\n\t]\n}\n```\n\n## 4. 多模态输入（图片）\n\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\n\t\t\"messages\":[{\"role\":\"user\",\"content\":[\n\t\t\t{\"type\":\"text\",\"text\":\"What color is this image? Answer in one word.\"},\n\t\t\t{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}}\n\t\t]}],\n\t\t\"max_tokens\":300,\"stream\":false}'\n```\n\n期望输出（节选）：`content` 为模型对图片的回答（如 \"Gray\"），上游推理摘要出现在\n`reasoning_content` 字段。\n\nFile v0.1.0:examples/generic-client-setup.md\n\n# 示例：接入通用 OpenAI 兼容客户端\n\n任何支持「自定义 OpenAI 兼容模型 base URL」的客户端（Cursor、Open WebUI、LobeChat、\nNextChat、one-api 系网关等）都可以直接接入本代理：\n\n1. 启动代理：`python3 proxy.py`（默认 `http://127.0.0.1:8787`）。\n2. 在客户端配置自定义模型：\n   - **Base URL / API 地址**：`http://127.0.0.1:8787/v1`\n   - **模型名**：上游实际模型 ID（如 `gpt-5.6-luna`）\n   - **API Key**：上游 API key（必填，代理会透传到上游）\n   - **能力开关**：按上游实际能力勾选 工具调用 / 视觉 / 推理\n\n原理：客户端按 OpenAI 兼容协议把 Chat Completions 请求发给 `http://127.0.0.1:8787/v1/chat/completions`，\n代理翻译成 Responses API 转发上游，再把响应翻回 Chat Completions 返回给客户端。\n\n注意事项：\n\n- 客户端需能访问 `127.0.0.1`；若客户端与代理不在同一台机器，请改用局域网地址并\n  自行评估监听安全性（`PROXY_HOST` 默认只绑定本机）。\n- 不支持 Anthropic Messages 协议的客户端（如 Claude Code 直连模式）无法直接使用，\n  需要额外的 Anthropic↔Responses 适配层。\n\nFile v0.1.0:examples/workbuddy-setup.md\n\n# 示例：接入 WorkBuddy（自定义模型）\n\n1. 启动代理：双击 `scripts/start_proxy.bat`，或 `python3 proxy.py`。\n2. 编辑 WorkBuddy 自定义模型配置文件 `~/.workbuddy/models.json`，新增/修改条目。\n\n```\n{\n\t\"id\": \"gpt-5.6-luna\",\n\t\"name\": \"gpt-5.6-luna (via proxy)\",\n\t\"vendor\": \"Custom\",\n\t\"url\": \"http://127.0.0.1:8787/v1/chat/completions\",\n\t\"apiKey\": \"sk-你的上游key\",\n\t\"supportsToolCall\": true,\n\t\"supportsImages\": true,\n\t\"supportsReasoning\": true,\n\t\"useCustomProtocol\": false\n}\n```\n\n要点：\n\n- `url` 必须指向代理的 Chat Completions 端点（**不要**直连上游 `/responses`）。\n- `apiKey` 填上游（如 OpenCode Go）的 API key；代理从入站 `Authorization` 头透传。\n- 模型 ID 填上游实际 ID（OpenCode Go 网关**不带前缀**，如 `gpt-5.6-luna`）。\n- 完全退出并重启 WorkBuddy（系统托盘右键退出，不是关窗口）后，在模型选择器选用该模型。\n\n已知现象与处理：\n\n- 若「新会话第一条能用、有历史后报 10000」：升级到最新版 `scripts/proxy.py`\n  （assistant 历史消息 content 数组的类型转换问题）。\n- 若代理未运行：客户端会连接失败；先跑 `python3 proxy.py`，`curl http://127.0.0.1:8787/health`\n  应返回 `{\"status\":\"ok\"}`。\n\nFile v0.1.0:README.zh-CN.md\n\n# OpenCode Responses Bridge（Responses API ↔ Chat Completions 本地转接）\n\n> **🌏 语言切换：** [English](README.md) · [中文](README.zh-CN.md)\n\n> **技能概览**\n>\n> **OpenCode Responses Bridge** 是一个零依赖的本地代理，在 OpenAI **Chat Completions** 与\n> **Responses API** 之间做协议转接。它让任何 OpenAI 兼容的 Agent 客户端（WorkBuddy、Cursor、\n> Open WebUI、LobeChat 等）都能使用仅支持 Responses API 的模型（如 OpenCode Go 的\n> `gpt-5.6-luna`）——支持流式 SSE、工具调用、reasoning 透传与多模态输入。\n> 仅需 Python 3.8+ 标准库，无需安装任何依赖。\n>\n> **如何安装**\n>\n> - **WorkBuddy / SkillHub**：从 SkillHub 安装本技能（zip 或 CLI），然后把\n>   `scripts/proxy.py` 和 `scripts/start_proxy.bat` 复制到任意稳定目录运行。\n> - **ClawHub**：`clawhub install opencode-responses-bridge-skill`\n> - **GitHub**：`git clone https://github.com/ANDYPENG09/opencode-responses-bridge-skill`\n>\n> **如何调用**\n>\n> - 启动代理：`python3 proxy.py`（默认监听 `http://127.0.0.1:8787`）。\n> - 把客户端的自定义模型 URL 指向 `http://127.0.0.1:8787/v1/chat/completions`。\n> - 冒烟测试：`curl http://127.0.0.1:8787/v1/chat/completions -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'`\n\n---\n\n## 它解决什么问题\n\nAI 客户端的自定义模型通道通常只发 OpenAI **Chat Completions** 请求；而部分上游模型\n（典型：OpenCode Go 的 `gpt-5.6-luna`）只暴露 OpenAI **Responses API**。直接配置必然失败，\n常见报错：\n\n- `HTTP 400 invalid_prompt` / `Invalid Responses API request`\n- WorkBuddy「自定义模型错误 10000」\n- 对话第一条能通、**有历史后即报错**（assistant 历史消息的 content 数组类型未转换）\n\n本代理在本地做**协议转接**：客户端 → Chat Completions → 代理 → Responses API → 上游 → 翻回。\n\n## 特性\n\n- **零依赖**：纯 Python 标准库，Python 3.8+，无需 pip install\n- **流式 SSE**：完整转译（role 开头 → content 增量 → [DONE]）\n- **工具调用**：`tools`/`tool_choice` 双向映射，多轮 tool 循环，流式多函数并发不丢参\n- **Reasoning**：上游推理摘要 → `reasoning_content` 透传\n- **多模态**：`image_url`（URL / base64 data URL）→ `input_image`\n- **上游可配置**：`OPENCODE_UPSTREAM` 指向任意 Responses API 端点，不限于 OpenCode Go\n- **密钥单点维护**：代理从入站 `Authorization` 头透传 key，不落盘、不进代码\n\n## 快速开始\n\n```\n# 1. 启动代理（Windows 可双击 scripts/start_proxy.bat）\npython3 proxy.py                      # 默认 http://127.0.0.1:8787\n# 2. 冒烟测试\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'\n# 3. 客户端自定义模型 URL 指向：\n# http://127.0.0.1:8787/v1/chat/completions\n```\n\n## 配置\n\n| 环境变量 | 默认值 | 说明 |\n|---|---|---|\n| `OPENCODE_UPSTREAM` | `https://opencode.ai/zen/go/v1/responses` | 上游 Responses API 端点 |\n| `PROXY_HOST` | `127.0.0.1` | 监听地址（安全起见勿对外开放） |\n| `PROXY_PORT` | `8787` | 监听端口 |\n\n> 注意：OpenCode Go 网关的模型 ID **不带前缀**（`gpt-5.6-luna`，不是 `opencode-go/gpt-5.6-luna`），\n> 带前缀会返回 401。\n\n## 平台与 Agent 客户端兼容性\n\n| 客户端 | 兼容性 | 说明 |\n|---|---|---|\n| WorkBuddy | ✅ 已验证 | 自定义模型 `url` 指向代理，模型 ID 填上游 ID |\n| 任何 OpenAI 兼容客户端（Cursor / Open WebUI / LobeChat / NextChat ...） | ✅ 协议级兼容 | 只要能把模型 base URL 指向代理 |\n| OpenClaw / Claw / QClaw | ⚠️ 配置相关 | 需要把 OpenAI 兼容端点指到代理 |\n| Claude Code（Anthropic Messages 协议） | ❌ 不支持 | 需要 Anthropic↔Responses 适配层，不在本技能范围 |\n\n| 操作系统 | 兼容性 | 说明 |\n|---|---|---|\n| Windows | ✅ 已验证 | `start_proxy.bat` 或 `python proxy.py` |\n| macOS / Linux | ✅ | `python3 proxy.py`；注意防火墙/端口 |\n\n## 分客户端示例\n\n- `examples/basic.md` — curl 输入/输出对（文本、流式、工具调用、多模态）\n- `examples/workbuddy-setup.md` — WorkBuddy `models.json` 接入\n- `examples/generic-client-setup.md` — 通用 OpenAI 兼容客户端接入\n\n## 调试\n\n代理会把每次请求写入同目录 `proxy-requests.log`（摘要、auth 脱敏），并把完整入站请求 /\n上游载荷 / 上游报错分别落盘：`proxy-last-request.json`、`proxy-last-upstream.json`、\n`proxy-last-error.txt`（覆盖式）。排查「客户端报错但 curl 正常」时先看这几个文件。\n\n## 安全\n\n- 默认只监听 `127.0.0.1`，不对外网开放\n- 密钥不落盘、不进代码；仅从入站请求头透传\n- 上游请求已内置浏览器 UA 以绕过 Cloudflare 默认 UA 拦截（`error code: 1010`）\n\n## License\n\n[MIT-0](./LICENSE) — 任何人可自由使用、修改、再分发（含商用），无需署名。\n\n## 作者\n\n- **ANDYPENG09**\n\nFile v0.1.0:skill-card.md\n\n## Description:\n\nOpenCode Responses Bridge provides a zero-dependency local proxy that translates between OpenAI Chat Completions and Responses API endpoints for OpenAI-compatible agent clients.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[andypeng09](https://clawhub.ai/user/andypeng09)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use this skill to run a local protocol bridge so OpenAI-compatible clients can call Responses API-only models with streaming, tool calls, reasoning content, and multimodal input.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The local proxy forwards prompts, tool data, images, and bearer tokens to the configured upstream API.\n\nMitigation: Use only a trusted HTTPS OPENCODE_UPSTREAM value unless the endpoint is a trusted loopback service.\n\nRisk: Debug logs and proxy-last request files may contain conversation content or other sensitive request data.\n\nMitigation: Protect or regularly delete proxy-requests.log, proxy-last-request.json, proxy-last-upstream.json, and proxy-last-error.txt.\n\nRisk: Binding the proxy to a public interface can expose the bridge beyond the local client.\n\nMitigation: Keep PROXY_HOST on 127.0.0.1 by default and use firewall controls before any LAN or public binding.\n\n## Reference(s):\n\n- [Server-resolved GitHub repository](https://github.com/ANDYPENG09/opencode-responses-bridge-skill)\n- [ClawHub skill page](https://clawhub.ai/andypeng09/skills/opencode-responses-bridge-skill)\n- [Protocol mapping reference](references/protocol-mapping.md)\n- [Generic client setup example](examples/generic-client-setup.md)\n- [WorkBuddy setup example](examples/workbuddy-setup.md)\n- [Default upstream Responses endpoint](https://opencode.ai/zen/go/v1/responses)\n\n## Skill Output:\n\n**Output Type(s):** [Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown guidance with Python and batch script files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Runtime proxy responses are Chat Completions-compatible JSON or SSE streams.]\n\n## Skill Version(s):\n\n0.1.0 (source: release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.0:skill-info.md\n\n# OpenCode Responses Bridge（Responses API ↔ Chat Completions 本地转接）\n\n## 简介\n\n一个零依赖的本地协议转换代理，解决「AI 客户端的自定义模型通道只支持 OpenAI Chat\nCompletions，而部分上游模型（如 OpenCode Go 的 gpt-5.6-luna）只暴露 Responses API」的\n兼容问题。\n\n代理把客户端发出的 Chat Completions 请求翻译成 Responses API 转发给上游，再把响应转回\nChat Completions，支持：\n- 文本生成与流式 SSE\n- 工具调用（tool_calls ↔ function_call，含多轮 tool 循环与多函数并发）\n- reasoning 摘要透传（reasoning_content）\n- 多模态图片输入（image_url → input_image）\n- 任意 Responses API 端点（OPENCODE_UPSTREAM 可配置）\n\n## 使用场景\n\n- 在 OpenAI 兼容客户端中使用仅支持 Responses API 的模型\n- 任何需要 Chat Completions ↔ Responses API 协议转换的本地兼容层\n\n## 安装与使用\n\n1. 复制 `scripts/proxy.py`（纯 Python 标准库，Python 3.8+，无需安装依赖）。\n2. 运行 `python3 proxy.py`（默认监听 `127.0.0.1:8787`），或双击 `scripts/start_proxy.bat`。\n3. 在客户端把模型 URL 指向 `http://127.0.0.1:8787/v1/chat/completions`，模型 ID 填上游实际 ID。\n4. 冒烟测试与分客户端示例见 `README.md` 与 `examples/`。\n\n详细接入步骤与排障见 `SKILL.md`；协议字段映射见 `references/protocol-mapping.md`。\n\n## 依赖\n\n- Python 3.8+（仅标准库）\n- 无任何第三方包\n\n## 作者\n\n- **ANDYPENG09**\n\n## 版本\n\n- v1.1.0（2026-08-06）：通用化改造——任意 Responses API 上游可配置、示例与排障完善、适配 WorkBuddy/ClawHub/GitHub 多平台发布。\n- v1.0.0（2026-08-06）：首个版本，已在 OpenCode Go `gpt-5.6-luna` / `deepseek-v4-flash` 上实测通过。\n\nFile v0.1.0:LICENSE\n\nMIT No Attribution (MIT-0)\n\nCopyright (c) 2026 ANDYPENG09\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","readmeExcerpt":"Skill: opencode-responses-bridge-skill Owner: andypeng09 Summary: Local stdlib-only proxy that adapts OpenAI Chat Completions to/from the Responses API so any OpenAI-compatible agent client (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) can use Responses-API-only models such as OpenCode Go gpt-5.6-luna. Use when: setting up a Chat Completions to Responses API bridge, local proxy for responses-only models, fixing 'mod","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"python3 proxy.py        # 默认监听 http://127.0.0.1:8787"},{"language":"text","snippet":"curl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'"},{"language":"text","snippet":"{\n\t\"id\": \"gpt-5.6-luna\",\n\t\"name\": \"gpt-5.6-luna (via proxy)\",\n\t\"vendor\": \"Custom\",\n\t\"url\": \"http://127.0.0.1:8787/v1/chat/completions\",\n\t\"apiKey\": \"sk-你的上游key\",\n\t\"supportsToolCall\": true,\n\t\"supportsImages\": true,\n\t\"supportsReasoning\": true,\n\t\"useCustomProtocol\": false\n}"},{"language":"text","snippet":"{\"id\":\"chatcmpl-...\",\"object\":\"chat.completion\",\"model\":\"gpt-5.6-luna\",\n\t\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"2 + 3 equals 5.\"},\"finish_reason\":\"stop\"}]}"},{"language":"text","snippet":"# 1. Start the proxy (on Windows, double-click scripts/start_proxy.bat)\npython3 proxy.py                      # defaults to http://127.0.0.1:8787\n# 2. Smoke test\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'\n# 3. Point your client's custom model URL at:\n# http://127.0.0.1:8787/v1/chat/completions"},{"language":"text","snippet":"{\"id\":\"gen-...\",\"object\":\"response\",\"model\":\"gpt-5.6-luna\",\n\t\"output\":[{\"type\":\"message\",\"content\":[{\"type\":\"output_text\",\"text\":\"2 + 3 equals 5.\"}]}],\n\t\"usage\":{\"input_tokens\":19,\"output_tokens\":12,\"total_tokens\":31}}"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: opencode-responses-bridge-skill\nversion: 1.1.0\ndescription: \"Local stdlib-only proxy that adapts OpenAI Chat Completions to/from the Responses API so any OpenAI-compatible agent client (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) can use Responses-API-only models such as OpenCode Go gpt-5.6-luna. Use when: setting up a Chat Completions to Responses API bridge, local proxy for responses-only models, fixing 'model only supports responses API', 'invalid_prompt' HTTP 400, 'custom model error 10000', or protocol transcoding for any Responses API endpoint (OPENCODE_UPSTREAM). 使用场景：协议转接/本地代理/把只支持 Responses API 的模型接入 OpenAI 兼容客户端/模型报 invalid_prompt 或自定义模型错误 10000。\"\nagent_created: true\nallowed-tools: python3, curl\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n    envVars:\n      - name: OPENCODE_UPSTREAM\n        required: false\n        description: Responses API endpoint to forward to (default https://opencode.ai/zen/go/v1/responses).\n      - name: PROXY_HOST\n        required: false\n        description: Local listen host (default 127.0.0.1).\n      - name: PROXY_PORT\n        required: false\n        description: Local listen port (default 8787).\n    emoji: \"🔄\"\n    homepage: https://github.com/ANDYPENG09/opencode-responses-bridge-skill\n    os:\n      - windows\n      - macos\n      - linux\n---\n\n# OpenCode Responses Bridge（Responses API ↔ Chat Completions 本地转接）\n\n## Overview\n\n许多 AI 客户端的自定义模型通道只发 OpenAI **Chat Completions** 请求，而部分上游模型\n（典型：OpenCode Go 的 `gpt-5.6-luna`）只暴露 OpenAI **Responses API**，直接配置必然不可用\n（典型报错：`invalid_prompt` / `Invalid Responses API request` / WorkBuddy「自定义模型错误 10000」）。\n\n本技能提供**零依赖本地转接代理**：客户端把 Chat Completions 打到本机代理，代理翻译成\nResponses API 转发给上游，再把返回翻回 Chat Completions（含流式 SSE、工具调用、reasoning、\n多模态输入）。任何能配置 OpenAI 兼容模型地址的客户端都可以接入。\n\n## 快速开始\n\n### 1. 获取代理脚本\n从本技能 `scripts/` 复制两个文件到任意稳定目录（例如 `~/responses-bridge/`）：\n- `proxy.py`（纯 Python 标准库，Python 3.8+，无需安装依赖）\n- `start_proxy.bat`（Windows 一键启动，双击即可；macOS/Linux 直接 `python3 proxy.py`）\n\n### 2. 启动代理\n```\npython3 proxy.py        # 默认监听 http://127.0.0.1:8787\n```\n可选环境变量：`OPENCODE_UPSTREAM`（上游 Responses 端点，默认 OpenCode Go）、\n`PROXY_HOST`（默认 127.0.0.1）、`PROXY_PORT`（默认 8787）。代理从入站请求的\n`Authorization: Bearer <key>` 头取上游密钥透传，密钥只在客户端配置里维护一份。\n\n### 3. 冒烟测试（不经客户端）\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'\n```\n返回 HTTP 200 且为 `chat.completion` 结构即通过。\n\n### 4. 配置客户端\n把客户端的自定义模型 URL 指向 `http://127.0.0.1:8787/v1/chat/completions`，模型名填上游\n实际模型 ID（OpenCode Go 网关的模型 ID **不带前缀**，如 `gpt-5.6-luna`）。\n分客户端示例见 `examples/`（WorkBuddy `models.json`、通用 OpenAI 兼容客户端、curl）。\n\n### 5. 验证\n在客户端发送一条消息，正常流式返回即成功。\n\n## 核心能力\n\n- **文本与流式**：非流式返回标准 `chat.completion`；流式输出标准 SSE（role 开头 → content 增量 → `[DONE]`）。\n- **工具调用**：`tools`/`tool_choice` 双向映射；多轮 tool 循环（assistant `tool_calls` → `function_call`，tool 消息 → `function_call_output`）；流式多函数并发按 `item_id` "},{"path":"README.md","content":"# OpenCode Responses Bridge (Chat Completions ↔ Responses API local adapter)\n\n> **🌏 Languages:** [English](README.md) · [中文](README.zh-CN.md)\n\n> **Skill Overview**\n>\n> **OpenCode Responses Bridge** is a zero-dependency local proxy that adapts OpenAI\n> **Chat Completions** ↔ **Responses API**. It lets any OpenAI-compatible agent client\n> (WorkBuddy, Cursor, Open WebUI, LobeChat, ...) use Responses-API-only models such as\n> OpenCode Go `gpt-5.6-luna` — with streaming SSE, tool calls, reasoning passthrough and\n> multimodal input. Python 3.8+, standard library only, no installs.\n>\n> **How to install**\n>\n> - **WorkBuddy / SkillHub:** install the skill from SkillHub (zip or CLI), then copy\n>   `scripts/proxy.py` + `scripts/start_proxy.bat` to a stable folder and run it.\n> - **ClawHub:** `clawhub install opencode-responses-bridge-skill`\n> - **GitHub:** `git clone https://github.com/ANDYPENG09/opencode-responses-bridge-skill`\n>\n> **How to invoke**\n>\n> - Start the proxy: `python3 proxy.py` (defaults to `http://127.0.0.1:8787`).\n> - Point your client's custom model URL at `http://127.0.0.1:8787/v1/chat/completions`.\n> - Smoke test: `curl http://127.0.0.1:8787/v1/chat/completions -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}'`\n\n---\n\n## What problem does it solve\n\nCustom-model channels in AI agent clients typically only speak the OpenAI **Chat Completions**\nprotocol, while some upstream models (typically OpenCode Go's `gpt-5.6-luna`) only expose the\nOpenAI **Responses API**. Direct configuration always fails, with common errors:\n\n- `HTTP 400 invalid_prompt` / `Invalid Responses API request`\n- WorkBuddy \"custom model error 10000\"\n- First message works, but **any message after history fails** (assistant history message\n  `content` arrays are not converted)\n\nThis proxy performs a **local protocol translation**: client → Chat Completions → proxy →\nResponses API → upstream → and back.\n\n## Features\n\n- **Zero dependencies**: pure Python standard library, Python 3.8+, no pip install\n- **Streaming SSE**: fully translated (role first → content deltas → `[DONE]`)\n- **Tool calls**: `tools`/`tool_choice` bidirectional mapping, multi-round tool loops,\n  concurrent streaming function calls with no lost arguments\n- **Reasoning**: upstream reasoning summaries → `reasoning_content` passthrough\n- **Multimodal**: `image_url` (URL / base64 data URL) → `input_image`\n- **Configurable upstream**: `OPENCODE_UPSTREAM` points to any Responses API endpoint,\n  not limited to OpenCode Go\n- **Single-point key management**: the proxy relays the key from the inbound `Authorization`\n  header; it never writes keys to disk or code\n\n## Quick start\n\n```\n# 1. Start the proxy (on Windows, double-click scripts/start_proxy.bat)\npython3 proxy.py                      # defaults to http://127.0.0.1:8787\n# 2. Smoke test\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn778b36z5e9wm29y1m36g4m7h8b269f\",\n  \"slug\": \"opencode-responses-bridge-skill\",\n  \"version\": \"0.1.0\",\n  \"publishedAt\": 1786174229304\n}"},{"path":"references/protocol-mapping.md","content":"# Responses API <-> Chat Completions 协议映射参考\n\n本文件记录代理 `scripts/proxy.py` 的协议转换细节，供排障或扩展时查阅。\n映射遵循 OpenAI 官方 Responses API / Chat Completions 规范，适用于任意 OpenAI 兼容上游；\n文中结论来自 2026-08-06 对 OpenCode Go 网关的实测（模型 `gpt-5.6-luna`、`deepseek-v4-flash`）。\n\n## 1. 端点到模型能力对照（OpenCode Go，实测）\n\n| 模型 | 端点 | 协议 | WorkBuddy 是否可直接用 |\n|---|---|---|---|\n| `deepseek-v4-flash` | `https://opencode.ai/zen/go/v1/chat/completions` | Chat Completions | ✅ 直接配置即可 |\n| `gpt-5.6-luna` | `https://opencode.ai/zen/go/v1/responses` | Responses API | ❌ 需本代理转接 |\n\n## 2. 关键坑\n\n- **模型 ID 不带前缀**：Go 网关模型 ID 是 `gpt-5.6-luna` / `deepseek-v4-flash`。\n  加 `opencode-go/` 前缀会返回 **HTTP 401**（网关按模型名做权限判定，误以为无权限）。\n- **Cloudflare 拦截**：urllib 默认 UA 会触发 Cloudflare `error code: 1010`（403）。\n  代理已内置浏览器 UA + `Accept: application/json, text/event-stream`。\n- **鉴权**：`Authorization: Bearer <key>`，Go 与 Zen 共用控制台同一把 API key；\n  订阅 Go 后该 key 对 Go 端点生效。\n- **assistant/content 数组必须转换（重要 bug，2026-08-06 修复）**：WorkBuddy 的会话历史\n  会把 assistant 消息的 `content` 序列化成数组（`[{\"type\":\"text\",\"text\":...}]`）。\n  Chat Completions 的 part 类型 `text` 在 Responses API 里**不存在**，原样透传会被网关判\n  `HTTP 400 invalid_prompt`（`Invalid Responses API request`）。代理必须把所有文本 part\n  统一重写为 `input_text`（user）或 `output_text`（assistant），图片 part → `input_image`。\n  症状：新会话第一条能用，一旦对话有历史（含 assistant 数组消息）就报\n  `自定义模型 xxx 错误 10000`（Trace ID 只出现在 WorkBuddy 侧）。\n\n## 3. 请求转换（Chat Completions -> Responses API）\n\n| Chat Completions | Responses API |\n|---|---|\n| `messages[]` role=system | 顶层 `instructions`（多条拼接；content 为数组时拼接其文本 part） |\n| `messages[]` role=user content=string | `{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":...}]}` |\n| user content part `{\"type\":\"text\",\"text\":...}` | `{\"type\":\"input_text\",\"text\":...}` |\n| user content part `{\"type\":\"image_url\",\"image_url\":{\"url\":...}}` | `{\"type\":\"input_image\",\"image_url\":...}` |\n| assistant content=string | `{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":...}]}` |\n| assistant content=数组 `[{\"type\":\"text\",...}]` | `{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":...}]}`（**必须重写类型，否则 invalid_prompt**） |\n| assistant `tool_calls[]` | `{\"type\":\"function_call\",\"call_id\",\"name\",\"arguments\"}`（arguments 为 JSON 字符串） |\n| role=tool 消息 | `{\"type\":\"function_call_output\",\"call_id\",\"output\"}` |\n| `tools[]` `{type:function,function:{name,description,parameters}}` | `{type:function,name,description,parameters}` |\n| `tool_choice` `{type:function,function:{name}}` | `{type:function,name}` |\n| `max_tokens` / `max_completion_tokens` | `max_output_tokens` |\n\n## 4. 响应转换（Responses API -> Chat Completions）\n\n| Responses API | Chat Completions |\n|---|---|\n| `output[].type=message` + `content[].type=output_text` | `choices[0].message.content` |\n| `output[].type=function_call`（含 `call_id`/`name`/`arguments`） | `choices[0].message.tool_calls[]`，`finish_reason=tool_calls` |\n| `output[].type=reasoning` + `summary[].text` | `message.reasoning_content` |\n| `usage.input_tokens/output_tokens/total_tokens` | `usage.prompt_tokens/completion_tokens"},{"path":"examples/basic.md","content":"# 示例：curl 输入/输出对\n\n以下请求直接打向本地代理 `http://127.0.0.1:8787/v1/chat/completions`，密钥放在\n`Authorization: Bearer <你的上游key>` 头。返回均为标准 OpenAI Chat Completions 结构。\n\n## 1. 文本（非流式）\n\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"What is 2+3? Answer in one short sentence.\"}],\"max_tokens\":80,\"stream\":false}'\n```\n\n期望输出（节选）：\n```\n{\n\t\"object\": \"chat.completion\",\n\t\"model\": \"gpt-5.6-luna\",\n\t\"choices\": [\n\t\t{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"2 + 3 equals 5.\"}, \"finish_reason\": \"stop\"}\n\t],\n\t\"usage\": {\"prompt_tokens\": 19, \"completion_tokens\": 12, \"total_tokens\": 31}\n}\n```\n\n## 2. 流式（SSE）\n\n```\ncurl -N http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"Count 1 to 5, one per line.\"}],\"max_tokens\":80,\"stream\":true}'\n```\n\n期望输出（节选）：\n```\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"delta\":{\"content\":\"1\\n2\\n3\\n4\\n5\"},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}]}\ndata: [DONE]\n```\n\n## 3. 工具调用\n\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\n\t\t\"messages\":[{\"role\":\"user\",\"content\":\"What is the weather in Shanghai? Use the get_weather tool.\"}],\n\t\t\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_weather\",\"description\":\"Get weather for a city\",\n\t\t\t\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"]}}}],\n\t\t\"tool_choice\":\"auto\",\"stream\":false}'\n```\n\n期望输出（节选）：\n```\n{\n\t\"choices\": [\n\t\t{\"index\": 0,\n\t\t\t\"message\": {\"role\": \"assistant\", \"content\": null,\n\t\t\t\t\"tool_calls\": [{\"id\": \"call_...\", \"type\": \"function\",\n\t\t\t\t\t\"function\": {\"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\":\\\"Shanghai\\\"}\"}}]},\n\t\t\t\"finish_reason\": \"tool_calls\"}\n\t]\n}\n```\n\n## 4. 多模态输入（图片）\n\n```\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n\t-H \"Authorization: Bearer YOUR_API_KEY\" -H \"Content-Type: application/json\" \\\n\t-d '{\"model\":\"gpt-5.6-luna\",\n\t\t\"messages\":[{\"role\":\"user\",\"content\":[\n\t\t\t{\"type\":\"text\",\"text\":\"What color is this image? Answer in one word.\"},\n\t\t\t{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}}\n\t\t]}],\n\t\t\"max_tokens\":300,\"stream\":false}'\n```\n\n期望输出（节选）：`content` 为模型对图片的回答（如 \"Gray\"），上游推理摘要出现在\n`reasoning_content` 字段。"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1423,"uniquenessScore":36,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T16:34:36.719Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:43:20.961Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}