File tree Expand file tree Collapse file tree 2 files changed +15
-537
lines changed Expand file tree Collapse file tree 2 files changed +15
-537
lines changed Original file line number Diff line number Diff line change @@ -1825,7 +1825,22 @@ impl BamlRuntime {
18251825 let new_client = LLMProvider :: try_from ( ( & walker, ctx) ) . map ( Arc :: new) ?;
18261826
18271827 let mut required_env_vars = HashMap :: new ( ) ;
1828+
1829+ let uses_proxy_server = ctx. proxy_url ( ) . is_some ( ) ;
1830+
1831+ // If the client is Vertex or AWS Bedrock, we don't fail on
1832+ // missing required environment variables because we run a bunch
1833+ // of additional logic to resolve required values (i.e for
1834+ // Vertex if GOOGLE_CLOUD_PROJECT is not provided it can be
1835+ // found on the credentials property).
1836+ //
1837+ // If called with modular API, we don't fail either. User might
1838+ // want to insert the values later.
1839+ //
1840+ // When a proxy server is used, don't fail on missing required
1841+ // env vars because the proxy server is likely to provide them.
18281842 let fail_on_missing_required_env_vars = !ctx. is_modular_api ( )
1843+ && !uses_proxy_server
18291844 && !matches ! (
18301845 walker. item. elem. provider,
18311846 internal_llm_client:: ClientProvider :: AwsBedrock
You can’t perform that action at this time.
0 commit comments