diff --git a/docs/gateway/configuration-reference.md b/docs/gateway/configuration-reference.md index b766b8e2ce9..ed80888110a 100644 --- a/docs/gateway/configuration-reference.md +++ b/docs/gateway/configuration-reference.md @@ -2338,10 +2338,10 @@ Set `ZAI_API_KEY`. `z.ai/*` and `z-ai/*` are accepted aliases. Shortcut: `opencl id: "kimi-k2.5", name: "Kimi K2.5", reasoning: false, - input: ["text"], + input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, - contextWindow: 256000, - maxTokens: 8192, + contextWindow: 262144, + maxTokens: 262144, }, ], }, @@ -2352,6 +2352,10 @@ Set `ZAI_API_KEY`. `z.ai/*` and `z-ai/*` are accepted aliases. Shortcut: `opencl For the China endpoint: `baseUrl: "https://api.moonshot.cn/v1"` or `openclaw onboard --auth-choice moonshot-api-key-cn`. +Native Moonshot endpoints advertise streaming usage compatibility on the shared +`openai-completions` transport, and OpenClaw now keys that off endpoint +capabilities rather than the built-in provider id alone. + @@ -2361,8 +2365,8 @@ For the China endpoint: `baseUrl: "https://api.moonshot.cn/v1"` or `openclaw onb env: { KIMI_API_KEY: "sk-..." }, agents: { defaults: { - model: { primary: "kimi-coding/k2p5" }, - models: { "kimi-coding/k2p5": { alias: "Kimi K2.5" } }, + model: { primary: "kimi/kimi-code" }, + models: { "kimi/kimi-code": { alias: "Kimi Code" } }, }, }, } diff --git a/docs/plugins/sdk-overview.md b/docs/plugins/sdk-overview.md index 97fa6e50209..a9ced1155a5 100644 --- a/docs/plugins/sdk-overview.md +++ b/docs/plugins/sdk-overview.md @@ -80,7 +80,7 @@ subpaths is in `scripts/lib/plugin-sdk-entrypoints.json`. | `plugin-sdk/cli-backend` | CLI backend defaults + watchdog constants | | `plugin-sdk/provider-auth` | `createProviderApiKeyAuthMethod`, `ensureApiKeyFromOptionEnvOrPrompt`, `upsertAuthProfile` | | `plugin-sdk/provider-model-shared` | `normalizeModelCompat`, `buildProviderReplayFamilyHooks`, `sanitizeGoogleGeminiReplayHistory`, `resolveTaggedReasoningOutputMode` | - | `plugin-sdk/provider-catalog-shared` | `findCatalogTemplate`, `buildSingleProviderApiKeyCatalog` | + | `plugin-sdk/provider-catalog-shared` | `findCatalogTemplate`, `buildSingleProviderApiKeyCatalog`, `supportsNativeStreamingUsageCompat`, `applyProviderNativeStreamingUsageCompat` | | `plugin-sdk/provider-tools` | `buildProviderToolCompatFamilyHooks`, Gemini schema helpers | | `plugin-sdk/provider-usage` | `fetchClaudeUsage` and similar | | `plugin-sdk/provider-stream` | Stream wrapper types + provider stream wrappers | diff --git a/docs/plugins/sdk-provider-plugins.md b/docs/plugins/sdk-provider-plugins.md index 26e6a736c98..e7fa9188262 100644 --- a/docs/plugins/sdk-provider-plugins.md +++ b/docs/plugins/sdk-provider-plugins.md @@ -208,6 +208,14 @@ API key auth, and dynamic model resolution. `createDefaultModelsPresetAppliers(...)`, and `createModelCatalogPresetAppliers(...)`. + When a provider's native endpoint supports streamed usage blocks on the + normal `openai-completions` transport, prefer the shared catalog helpers in + `openclaw/plugin-sdk/provider-catalog-shared` instead of hardcoding + provider-id checks. `supportsNativeStreamingUsageCompat(...)` and + `applyProviderNativeStreamingUsageCompat(...)` detect support from the + endpoint capability map, so native Moonshot/DashScope-style endpoints still + opt in even when a plugin is using a custom provider id. + diff --git a/docs/providers/moonshot.md b/docs/providers/moonshot.md index 5440e797520..4ae637f835c 100644 --- a/docs/providers/moonshot.md +++ b/docs/providers/moonshot.md @@ -178,6 +178,11 @@ Config lives under `plugins.entries.moonshot.config.webSearch`: - Moonshot model refs use `moonshot/`. Kimi Coding model refs use `kimi/`. - Current Kimi Coding default model ref is `kimi/kimi-code`. Legacy `kimi/k2p5` remains accepted as a compatibility model id. - Kimi web search uses `KIMI_API_KEY` or `MOONSHOT_API_KEY`, and defaults to `https://api.moonshot.ai/v1` with model `kimi-k2.5`. +- Native Moonshot endpoints (`https://api.moonshot.ai/v1` and + `https://api.moonshot.cn/v1`) advertise streaming usage compatibility on the + shared `openai-completions` transport. OpenClaw now keys that off endpoint + capabilities, so compatible custom provider ids targeting the same native + Moonshot hosts inherit the same streaming-usage behavior. - Override pricing and context metadata in `models.providers` if needed. - If Moonshot publishes different context limits for a model, adjust `contextWindow` accordingly. diff --git a/docs/providers/qwen_modelstudio.md b/docs/providers/qwen_modelstudio.md index 16d72de5e13..4d4dadcef10 100644 --- a/docs/providers/qwen_modelstudio.md +++ b/docs/providers/qwen_modelstudio.md @@ -72,6 +72,12 @@ After onboarding, set a default model: The provider auto-selects the endpoint based on your auth choice. You can override with a custom `baseUrl` in config. +Native Model Studio endpoints advertise streaming usage compatibility on the +shared `openai-completions` transport. OpenClaw keys that off endpoint +capabilities now, so DashScope-compatible custom provider ids targeting the +same native hosts inherit the same streaming-usage behavior instead of +requiring the built-in `modelstudio` provider id specifically. + ## Get your API key - **China**: [bailian.console.aliyun.com](https://bailian.console.aliyun.com/) @@ -96,6 +102,14 @@ OpenClaw currently ships this bundled Model Studio catalog: Availability can still vary by endpoint and billing plan even when a model is present in the bundled catalog. +Native-streaming usage compatibility applies to both the Coding Plan hosts and +the Standard DashScope-compatible hosts: + +- `https://coding.dashscope.aliyuncs.com/v1` +- `https://coding-intl.dashscope.aliyuncs.com/v1` +- `https://dashscope.aliyuncs.com/compatible-mode/v1` +- `https://dashscope-intl.aliyuncs.com/compatible-mode/v1` + ## Qwen 3.6 Plus availability `qwen3.6-plus` is available on the Standard (pay-as-you-go) Model Studio