Skip to content

feat(console): add LLM routing UI (settings + chat selector)#3452

Draft
vvv214 wants to merge 1 commit into
agentscope-ai:mainfrom
vvv214:codex/qwenpaw-routing-ui
Draft

feat(console): add LLM routing UI (settings + chat selector)#3452
vvv214 wants to merge 1 commit into
agentscope-ai:mainfrom
vvv214:codex/qwenpaw-routing-ui

Conversation

@vvv214
Copy link
Copy Markdown
Contributor

@vvv214 vvv214 commented Apr 15, 2026

Description

Adds a Routing card under Settings > Models plus a routing-aware section in the Chat model selector.

This PR is console-only. It should be reviewed and merged after #3550, because it relies on the backend/runtime routing semantics introduced there:

  • GET/PUT /config/agents/llm-routing?agent_id=...
  • /models/active?scope=effective&agent_id=...
  • scope-aware effective model resolution matching runtime behavior

Without #3550, the UI can render and round-trip config, but agent-scoped routing behavior will not be fully aligned at runtime.

Related Issue: Relates to #849

Security Considerations: No new auth surface. UI only; uses existing backend APIs.

Type of Change

  • New feature
  • Refactoring

Component(s) Affected

  • Console (frontend web UI)
  • Tests

Checklist

  • If pre-commit auto-fixed files, I committed those changes and reran checks
  • I ran relevant tests locally and they pass
  • Documentation updated (if needed)
  • Draft for review

Testing

  • Settings → Models exposes global/agent routing controls.
  • Chat model selector shows routing state and lets users switch between local/cloud paths.
  • UI reads/writes:
    • GET/PUT /config/agents/llm-routing?agent_id=...
    • /models/active?scope=effective&agent_id=...

Local Verification Evidence

  • pre-commit checks on touched frontend files passed previously on this branch.
  • Manual verification completed against the current local backend:
    • Settings > Models routing card toggles and saves successfully
    • Chat routing trigger/badge updates and round-trips through backend
    • with current backend, cloud-routed and local-routed chats both return expected replies
    • official frontend still chats normally against the same current backend

Notes

  • #3550 is a prerequisite backend/runtime PR.
  • Rebased onto current main and conflict-resolved in console/src/pages/Chat/ModelSelector/index.tsx.
  • Local npm run build on this machine currently hits an unrelated @ant-design/plots resolution error under src/pages/Settings/AgentStats/index.tsx; this does not come from the routing UI diff itself.

@github-actions
Copy link
Copy Markdown

Welcome to QwenPaw! 🐾

Hi @vvv214, this is your 7th Pull Request.

📋 About PR Template

To help maintainers review your PR faster, please make sure to include:

  • Description - What this PR does and why
  • Type of Change - Bug fix / Feature / Breaking change / Documentation / Refactoring
  • Component(s) Affected - Core / Console / Channels / Skills / CLI / Documentation / Tests / CI/CD / Scripts
  • Checklist:
    • Run and pass pre-commit run --all-files
    • Run and pass relevant tests (pytest or as applicable)
    • Update documentation if needed
  • Testing - How to test these changes
  • Local Verification Evidence:
    pre-commit run --all-files
    # paste summary result
    
    pytest
    # paste summary result

Complete PR information helps speed up the review process. You can edit the PR description to add these details.

🙌 Join Developer Community

Thanks 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:
https://qwenpaw.agentscope.io/docs/community

We truly appreciate your enthusiasm—and look forward to your future contributions! 😊

We'll review your PR soon.


Tip

⭐ If you find QwenPaw useful, please give us a Star!

Star QwenPaw

Staying ahead

Star QwenPaw on GitHub and be instantly notified of new releases.

Your star helps more developers discover this project! 🐾

@vvv214 vvv214 force-pushed the codex/qwenpaw-routing-ui branch from 591109c to 8af7599 Compare April 17, 2026 15:58
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 15:58 — with GitHub Actions Waiting
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 16:03 — with GitHub Actions Waiting
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 16:15 — with GitHub Actions Waiting
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 17:43 — with GitHub Actions Waiting
@vvv214 vvv214 force-pushed the codex/qwenpaw-routing-ui branch from f961b2d to 50f5d87 Compare April 17, 2026 20:02
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 20:02 — with GitHub Actions Waiting
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 20:07 — with GitHub Actions Waiting
@vvv214 vvv214 force-pushed the codex/qwenpaw-routing-ui branch from 514cdd4 to afac619 Compare April 17, 2026 20:59
@vvv214 vvv214 requested a deployment to maintainer-approved April 17, 2026 20:59 — with GitHub Actions Waiting
@vvv214 vvv214 changed the title feat(console): add local model routing settings feat(console): add LLM routing UI (settings + chat selector) Apr 17, 2026
@vvv214 vvv214 requested a deployment to maintainer-approved April 18, 2026 01:04 — with GitHub Actions Waiting
@vvv214 vvv214 requested a deployment to maintainer-approved April 19, 2026 11:46 — with GitHub Actions Waiting
@vvv214 vvv214 force-pushed the codex/qwenpaw-routing-ui branch from ee8904c to 21a001f Compare April 19, 2026 11:49
@vvv214 vvv214 requested a deployment to maintainer-approved April 19, 2026 11:49 — with GitHub Actions Waiting
@vvv214 vvv214 requested a deployment to maintainer-approved April 19, 2026 12:05 — with GitHub Actions Waiting
@vvv214 vvv214 force-pushed the codex/qwenpaw-routing-ui branch 2 times, most recently from f294871 to 82fc86f Compare April 22, 2026 04:07
@vvv214 vvv214 marked this pull request as ready for review April 22, 2026 04:14
@vvv214 vvv214 force-pushed the codex/qwenpaw-routing-ui branch from 82fc86f to 8838ec3 Compare April 22, 2026 15:59
@vvv214 vvv214 marked this pull request as draft April 22, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant