import type { ProviderFactory, ProviderAdapter } from '../types.js'; /** * AWS Bedrock — managed access to foundation models on AWS infrastructure. * * v1 supports **Anthropic Claude models on Bedrock** (the dominant case on * AWS). Other model families on Bedrock (Llama, Nova, etc.) * surface a clear error pointing at the supported set — they can be added in * follow-up PRs as demand justifies. * * Auth uses the standard AWS credential chain: env vars (`AWS_ACCESS_KEY_ID`, * `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), IAM roles on EC2/ECS/Lambda, * `~/.aws/credentials`, etc. We don't accept credentials in `BedrockConfig` — * use environment-aware credentials so the same code works in dev and prod. * * Model strings: * `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0` * `bedrock/anthropic.claude-3-5-haiku-20241022-v1:0` * * @example * ```ts * // config/ai.ts * providers: { * bedrock: { * region: env('AWS_REGION', 'us-east-1'), * }, * } * ``` */ export interface BedrockConfig { region: string; /** * Optional explicit credentials. Prefer the AWS credential chain (env vars, * IAM roles); only set this for niche cases (multi-account explicit creds). */ credentials?: { accessKeyId: string; secretAccessKey: string; sessionToken?: string; }; } export declare class BedrockProvider implements ProviderFactory { readonly name = "bedrock"; private readonly config; constructor(config: BedrockConfig); create(model: string): ProviderAdapter; } /** * Bedrock model ids for Anthropic look like `anthropic.claude-3-5-sonnet-20241022-v2:0`. * Any other prefix (`meta.`, `amazon.`, `cohere.`, `mistral.`, `ai21.`) is a * different model family that needs its own conversion path. */ export declare function isAnthropicOnBedrock(model: string): boolean; //# sourceMappingURL=bedrock.d.ts.map