Skip to main content

Documentation Index

Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt

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

OpenClaw 包含一个内置的 Amazon Bedrock Mantle 提供程序,用于连接 Mantle 的 OpenAI 兼容端点。Mantle 通过由 Bedrock 基础设施支持的标准 /v1/chat/completions 接口托管开源和第三方模型(GPT-OSS、Qwen、Kimi、GLM 等)。
属性
提供程序 IDamazon-bedrock-mantle
APIopenai-completions(OpenAI 兼容)或 anthropic-messages(Anthropic Messages 路由)
认证显式 AWS_BEARER_TOKEN_BEDROCK 或 IAM 凭证链 bearer token 生成
默认区域us-east-1(可通过 AWS_REGIONAWS_DEFAULT_REGION 覆盖)

入门

选择你偏好的认证方式并按照设置步骤进行。
最适合: 你已经拥有 Mantle bearer token 的环境。
1

在网关主机上设置 bearer token

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 token。然后它会通过查询 该区域的 /v1/models 端点来发现可用的 Mantle 模型。
行为详情
发现缓存结果缓存 1 小时
IAM token 刷新每小时
bearer token 与标准 Amazon Bedrock 提供程序使用的 AWS_BEARER_TOKEN_BEDROCK 相同。

支持的区域

us-east-1, us-east-2, us-west-2, ap-northeast-1, ap-south-1, ap-southeast-3, eu-central-1, eu-west-1, eu-west-2, eu-south-1, eu-north-1, sa-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,
          },
        ],
      },
    },
  },
}

高级配置

推理支持会根据模型 ID 中包含的模式进行推断,例如 thinkingreasonergpt-oss-120b。OpenClaw 会在发现过程中对匹配的模型自动设置 reasoning: true
如果 Mantle 端点不可用或未返回任何模型,该提供程序会被 静默跳过。OpenClaw 不会报错;其他已配置的提供程序 会继续正常工作。
Mantle 还公开了一个 Anthropic Messages 路由,通过相同的 bearer 认证流支持 Claude 模型。Claude Opus 4.7(amazon-bedrock-mantle/claude-opus-4.7)可以通过此路由调用,并由提供程序自身管理流式传输,因此 AWS bearer token 不会被视为 Anthropic API key。当你在 Mantle 提供程序上固定一个 Anthropic Messages 模型时,OpenClaw 会为该模型使用 anthropic-messages API 接口而不是 openai-completions。认证仍然来自 AWS_BEARER_TOKEN_BEDROCK(或生成的 IAM bearer token)。
{
  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 和认证

认证详情和凭证复用规则。

故障排查

常见问题及其解决方法。