Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: add support for options.profile on aws clients #1493

Open
wants to merge 7 commits into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 34 additions & 31 deletions engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions engine/baml-lib/llm-client/src/clients/aws_bedrock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,16 @@ impl UnresolvedAwsBedrock {
}
};

#[cfg(not(target_arch = "wasm32"))]
// #[cfg(not(target_arch = "wasm32"))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cfg attributes for wasm are now commented out so that the profile is always resolved. Consider removing the commented-out cfg checks entirely once the feature is stable to reduce confusion.

Suggested change
// #[cfg(not(target_arch = "wasm32"))]

let profile = match self.profile.as_ref() {
Some(profile) => Some(profile.resolve(ctx)?),
None => match ctx.get_env_var("AWS_PROFILE") {
Ok(profile) if !profile.is_empty() => Some(profile),
_ => None,
},
};
#[cfg(target_arch = "wasm32")]
let profile = None;
// #[cfg(target_arch = "wasm32")]
// let profile = None;

#[cfg(target_arch = "wasm32")]
{
Expand Down
10 changes: 8 additions & 2 deletions engine/baml-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ infer = "0.16.0"
url = "2.5.2"
shell-escape = "0.1.5"
aws-sigv4 = "1.2.2"
aws-credential-types = "1.2.0"
aws-credential-types = "1.2.1"
aws-runtime = "1.5.5"
aws-smithy-async = "1.2.1"
aws-smithy-runtime-api = "1.7.0"
aws-smithy-types = "1.2.0"
Expand Down Expand Up @@ -109,7 +110,12 @@ colored = { version = "2.1.0", default-features = false, features = [
] }
futures-timer = { version = "3.0.3", features = ["wasm-bindgen"] }
js-sys = "0.3.69"
reqwest = { version = "0.12.12", features = ["stream", "json", "native-tls-vendored", "native-tls-alpn"] }
reqwest = { version = "0.12.12", features = [
"stream",
"json",
"native-tls-vendored",
"native-tls-alpn",
] }
#
send_wrapper = { version = "0.6.0", features = ["futures"] }
serde-wasm-bindgen = "0.6.5"
Expand Down
Loading