mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
Fix: model_type not passed in ensure_tenant_model_id_for_params causing wrong tenant model lookup (#13782)
Summary When setting a default model for an OpenAI-API-Compatible provider, ensure_tenant_model_id_for_params called get_api_key without a model_type filter. If the same model name was registered under multiple types (e.g., both chat and embedding), it could return the wrong tenant_llm_id, leading to Model(@None) not authorized errors during chat. This applies the same type-scoped fix that PR #13569 introduced in get_model_config_by_type_and_name — now consistently in tenant_utils.py as well. Changes - Added _KEY_TO_MODEL_TYPE mapping in tenant_utils.py - Each model key (llm_id, embd_id, etc.) now passes its correct LLMType to get_api_key Fixes #13775
This commit is contained in:
committed by
GitHub
parent
356d45fda1
commit
c7ce062ea8