feat(routing): add local model routing#3443
Closed
vvv214 wants to merge 2 commits intoagentscope-ai:mainfrom
Closed
feat(routing): add local model routing#3443vvv214 wants to merge 2 commits intoagentscope-ai:mainfrom
vvv214 wants to merge 2 commits intoagentscope-ai:mainfrom
Conversation
|
Hi @vvv214, this is your 5th Pull Request. 📋 About PR TemplateTo help maintainers review your PR faster, please make sure to include:
Complete PR information helps speed up the review process. You can edit the PR description to add these details. 🙌 Join Developer CommunityThanks so much for your contribution! We'd love to invite you to join the official QwenPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page: We truly appreciate your enthusiasm—and look forward to your future contributions! 😊 We'll review your PR soon. |
This was referenced Apr 15, 2026
Contributor
Author
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.


Theme
This PR brings QwenPaw's existing local/cloud routing config back into the live runtime and upgrades it from a mode-only skeleton to a deterministic routing v1.
What this PR adds
llm_routingback intocreate_model_and_formatterlocal/cloudconfig shapetool_choice=requiredWhat this PR does not add
Why now
QwenPaw still carries the
llm_routingconfig andRoutingChatModelskeleton onmain, but today it only doeslocal_first/cloud_first. This PR makes that path actually usable without expanding the config model.Related history
Testing
PYTHONPATH=src python -m pytest tests/unit/agents/test_prompt_multimodal_routing.py tests/unit/agents/test_routing_chat_model.py tests/unit/agents/test_routing_model_factory.py tests/unit/agents/test_model_factory_message_normalization.py -qpre-commit run --files src/qwenpaw/agents/prompt.py src/qwenpaw/agents/routing_chat_model.py src/qwenpaw/agents/model_factory.py tests/unit/agents/test_prompt_multimodal_routing.py tests/unit/agents/test_routing_chat_model.py tests/unit/agents/test_routing_model_factory.py tests/unit/agents/test_model_factory_message_normalization.py