/** * Amazon Bedrock Converse Stream provider. * * Talks directly to `bedrock-runtime.{region}.amazonaws.com` over HTTPS with * SigV4 signing and decodes the `application/vnd.amazon.eventstream` response. * No `@aws-sdk/*`, no `@smithy/*`, no `proxy-agent`. Proxies are honored via * Bun's native `HTTPS_PROXY` support. */ import type { Effort } from "@oh-my-pi/pi-catalog/effort"; import type { StreamFunction, StreamOptions, ThinkingBudgets } from "../types"; export type BedrockThinkingDisplay = "summarized" | "omitted"; export interface BedrockOptions extends StreamOptions { region?: string; profile?: string; /** Amazon Bedrock API key sent as `Authorization: Bearer`, ahead of SigV4 credential resolution. */ bearerToken?: string; toolChoice?: "auto" | "any" | "none" | { type: "tool"; name: string; }; reasoning?: Effort; thinkingBudgets?: ThinkingBudgets; interleavedThinking?: boolean; /** * Controls how Claude returns thinking content in Bedrock responses. * - `"summarized"`: thinking blocks include human-readable summaries (default here). * - `"omitted"`: thinking content is suppressed; the encrypted signature still * travels back for multi-turn continuity. * * Starting with Claude Opus 4.7 and Claude Fable/Mythos 5 the Anthropic API * default is `"omitted"`, which leaves callers waiting on a silent stream during * long reasoning runs (issue #1373). We default to `"summarized"` so adaptive- * thinking models that accept the field keep producing visible thinking deltas. * Older adaptive-thinking models (Opus 4.6, Sonnet 4.6+) reject the field, so * we omit it for them. */ thinkingDisplay?: BedrockThinkingDisplay; } export declare const streamBedrock: StreamFunction<"bedrock-converse-stream">;