-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
fix(proxy): keep the model-group alias through vector store credential merges #36104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,7 +174,8 @@ async def test_vector_store_file_list_resolves_credentials_from_model_query_para | |
|
|
||
| assert result["api_key"] == "sk-team-openai" | ||
| assert result["api_base"] == "https://api.openai.com/v1" | ||
| assert result["model"] == "openai/gpt-4o-mini" | ||
| # routing stays on the model-group alias, not the deployment's provider model (#36103) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This change adds explanatory inline comments here and at the other modified alias-routing assertions, despite the repository instruction prohibiting new comments unless explicitly requested. Remove the four redundant comments while retaining the assertions. Context Used: CLAUDE.md (source) Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| assert result["model"] == "team-openai" | ||
| assert "custom_llm_provider" not in result | ||
| llm_router.get_deployment_credentials_with_provider.assert_called_once_with( | ||
| model_id="team-openai" | ||
|
|
@@ -207,7 +208,8 @@ async def test_vector_store_file_list_resolves_single_openai_team_deployment(): | |
|
|
||
| assert result["api_key"] == "sk-team-openai" | ||
| assert result["api_base"] == "https://api.openai.com/v1" | ||
| assert result["model"] == "openai/gpt-4o-mini" | ||
| # routing stays on the model-group alias, not the deployment's provider model (#36103) | ||
| assert result["model"] == "team-openai" | ||
| assert "custom_llm_provider" not in result | ||
| llm_router.get_deployment_credentials_with_provider.assert_called_once_with( | ||
| model_id="team-openai", team_id=None | ||
|
|
@@ -245,7 +247,8 @@ async def test_vector_store_file_list_wildcard_model_hint_falls_back_to_team_dep | |
|
|
||
| assert result["api_key"] == "sk-team-openai" | ||
| assert result["api_base"] == "https://api.openai.com/v1" | ||
| assert result["model"] == "openai/gpt-4o-mini" | ||
| # routing stays on the matched team alias, not the deployment's provider model (#36103) | ||
| assert result["model"] == "team-openai" | ||
| assert "custom_llm_provider" not in result | ||
| assert llm_router.get_deployment_credentials_with_provider.call_count == 3 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a vector-store operation uses a simple encoded file ID containing a model-group alias, the sibling branch merges credentials without passing
model_usedasrouting_model. This replaces the alias with the underlying deployment model, causing incorrect group routing and attribution or a model-not-found response. How this was verified: The encoded-ID branch flows into router dispatch without any later assignment restoringmodel_usedafter the credential merge.Rule Used: What: For security fix PRs, NEVER mention what sec... (source)
Knowledge Base Used: Proxy Server Request Flow