mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 16:17:25 +00:00
fix: resolve $var: in an AI resource's base_url (#12053)
The AI proxy resolved every credential field of a resource except base_url, so a base_url set with "Insert a Variable" reached URL validation as the literal $var: path and failed with "relative URL without a base". Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ca8f0a16c1
commit
210a235be6
@@ -315,7 +315,11 @@ async fn resolve_provider_credentials(
|
||||
let user_db = authed.map(|_| UserDB::new(db.clone()));
|
||||
|
||||
match resource {
|
||||
AIResource::Standard(resource) => {
|
||||
AIResource::Standard(mut resource) => {
|
||||
if let Some(base_url) = resource.base_url {
|
||||
resource.base_url =
|
||||
Some(resolve_var(base_url, db, w_id, user_db.as_ref(), authed).await?);
|
||||
}
|
||||
// Skip get_base_url for Bedrock - it uses SDK directly, not HTTP
|
||||
let base_url = if matches!(provider, AIProvider::AWSBedrock) {
|
||||
String::new()
|
||||
|
||||
Reference in New Issue
Block a user