Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Anthropic Bedrock request fails because SDK sends deprecated temperature parameter for Opus models

未关闭
#1,557 5 条评论 4 个 reaction 已指派 1 人 在 GitHub 查看

@roji 已经在做这个了。

开始于 2026年6月3日。

评估

这个 Issue 还没有评估数据。

描述

bug

When using Copilot SDK with Anthropic provider via Bedrock Mantle, Opus 4.7 and 4.8 inference fails with HTTP 400 because the upstream API rejects temperature for this model.

Error:
400 invalid_request_error: temperature is deprecated for this model.

Environment:

  • @github/copilot-sdk: 1.0.0 (also seen previously on 1.0.0-beta.12)
  • Runtime: Node.js on macOS
  • Provider: Anthropic via Bedrock Mantle
  • Model: anthropic.claude-opus-4-7/anthropic.claude-opus-4-8

Code to replicate:

import { CopilotClient, approveAll } from "@github/copilot-sdk";

const client = new CopilotClient();

await client.start();
const session = await client.createSession({
  onPermissionRequest: approveAll,
  provider: {
    type: "anthropic",
    baseUrl: `https://bedrock-mantle.${process.env.AWS_REGION}.api.aws/anthropic`,
    apiKey: process.env.BEDROCK_API_KEY,
    modelId: "anthropic.claude-opus-4-7", // Or "anthropic.claude-opus-4-8"
  },
});

const response = await session.sendAndWait({
  prompt: "List tools and skills.",
});

console.log(response);

await session.disconnect();
主要语言
Java
星标
10.5k
派生
1.5k
平均合并
1 天 9 小时
30 天内合并 PR
130

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/copilot-sdk 的其他 Issue

查看 github/copilot-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。