fix: override AzureModelMapperFunc to preserve deployment name as-is

This commit is contained in:
liweixin
2026-04-07 20:24:04 +08:00
committed by lyingbug
parent 4e4118d406
commit c6215405a5
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -37,6 +37,9 @@ func NewRemoteAPIVLM(config *Config) (*RemoteAPIVLM, error) {
var apiCfg openai.ClientConfig
if providerName == provider.ProviderAzureOpenAI {
apiCfg = openai.DefaultAzureConfig(config.APIKey, config.BaseURL)
apiCfg.AzureModelMapperFunc = func(model string) string {
return model
}
if config.Extra != nil {
if v, ok := config.Extra["api_version"]; ok {
if vs, ok := v.(string); ok && vs != "" {