import type { ConverseCommandInput } from "@aws-sdk/client-bedrock-runtime"; import { ModelRegistry } from "@batonfx/core"; import { Effect, Layer, Schema } from "effect"; import { LanguageModel } from "effect/unstable/ai"; import type { RegistrationOptions } from "./openai.js"; import { Client, type Options } from "./amazon-bedrock-client.js"; export { Client, ClientFailure, layerClient, isRecoverableCredentialFailure, type Interface, type Options, type Recovery, RecoveryFailure, } from "./amazon-bedrock-client.js"; export { CredentialFailure, defaultChain, type Credential, type Credentials } from "./amazon-bedrock-credentials.js"; export { makeRequest } from "./amazon-bedrock-request.js"; declare module "effect/unstable/ai/Prompt" { interface SystemMessageOptions extends ProviderOptions { readonly amazonBedrock?: { readonly cachePoint?: boolean; } | null; } interface TextPartOptions extends ProviderOptions { readonly amazonBedrock?: { readonly cachePoint?: boolean; } | null; } interface FilePartOptions extends ProviderOptions { readonly amazonBedrock?: { readonly cachePoint?: boolean; } | null; } interface ToolResultPartOptions extends ProviderOptions { readonly amazonBedrock?: { readonly cachePoint?: boolean; } | null; } interface ReasoningPartOptions extends ProviderOptions { readonly amazonBedrock?: { readonly signature?: string; readonly redactedData?: string; } | null; } } declare module "effect/unstable/ai/Response" { interface ReasoningPartMetadata extends ProviderMetadata { readonly amazonBedrock?: { readonly signature?: string; readonly redactedData?: string; } | null; } interface ReasoningDeltaPartMetadata extends ProviderMetadata { readonly amazonBedrock?: { readonly signature?: string; readonly redactedData?: string; } | null; } interface FinishPartMetadata extends ProviderMetadata { readonly amazonBedrock?: { readonly metrics?: { readonly latencyMs?: number; }; readonly trace?: import("effect").Schema.Json; readonly additionalModelResponseFields?: import("effect").Schema.Json; readonly performanceConfig?: import("effect").Schema.Json; } | null; } } /** @experimental */ export interface Config { readonly maxTokens?: number; readonly temperature?: number; readonly topP?: number; readonly stopSequences?: ReadonlyArray; readonly additionalModelRequestFields?: Readonly>; readonly additionalModelResponseFieldPaths?: ConverseCommandInput["additionalModelResponseFieldPaths"]; readonly guardrailConfig?: ConverseCommandInput["guardrailConfig"]; readonly performanceConfig?: ConverseCommandInput["performanceConfig"]; readonly promptVariables?: ConverseCommandInput["promptVariables"]; readonly requestMetadata?: ConverseCommandInput["requestMetadata"]; } /** @experimental Decodes persisted provider options into Bedrock request configuration. */ export declare const decodeConfig: (options: unknown) => Config; /** @experimental */ export interface Input extends RegistrationOptions { readonly model: string; readonly config?: Config; } /** @experimental */ export declare const make: (input: Input) => Effect.Effect; /** @experimental */ export declare const layerLanguageModel: (input: Input) => Layer.Layer; /** @experimental */ export declare const classifyFailure: ModelRegistry.FailureClassifier; /** @experimental */ export declare const toolJsonSchemaCompiler: ModelRegistry.ToolJsonSchemaCompiler; /** @experimental */ export declare const layer: (input: Input & { readonly client?: Options; }) => Layer.Layer;