Skip to content

Conversation

@yyhhyyyyyy
Copy link
Collaborator

@yyhhyyyyyy yyhhyyyyyy commented Sep 9, 2025

add missing qwen3-max search configuration in frontend

Summary by CodeRabbit

  • New Features
    • Expanded search support to include the qwen3-max model, bringing it in line with existing DashScope-enabled models.
    • Users selecting qwen3-max will now see the search UI where applicable in chat and model configuration screens.
    • No changes to existing behavior for other models; overall experience remains consistent while broadening model compatibility.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

Walkthrough

Adds "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

Cohort / File(s) Summary
Search UI model allowlist updates
src/renderer/src/components/ChatConfig.vue, src/renderer/src/components/settings/ModelConfigDialog.vue
Include qwen3-max in model lists that enable search UI: added to enableSearchModels in ChatConfig and to supportedModels in showDashScopeSearch in ModelConfigDialog. No other logic modified.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • zerob13

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current description consists only of a brief title-like line and does not follow the required template sections for problem description, solution details, UI/UX changes, platform compatibility, or additional context. Please update the PR description to include the required template headings and content: explain the user problem, describe the solution, note any UI/UX or platform compatibility considerations, and provide additional context (including the Chinese section).
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely summarizes the main change by indicating the addition of the missing qwen3-max search configuration in the frontend and follows a conventional commit style without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

In the burrow of code, I twitch my nose,
A new model hops where the search light glows.
Qwen3-max joins the warren, neat and tight,
Toggle revealed—now everything’s right.
Thump-thump! I merge with a whiskered grin,
Carrots for tests, and a clean check-in. 🥕

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/missing-qwen3-max-search-config

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 both ModelConfigDialog.vue (used in showDashScopeSearch) and ChatConfig.vue (used in enableSearchModels) 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 only

Because 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 iteration

Compute 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 components

ChatConfig.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

📥 Commits

Reviewing files that changed from the base of the PR and between 3dc73a9 and 6e3c2e1.

📒 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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/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 correct

Including '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 consistent

This enables DashScope search options for qwen3-max in the dialog as intended.

@yyhhyyyyyy yyhhyyyyyy merged commit 0802a14 into dev Sep 9, 2025
2 checks passed
@zerob13 zerob13 deleted the fix/missing-qwen3-max-search-config branch January 6, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants