fix: resolve vision support from the canonical catalog for all providers (#12522)

Co-authored-by: elgeom <elgeom@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
This commit is contained in:
elgeom
2026-09-25 17:09:27 +00:00
committed by GitHub
parent fc9b2a5be4
commit 04ed836c8c
+22 -1
View File
@@ -43,7 +43,9 @@ fn apply_canonical_limits(provider_name: &str, model: ModelConfig) -> ModelConfi
if provider_name == goose_providers::azure_foundry::AZURE_FOUNDRY_PROVIDER_NAME {
model
} else {
model.with_canonical_limits(provider_name)
model
.with_canonical_limits(provider_name)
.with_canonical_vision_support(provider_name)
}
}
@@ -339,3 +341,22 @@ mod azure_foundry_tests {
assert_eq!(config.thinking_effort(), None);
}
}
#[cfg(test)]
mod canonical_vision_tests {
use super::*;
#[test]
fn apply_canonical_limits_resolves_vision_support() {
let model = apply_canonical_limits("alibaba-token-plan", ModelConfig::new("qwen3.8-flash"));
assert_eq!(model.supports_vision, Some(true));
}
#[test]
fn apply_canonical_limits_leaves_unknown_providers_untouched() {
let model = apply_canonical_limits("my-custom-provider", ModelConfig::new("some-model"));
assert_eq!(model.supports_vision, None);
}
}