General contributing instructions: https://github.com/BoundaryML/baml/blob/canary/CONTRIBUTING.md
Code pointers:
client<llm> definition in engine/baml-lib/llm-client/src/clients/aws_bedrock.rsaws_sdk_bedrockruntime client in Rust code in engine/baml-runtime/src/internal/llm_client/primitive/aws/aws_client.rsNotes on things that are not inherently obvious:
UnresolvedAwsBedrock and StringOr etc exist because we allow options to be loaded from environment variables, and these are resolved late at runtime, so we don’t check these at compile-timeoptions are usually request field properties; any field that we do not have special handling for we forward to the underlying model provider via additional_model_request_fieldscfg(target_arch = "wasm32") code exists because baml gets compiled into webassembly (in addition to x86_64, aarch64) - but i don’t think this is super relevant in this caseRoughly what you’ll probably want to do is:
UnresolvedAwsBedrock and ResolvedAwsBedrockResolvedAwsBedrock available in AwsClient.properties
dynamic_new and newclient_anyhow() this field can get wired into the bedrock client here, right before loader.load().await