diff --git a/docs/providers/anthropic.md b/docs/providers/anthropic.md index 2e958f29757..93ac436857e 100644 --- a/docs/providers/anthropic.md +++ b/docs/providers/anthropic.md @@ -267,6 +267,13 @@ OpenClaw supports Anthropic's prompt caching feature for API-key auth. + + + Claude Opus 4.7 (`anthropic/claude-opus-4.7`) and its `claude-cli` variant are normalized to a 1M context window in resolved runtime metadata and active-agent status/context reporting. You do not need `params.context1m: true` for Opus 4.7; it no longer inherits the stale 200k fallback. + + Compaction and overflow handling use the 1M window automatically. Other Anthropic models keep their published limits. + + ## Troubleshooting diff --git a/docs/providers/bedrock-mantle.md b/docs/providers/bedrock-mantle.md index 45d767411a1..40f3de86f2b 100644 --- a/docs/providers/bedrock-mantle.md +++ b/docs/providers/bedrock-mantle.md @@ -13,12 +13,12 @@ the Mantle OpenAI-compatible endpoint. Mantle hosts open-source and third-party models (GPT-OSS, Qwen, Kimi, GLM, and similar) through a standard `/v1/chat/completions` surface backed by Bedrock infrastructure. -| Property | Value | -| -------------- | ----------------------------------------------------------------------------------- | -| Provider ID | `amazon-bedrock-mantle` | -| API | `openai-completions` (OpenAI-compatible) | -| Auth | Explicit `AWS_BEARER_TOKEN_BEDROCK` or IAM credential-chain bearer-token generation | -| Default region | `us-east-1` (override with `AWS_REGION` or `AWS_DEFAULT_REGION`) | +| Property | Value | +| -------------- | ------------------------------------------------------------------------------------------- | +| Provider ID | `amazon-bedrock-mantle` | +| API | `openai-completions` (OpenAI-compatible) or `anthropic-messages` (Anthropic Messages route) | +| Auth | Explicit `AWS_BEARER_TOKEN_BEDROCK` or IAM credential-chain bearer-token generation | +| Default region | `us-east-1` (override with `AWS_REGION` or `AWS_DEFAULT_REGION`) | ## Getting started @@ -147,6 +147,37 @@ If you prefer explicit config instead of auto-discovery: continue to work normally. + + Mantle also exposes an Anthropic Messages route that carries Claude models through the same bearer-authenticated streaming path. Claude Opus 4.7 (`amazon-bedrock-mantle/claude-opus-4.7`) is callable through this route with provider-owned streaming, so AWS bearer tokens are not treated like Anthropic API keys. + + When you pin an Anthropic Messages model on the Mantle provider, OpenClaw uses the `anthropic-messages` API surface instead of `openai-completions` for that model. Auth still comes from `AWS_BEARER_TOKEN_BEDROCK` (or the minted IAM bearer token). + + ```json5 + { + models: { + providers: { + "amazon-bedrock-mantle": { + models: [ + { + id: "claude-opus-4.7", + name: "Claude Opus 4.7", + api: "anthropic-messages", + reasoning: true, + input: ["text", "image"], + contextWindow: 1000000, + maxTokens: 32000, + }, + ], + }, + }, + }, + } + ``` + + Context-window metadata for discovered Mantle models uses known published limits when available and falls back conservatively for unlisted models, so compaction and overflow handling behave correctly for newer entries without overstating unknown models. + + + Bedrock Mantle is a separate provider from the standard [Amazon Bedrock](/providers/bedrock) provider. Mantle uses an diff --git a/docs/providers/lmstudio.md b/docs/providers/lmstudio.md index d5f18884915..55999ed595d 100644 --- a/docs/providers/lmstudio.md +++ b/docs/providers/lmstudio.md @@ -102,6 +102,20 @@ Interactive setup can prompt for an optional preferred load context length and a ## Configuration +### Streaming usage compatibility + +OpenClaw marks LM Studio as streaming-usage compatible, so token accounting no longer degrades to unknown or stale totals on streamed completions. OpenClaw also recovers token counts from llama.cpp-style `timings.prompt_n` / `timings.predicted_n` metadata when LM Studio does not emit an OpenAI-shaped `usage` object. + +Other OpenAI-compatible local backends covered by the same behavior: + +- vLLM +- SGLang +- llama.cpp +- LocalAI +- Jan +- TabbyAPI +- text-generation-webui + ### Explicit configuration ```json5 diff --git a/docs/providers/moonshot.md b/docs/providers/moonshot.md index f4de2040915..be7058b85a1 100644 --- a/docs/providers/moonshot.md +++ b/docs/providers/moonshot.md @@ -348,6 +348,26 @@ Config lives under `plugins.entries.moonshot.config.webSearch`: + + Moonshot Kimi serves native tool_call ids shaped like `functions.:` on the OpenAI-compatible transport. OpenClaw no longer strict-sanitizes these ids for Moonshot, so multi-turn agentic flows through Kimi K2.6 keep working past 2-3 tool-calling rounds when the serving layer matches mangled ids against the original tool definitions. + + If a custom OpenAI-compatible provider needs the previous behavior, set `sanitizeToolCallIds: true` on the provider entry. The flag lives on the shared `openai-compatible` replay family; Moonshot is wired to the opt-out by default. + + ```json5 + { + models: { + providers: { + "my-kimi-proxy": { + api: "openai-completions", + sanitizeToolCallIds: true, + }, + }, + }, + } + ``` + + + Native Moonshot endpoints (`https://api.moonshot.ai/v1` and `https://api.moonshot.cn/v1`) advertise streaming usage compatibility on the diff --git a/docs/providers/openai.md b/docs/providers/openai.md index 96e36d887ed..e3c9a1891eb 100644 --- a/docs/providers/openai.md +++ b/docs/providers/openai.md @@ -101,6 +101,12 @@ Choose your preferred auth method and follow the setup steps. ```bash openclaw models auth login --provider openai-codex ``` + + For headless or callback-hostile setups, add `--device-code` to sign in with a ChatGPT device-code flow instead of the localhost browser callback: + + ```bash + openclaw models auth login --provider openai-codex --device-code + ``` ```bash @@ -133,9 +139,9 @@ Choose your preferred auth method and follow the setup steps. } ``` - - If onboarding reuses an existing Codex CLI login, those credentials stay managed by Codex CLI. On expiry, OpenClaw re-reads the external Codex source first and writes the refreshed credential back to Codex storage. - + + Onboarding no longer imports OAuth material from `~/.codex`. Sign in with browser OAuth (default) or the device-code flow above — OpenClaw manages the resulting credentials in its own agent auth store. + ### Context window cap diff --git a/docs/providers/tencent.md b/docs/providers/tencent.md index 6685ee51517..b1955764b5b 100644 --- a/docs/providers/tencent.md +++ b/docs/providers/tencent.md @@ -8,8 +8,7 @@ read_when: # Tencent Cloud (TokenHub) -The Tencent Cloud provider gives access to Tencent Hy models via the TokenHub -endpoint (`tencent-tokenhub`). +Tencent Cloud ships as a **bundled provider plugin** in OpenClaw. It gives access to Tencent Hy models via the TokenHub endpoint (`tencent-tokenhub`). The provider uses an OpenAI-compatible API. @@ -45,6 +44,7 @@ openclaw onboard --non-interactive \ ## Notes - TokenHub model refs use `tencent-tokenhub/`. +- The plugin ships with tiered Hy3 pricing metadata built in, so cost estimates are populated without manual pricing overrides. - Override pricing and context metadata in `models.providers` if needed. ## Environment note