github / github/copilot-sdk

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

Offen
#1,557 5 Kommentare 4 Reaktionen 1 zugewiesene Person Beansprucht von @roji Auf GitHub ansehen
bug
Vorherrschende Sprache
Java
Sterne
10.5k
Forks
1.5k
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
128

Beschreibung

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:
```typescript
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();
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.