GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(bedrock): use reasoningConfig for Anthropic models on Bedrock (#8… · coty/opencode@05019da

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/opencode/src/provider
    • transform.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/provider/transform.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/provider/transform.ts
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,25 @@ export namespace ProviderTransform {
364364

365365
case "@ai-sdk/amazon-bedrock":
366366
// https://v5.ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock
367+
// For Anthropic models on Bedrock, use reasoningConfig with budgetTokens
368+
if (model.api.id.includes("anthropic")) {
369+
return {
370+
high: {
371+
reasoningConfig: {
372+
type: "enabled",
373+
budgetTokens: 16000,
374+
},
375+
},
376+
max: {
377+
reasoningConfig: {
378+
type: "enabled",
379+
budgetTokens: 31999,
380+
},
381+
},
382+
}
383+
}
384+
385+
// For Amazon Nova models, use reasoningConfig with maxReasoningEffort
367386
return Object.fromEntries(
368387
WIDELY_SUPPORTED_EFFORTS.map((effort) => [
369388
effort,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.