diff --git a/CHANGELOG.md b/CHANGELOG.md index dea5a6c89ec..a7696e57657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Docs: https://docs.openclaw.ai - Plugins/CLI: include package dependency install state in `openclaw plugins list --json` so scripts can spot missing plugin dependencies without runtime-loading plugins. - Discord/status: add degraded Discord transport and gateway event-loop starvation signals to `openclaw channels status`, `openclaw status --deep`, and fetch-timeout logs so intermittent socket resets do not look like a healthy running channel. (#76327) Thanks @joshavant. - Providers/OpenRouter: add opt-in response caching params that send OpenRouter's `X-OpenRouter-Cache`, `X-OpenRouter-Cache-TTL`, and cache-clear headers only on verified OpenRouter routes. Thanks @vincentkoc. +- Providers/OpenRouter: expand app-attribution categories so OpenClaw advertises coding, programming, writing, chat, and personal-agent usage on verified OpenRouter routes. Thanks @vincentkoc. - Plugins/update: on the beta OpenClaw update channel, default-line npm and ClawHub plugin updates try `@beta` first and fall back to default/latest when no plugin beta release exists. - Channels/WhatsApp: support explicit WhatsApp Channel/Newsletter `@newsletter` outbound message targets with channel session metadata instead of DM routing. Fixes #13417; carries forward the narrow outbound target idea from #13424. Thanks @vincentkoc and @agentz-manfred. - Exec approvals: add a tree-sitter-backed shell command explainer for future approval and command-review surfaces. (#75004) Thanks @jesse-merhi. diff --git a/docs/providers/openrouter.md b/docs/providers/openrouter.md index 97c7b3b9def..cf1861f7f0f 100644 --- a/docs/providers/openrouter.md +++ b/docs/providers/openrouter.md @@ -139,11 +139,11 @@ OpenRouter uses a Bearer token with your API key under the hood. On real OpenRouter requests (`https://openrouter.ai/api/v1`), OpenClaw also adds OpenRouter's documented app-attribution headers: -| Header | Value | -| ------------------------- | --------------------- | -| `HTTP-Referer` | `https://openclaw.ai` | -| `X-OpenRouter-Title` | `OpenClaw` | -| `X-OpenRouter-Categories` | `cli-agent` | +| Header | Value | +| ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `HTTP-Referer` | `https://openclaw.ai` | +| `X-OpenRouter-Title` | `OpenClaw` | +| `X-OpenRouter-Categories` | `cli-agent,cloud-agent,programming-app,creative-writing,writing-assistant,general-chat,personal-agent` | If you repoint the OpenRouter provider at some other proxy or base URL, OpenClaw diff --git a/src/agents/pi-embedded-runner/proxy-stream-wrappers.test.ts b/src/agents/pi-embedded-runner/proxy-stream-wrappers.test.ts index 0c60c70dfee..1921553ec90 100644 --- a/src/agents/pi-embedded-runner/proxy-stream-wrappers.test.ts +++ b/src/agents/pi-embedded-runner/proxy-stream-wrappers.test.ts @@ -56,7 +56,8 @@ describe("proxy stream wrappers", () => { headers: { "HTTP-Referer": "https://openclaw.ai", "X-OpenRouter-Title": "OpenClaw", - "X-OpenRouter-Categories": "cli-agent", + "X-OpenRouter-Categories": + "cli-agent,cloud-agent,programming-app,creative-writing,writing-assistant,general-chat,personal-agent", "X-Custom": "1", }, }, diff --git a/src/agents/provider-attribution.test.ts b/src/agents/provider-attribution.test.ts index 6f1e6076f08..df7956800f8 100644 --- a/src/agents/provider-attribution.test.ts +++ b/src/agents/provider-attribution.test.ts @@ -115,7 +115,8 @@ describe("provider attribution", () => { headers: { "HTTP-Referer": "https://openclaw.ai", "X-OpenRouter-Title": "OpenClaw", - "X-OpenRouter-Categories": "cli-agent", + "X-OpenRouter-Categories": + "cli-agent,cloud-agent,programming-app,creative-writing,writing-assistant,general-chat,personal-agent", }, }); }); @@ -128,7 +129,8 @@ describe("provider attribution", () => { ).toEqual({ "HTTP-Referer": "https://openclaw.ai", "X-OpenRouter-Title": "OpenClaw", - "X-OpenRouter-Categories": "cli-agent", + "X-OpenRouter-Categories": + "cli-agent,cloud-agent,programming-app,creative-writing,writing-assistant,general-chat,personal-agent", }); }); diff --git a/src/agents/provider-attribution.ts b/src/agents/provider-attribution.ts index dc435debe30..3f26bd4d29d 100644 --- a/src/agents/provider-attribution.ts +++ b/src/agents/provider-attribution.ts @@ -123,6 +123,8 @@ function readCompatBoolean( const OPENCLAW_ATTRIBUTION_PRODUCT = "OpenClaw"; const OPENCLAW_ATTRIBUTION_ORIGINATOR = "openclaw"; +const OPENROUTER_ATTRIBUTION_CATEGORIES = + "cli-agent,cloud-agent,programming-app,creative-writing,writing-assistant,general-chat,personal-agent"; const LOCAL_ENDPOINT_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]); const OPENAI_RESPONSES_APIS = new Set([ @@ -473,7 +475,7 @@ function buildOpenRouterAttributionPolicy( headers: { "HTTP-Referer": "https://openclaw.ai", "X-OpenRouter-Title": identity.product, - "X-OpenRouter-Categories": "cli-agent", + "X-OpenRouter-Categories": OPENROUTER_ATTRIBUTION_CATEGORIES, }, }; } diff --git a/src/agents/provider-request-config.test.ts b/src/agents/provider-request-config.test.ts index d077a2a8c8d..c5cb9f05807 100644 --- a/src/agents/provider-request-config.test.ts +++ b/src/agents/provider-request-config.test.ts @@ -457,7 +457,8 @@ describe("provider request config", () => { expect(resolved).toEqual({ "HTTP-Referer": "https://openclaw.ai", "X-OpenRouter-Title": "OpenClaw", - "X-OpenRouter-Categories": "cli-agent", + "X-OpenRouter-Categories": + "cli-agent,cloud-agent,programming-app,creative-writing,writing-assistant,general-chat,personal-agent", "X-Custom": "1", }); });