Repository navigation
Fix: model selecton rule in get_model_config_by_type_and_name - #13569
Merged
Merged
Conversation
Magicbook1108
marked this pull request as draft
March 12, 2026 09:16
Magicbook1108
marked this pull request as ready for review
March 12, 2026 09:16
yingfeng
marked this pull request as draft
March 12, 2026 09:49
yingfeng
marked this pull request as ready for review
March 12, 2026 09:49
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13569 +/- ##
===========================================
+ Coverage 34.98% 46.72% +11.74%
===========================================
Files 44 44
Lines 9934 9986 +52
Branches 110 111 +1
===========================================
+ Hits 3475 4666 +1191
+ Misses 6446 5303 -1143
- Partials 13 17 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4 tasks done
4 tasks done
SyedShahmeerAli12
added a commit
to SyedShahmeerAli12/ragflow
that referenced
this pull request
Mar 25, 2026
When the same model name exists for multiple types (common with
OpenAI-API-Compatible providers), calling get_api_key without a
model_type filter could return the wrong tenant_llm_id, causing the
tenant_{key} columns to reference an incorrect model type.
This is the same class of bug fixed in PR infiniflow#13569 for
get_model_config_by_type_and_name, now applied consistently to
ensure_tenant_model_id_for_params in tenant_utils.py.
Fixes infiniflow#13775
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
SyedShahmeerAli12
added a commit
to SyedShahmeerAli12/ragflow
that referenced
this pull request
Apr 2, 2026
When the same model name exists for multiple types (common with
OpenAI-API-Compatible providers), calling get_api_key without a
model_type filter could return the wrong tenant_llm_id, causing the
tenant_{key} columns to reference an incorrect model type.
This is the same class of bug fixed in PR infiniflow#13569 for
get_model_config_by_type_and_name, now applied consistently to
ensure_tenant_model_id_for_params in tenant_utils.py.
Fixes infiniflow#13775
writinwaters
pushed a commit
to writinwaters/ragflow
that referenced
this pull request
Apr 10, 2026
…flow#13569) ### What problem does this PR solve? Fix: model selecton rule in get_model_config_by_type_and_name ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
SailedApple1991
pushed a commit
to SailedApple1991/greenlaw-ragflow
that referenced
this pull request
Apr 12, 2026
…flow#13569) Fix: model selecton rule in get_model_config_by_type_and_name - [x] Bug Fix (non-breaking change which fixes an issue)
yingfeng
pushed a commit
that referenced
this pull request
Apr 13, 2026
…ing 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
JasleenKaurSethi
pushed a commit
to stackhpc/ragflow
that referenced
this pull request
Apr 28, 2026
…flow#13569) ### What problem does this PR solve? Fix: model selecton rule in get_model_config_by_type_and_name ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
JasleenKaurSethi
pushed a commit
to stackhpc/ragflow
that referenced
this pull request
Apr 28, 2026
…ing wrong tenant model lookup (infiniflow#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 infiniflow#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 infiniflow#13775
tmimmanuel
pushed a commit
to tmimmanuel/ragflow
that referenced
this pull request
May 14, 2026
…ing wrong tenant model lookup (infiniflow#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 infiniflow#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 infiniflow#13775
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Fix: model selecton rule in get_model_config_by_type_and_name
Type of change