Skip to content

docs: add Qwen3 think/no_think config example (#1636) #1707

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

Merged
merged 3 commits into from
Jun 3, 2025

Conversation

s2010
Copy link
Contributor

@s2010 s2010 commented May 31, 2025

This PR adds a new configuration example (config.qwen3.yaml) under docs/config_examples for the Qwen3 “think” and “no_think” endpoints. It mirrors the existing DeepSeek example, swapping in the correct api_base and model names.
Closes #1636

Summary by CodeRabbit

  • Documentation

    • Added detailed instructions for using Qwen3 models in both Thinking and Non-Thinking modes, including usage examples and model descriptions.
    • Documented the requirement to set the OPENROUTER_API_KEY environment variable for OpenRouter integration.
  • New Features

    • Introduced a comprehensive example YAML configuration for WrenAI, showcasing customizable model, pipeline, and runtime settings, including support for Qwen3 model variants and multiple task-specific pipelines.

Copy link
Contributor

coderabbitai bot commented May 31, 2025

Walkthrough

A new section was added to the configuration examples documentation, describing how to use Qwen3 models in Thinking and Non-Thinking modes. Additionally, a comprehensive YAML configuration template for WrenAI was introduced, detailing model, pipeline, and system settings for various AI tasks.

Changes

File(s) Change Summary
docs/config_examples/README.md Added documentation for Qwen3 model usage, including Thinking and Non-Thinking modes, and usage examples.
docs/config_examples/config.qwen3.yaml Introduced a detailed YAML configuration template for WrenAI with Qwen3 models, pipelines, and system settings.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WrenAI
    participant OpenRouter/Qwen3
    User->>WrenAI: Send prompt with /think or /no_think suffix
    WrenAI->>OpenRouter/Qwen3: Route request to Qwen3 model (thinking or fast)
    OpenRouter/Qwen3-->>WrenAI: Return model response
    WrenAI-->>User: Deliver response (complex or fast)
Loading

Assessment against linked issues

Objective Addressed Explanation
Documentation for adding new data types (#1636) No documentation or instructions regarding adding new data types or handling PostGIS columns.

Suggested labels

module/ai-service, wren-ai-service

Poem

In docs and configs, new models appear,
Qwen3 now thinks both far and near!
YAMLs abound with settings so bright,
For WrenAI’s journey through day and night.
🐰✨
With prompts and pipes, our system grows—
The cleverest rabbit always knows!


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🧹 Nitpick comments (9)
wren-ai-service/docs/config_examples/config.qwen3.yaml (5)

1-7: Fix enumeration mismatch in initial instructions
The intro comment says "3 steps basically" but then lists four steps (1 to 4). Please update either the step count or the enumerated list to avoid confusion.


8-58: Enhance maintainability by minimizing repetition in LLM definitions
The api_base, timeout, and common kwargs blocks are repeated across each model entry. Consider extracting shared fields into YAML anchors/aliases to DRY up these definitions. This will make future updates easier and reduce the risk of inconsistencies.


81-87: Caution on recreate_index: true
By default, recreate_index: true will drop and rebuild your Qdrant index on startup. In production, this may lead to data loss—consider adding a warning comment or making this setting optional.


89-182: Consider DRY pipelines and highlight Qwen3-specific flows
The pipelines block is comprehensive but quite repetitive:

  • Use YAML anchors for shared fields (llm, embedder, document_store, engine).
  • Group or annotate Qwen3-specific pipelines (e.g., those using qwen3-thinking or qwen3-fast) at the top to improve discoverability.
    Also verify that omitting embedder or engine keys falls back to intended defaults.

183-205: Settings section looks solid
Runtime parameters are clearly defined. Remember to set development: false for production deployments.

wren-ai-service/docs/config_examples/README.md (4)

1-3: Tone down the admonition header
The "MUST READ!!!" header is overly forceful. Consider using a softer phrasing like "Please read carefully" to improve the reader experience.

🧰 Tools
🪛 LanguageTool

[style] ~1-~1: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1464 characters long)
Context: # MUST READ!!! Since these config files are examples,...

(EN_EXCESSIVE_EXCLAMATION)


5-5: Refine wording for contribution section
The phrase "We also definitely welcome your contribution" can be streamlined to "We welcome contributions" for clarity and conciseness.


7-7: Consistent naming for Non-Thinking mode
The section header uses "No_Think" (underscore) while the body calls it "Non-Thinking Mode". Align on one term—e.g., "Non-Thinking"—for consistency.


29-36: Specify fenced code block language
The usage example code block lacks a language tag. Add ```yaml after the backticks to enable proper syntax highlighting.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

30-30: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d52292 and 6c161c1.

📒 Files selected for processing (2)
  • wren-ai-service/docs/config_examples/README.md (1 hunks)
  • wren-ai-service/docs/config_examples/config.qwen3.yaml (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
wren-ai-service/docs/config_examples/README.md

30-30: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

🔇 Additional comments (5)
wren-ai-service/docs/config_examples/config.qwen3.yaml (5)

8-24: Clarify the role of the default alias
The first model entry uses alias: default with identical settings to qwen3-thinking. Confirm whether default is intended as a separate baseline or if it should be removed or renamed to avoid duplication.


25-46: Approve Non-Thinking mode parameters
The qwen3-fast alias is correctly configured for non-thinking use: higher temperature and reduced top_p for faster, simpler outputs, with a text response format.


47-58: Validate JSON handling for qwen3-32b
You've set response_format.type: json_object for the 32B model. Ensure that downstream pipelines and consumers can parse JSON objects; otherwise, document any required transformations.


59-69: Embedder configuration is clear
The embedder section provides sensible defaults and points users to set OPENAI_API_KEY.


71-79: Engine definitions are properly specified
Both wren_ui and wren_ibis endpoints are defined correctly with clear provider and URL settings.

@cyyeh
Copy link
Member

cyyeh commented Jun 2, 2025

@s2010 interesting!

could you give me examples explaining adding /think and /no_think in prompt part?

@s2010
Copy link
Contributor Author

s2010 commented Jun 2, 2025

In WrenAI configuration the system will automatically routes:
/think queries for Complex Reasoning → "Calculate the monthly revenue growth rate comparing Q4 2023 vs Q4 2024, including seasonal adjustments and explain the methodology /think"

  • The model will reason through the complex SQL joins needed, explain seasonal considerations, and show how it calculates growth rates.

/no_think queries for Quick Responses → "Show me today's sales numbers /no_think"

  • Direct numerical answer without methodology explanation.

The configuration I created supports this intelligent routing through the pipeline settings, where reasoning tasks like sql_generation_reasoning use the thinking model, while quick tasks like sql_answer use the fast model.

Copy link
Member

@cyyeh cyyeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contribution!

@cyyeh cyyeh merged commit cec9725 into Canner:main Jun 3, 2025
1 check passed
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.

Documentation for Adding New Data Types
2 participants