跳轉到主要內容

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

OpenClaw 包含一個內建的 Amazon Bedrock Mantle 提供者,可連接到 Mantle 的 OpenAI 相容端點。Mantle 透過標準 /v1/chat/completions 介面提供由 Bedrock 基礎架構支援的開源與 第三方模型(GPT-OSS、Qwen、Kimi、GLM 及類似模型)。
屬性
提供者 IDamazon-bedrock-mantle
APIopenai-completions(OpenAI 相容)或 anthropic-messages(Anthropic Messages 路由)
驗證明確的 AWS_BEARER_TOKEN_BEDROCK 或 IAM 憑證鏈 Bearer 權杖產生
預設區域us-east-1(使用 AWS_REGIONAWS_DEFAULT_REGION 覆寫)

開始使用

選擇偏好的驗證方法並依照設定步驟操作。
最適合: 已有 Mantle Bearer 權杖的環境。
1

在 Gateway 主機上設定 Bearer 權杖

export AWS_BEARER_TOKEN_BEDROCK="..."
也可以設定區域(預設為 us-east-1):
export AWS_REGION="us-west-2"
2

驗證已探索到模型

openclaw models list
已探索到的模型會出現在 amazon-bedrock-mantle 提供者底下。除非 你想覆寫預設值,否則不需要其他設定。

自動模型探索

設定 AWS_BEARER_TOKEN_BEDROCK 時,OpenClaw 會直接使用它。否則, OpenClaw 會嘗試從 AWS 預設憑證鏈產生 Mantle Bearer 權杖。接著會透過查詢該 區域的 /v1/models 端點來探索可用的 Mantle 模型。
行為詳細資料
探索快取結果快取 1 小時
IAM 權杖重新整理每小時
Bearer 權杖與標準 Amazon Bedrock 提供者使用的 AWS_BEARER_TOKEN_BEDROCK 相同。

支援的區域

us-east-1us-east-2us-west-2ap-northeast-1ap-south-1ap-southeast-3eu-central-1eu-west-1eu-west-2eu-south-1eu-north-1sa-east-1

手動設定

如果你偏好明確設定而非自動探索:
{
  models: {
    providers: {
      "amazon-bedrock-mantle": {
        baseUrl: "https://bedrock-mantle.us-east-1.api.aws/v1",
        api: "openai-completions",
        auth: "api-key",
        apiKey: "env:AWS_BEARER_TOKEN_BEDROCK",
        models: [
          {
            id: "gpt-oss-120b",
            name: "GPT-OSS 120B",
            reasoning: true,
            input: ["text"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 32000,
            maxTokens: 4096,
          },
        ],
      },
    },
  },
}

進階設定

推理支援會從包含類似 thinkingreasonergpt-oss-120b 模式的模型 ID 推斷。OpenClaw 會在探索期間,為相符模型自動設定 reasoning: true
如果 Mantle 端點無法使用或沒有傳回模型,該提供者會被靜默略過。OpenClaw 不會報錯;其他已設定的提供者會繼續正常運作。
Mantle 也提供 Anthropic Messages 路由,透過相同的 Bearer 驗證串流路徑承載 Claude 模型。Claude Opus 4.7(amazon-bedrock-mantle/claude-opus-4.7)可透過此路由以提供者擁有的串流呼叫,因此 AWS Bearer 權杖不會被視為 Anthropic API 金鑰。當你在 Mantle 提供者上固定使用 Anthropic Messages 模型時,OpenClaw 會針對該模型使用 anthropic-messages API 介面,而不是 openai-completions。驗證仍來自 AWS_BEARER_TOKEN_BEDROCK(或鑄造的 IAM Bearer 權杖)。
{
  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,
          },
        ],
      },
    },
  },
}
Bedrock Mantle 是不同於標準 Amazon Bedrock 提供者的獨立提供者。Mantle 使用 OpenAI 相容的 /v1 介面,而標準 Bedrock 提供者使用 原生 Bedrock API。兩個提供者在存在時會共享相同的 AWS_BEARER_TOKEN_BEDROCK 憑證。

相關

Amazon Bedrock

用於 Anthropic Claude、Titan 和其他模型的原生 Bedrock 提供者。

模型選擇

選擇提供者、模型參照與容錯移轉行為。

OAuth 與驗證

驗證詳細資料與憑證重用規則。

疑難排解

常見問題及其解決方式。