-
Notifications
You must be signed in to change notification settings - Fork 614
fix: add missing qwen3-max search configuration in frontend #877
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
Conversation
WalkthroughAdds "qwen3-max" to model allowlists that gate display of search-related UI. Updates occur in ChatConfig.vue (enableSearchModels for search config) and ModelConfigDialog.vue (DashScope search visibility check). No exported/public APIs were changed; control flow and other logic remain the same. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant ChatConfig.vue as ChatConfig
participant ModelConfigDialog.vue as ModelConfigDialog
participant SearchUI as Search UI
User->>ChatConfig: Open chat config
ChatConfig->>ChatConfig: modelId in enableSearchModels?<br/>(now includes "qwen3-max")
alt Enabled
ChatConfig->>SearchUI: Show search config controls
else Disabled
ChatConfig-->>User: Hide search config
end
User->>ModelConfigDialog: Open model settings
ModelConfigDialog->>ModelConfigDialog: isDashscope && modelId includes any supportedModels<br/>(now includes "qwen3-max")
alt Visible
ModelConfigDialog->>SearchUI: Show DashScope search section
else Hidden
ModelConfigDialog-->>User: Hide DashScope search section
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/components/settings/ModelConfigDialog.vue (1)
747-761: Consolidate DashScope model allowlist into shared constant
Extract the hard-coded model lists from bothModelConfigDialog.vue(used inshowDashScopeSearch) andChatConfig.vue(used inenableSearchModels) into a single shared constant/module and import it in each component to avoid duplication and ensure consistency.
🧹 Nitpick comments (3)
src/renderer/src/components/ChatConfig.vue (2)
122-134: Deduplicate variants; keep stable prefixes onlyBecause you match with includes(), keeping only base prefixes is sufficient and avoids future drift. Also mark the list readonly.
Apply this diff:
// 支持搜索的模型列表 - const enableSearchModels = [ - 'qwen3-max', - 'qwen-max', - 'qwen-plus', - 'qwen-plus-latest', - 'qwen-plus-2025-07-14', - 'qwen-flash', - 'qwen-flash-2025-07-28', - 'qwen-turbo', - 'qwen-turbo-latest', - 'qwen-turbo-2025-07-15', - 'qwq-plus' - ] + const enableSearchModels = [ + 'qwen3-max', + 'qwen-max', + 'qwen-plus', + 'qwen-flash', + 'qwen-turbo', + 'qwq-plus' + ] as const
136-138: Micro: avoid lowercasing twice per iterationCompute once for readability and tiny perf win.
Apply this diff:
- return enableSearchModels.some((modelName) => - props.modelId?.toLowerCase().includes(modelName.toLowerCase()) - ) + const lowerModelId = props.modelId.toLowerCase() + return enableSearchModels.some((m) => lowerModelId.includes(m))src/renderer/src/components/settings/ModelConfigDialog.vue (1)
751-758: DRY the model allowlist across componentsChatConfig.vue maintains a similar allowlist. Extract a single shared constant to prevent future mismatches.
Example follow-up (optional):
- Create a shared const (e.g., DASH_SCOPE_SEARCHABLE_MODELS) and import it here and in ChatConfig.vue.
- Replace the local array with that const.
Do you want me to draft the shared constants module and the two import updates?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/renderer/src/components/ChatConfig.vue(1 hunks)src/renderer/src/components/settings/ModelConfigDialog.vue(1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
src/renderer/src/**/*
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/**/*.{vue,ts,js,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
渲染进程代码放在
src/renderer
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/src/**/*.vue
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
Use scoped styles to prevent CSS conflicts between components
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
Avoid enums; use const objects instead.
Use arrow functions for methods and computed properties.
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/**/*.{vue,ts}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Implement lazy loading for routes and components.
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/**/*.{ts,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.Use Pinia for frontend state management (do not introduce alternative state libraries)
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
**/*.{ts,tsx,js,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use English for all logs and comments
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/{src,shell,floating}/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
src/renderer/src/components/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Organize UI components by feature within src/renderer/src/
Files:
src/renderer/src/components/settings/ModelConfigDialog.vuesrc/renderer/src/components/ChatConfig.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-check (x64)
🔇 Additional comments (2)
src/renderer/src/components/ChatConfig.vue (1)
122-134: Addition of qwen3-max is correctIncluding 'qwen3-max' in the DashScope searchable models matches the PR intent and will surface the search UI for that model as expected.
src/renderer/src/components/settings/ModelConfigDialog.vue (1)
751-758: Addition of qwen3-max is correct and consistentThis enables DashScope search options for qwen3-max in the dialog as intended.
add missing qwen3-max search configuration in frontend
Summary by CodeRabbit