Skip to content

Conversation

Xunzhuo
Copy link
Member

@Xunzhuo Xunzhuo commented Oct 13, 2025

What type of PR is this?

[Refactoring / Breaking Change]

What this PR does / why we need it:

This PR refactors the reasoning configuration structure by moving reasoning_description and reasoning_effort fields from the Category level to the ModelScore level. This change enables more granular control over reasoning behavior at the model level rather than the category level.

Key Changes

  • ✅ Remove ReasoningDescription and ReasoningEffort from Category struct
  • ✅ These fields now exist in ModelScore struct (model-level configuration)
  • ✅ Update getReasoningEffort() to accept modelName parameter
  • ✅ Update all configuration files to new format (9 files)
  • ✅ Update Python training scripts to generate new format
  • ✅ Update TypeScript dashboard to read from best model
  • ✅ Update all test files

Breaking Change

⚠️ This is a breaking change with no backward compatibility. Old configuration files must be migrated to the new format.

Migration Guide

Old format:

categories:
  - name: math
    reasoning_description: "Mathematical problems require step-by-step reasoning"
    reasoning_effort: high
    model_scores:
      - model: model-a
        score: 0.9
        use_reasoning: true

New format:

categories:
  - name: math
    model_scores:
      - model: model-a
        score: 0.9
        use_reasoning: true
        reasoning_description: "Mathematical problems require step-by-step reasoning"
        reasoning_effort: high

Files Changed

Go Backend

  • src/semantic-router/pkg/config/config.go - Config structure definitions
  • src/semantic-router/pkg/extproc/reason_mode_selector.go - Reasoning logic
  • src/semantic-router/pkg/extproc/request_handler.go - Request handling
  • src/semantic-router/pkg/extproc/reason_mode_config_test.go - Tests
  • src/semantic-router/pkg/extproc/reasoning_integration_test.go - Integration tests

Python

  • src/training/model_eval/result_to_config.py - Config generation

TypeScript/Dashboard

  • dashboard/frontend/src/pages/ConfigPage.tsx - UI and interfaces

Configuration Files

  • config/config.e2e.yaml - E2E test config
  • All other config files already in correct format

Testing

  • ✅ All Go tests pass
  • ✅ All configuration files validated
  • ✅ TypeScript type checking passes
  • ✅ No IDE errors

Rationale

  1. Model-level control: Reasoning is a model capability, different models may need different reasoning configurations
  2. Fine-grained configuration: Different models in the same category can have different reasoning strategies
  3. Better extensibility: Future enhancements can add more model-specific reasoning parameters

Pull Request opened by Augment Code with guidance from the PR author

Move ReasoningDescription and ReasoningEffort from Category level to ModelScore level to enable model-specific reasoning configuration.

**What type of PR is this?**

[Refactoring / Breaking Change]

**What this PR does / why we need it**:

This PR refactors the reasoning configuration structure by moving  and  fields from the Category level to the ModelScore level. This change enables more granular control over reasoning behavior at the model level rather than the category level.

**Key Changes:**
- Remove  and  from  struct
- These fields now exist in  struct (model-level configuration)
- Update  to accept  parameter
- Update all configuration files to new format (9 files)
- Update Python training scripts to generate new format
- Update TypeScript dashboard to read from best model
- Update all test files

**Breaking Change:**
This is a breaking change with no backward compatibility. Old configuration files must be migrated to the new format.

**Migration:**
Old format:
```yaml
categories:
  - name: math
    reasoning_description: "..."
    reasoning_effort: high
    model_scores:
      - model: model-a
        use_reasoning: true
```

New format:
```yaml
categories:
  - name: math
    model_scores:
      - model: model-a
        use_reasoning: true
        reasoning_description: "..."
        reasoning_effort: high
```

**Testing:**
- All Go tests pass
- All configuration files validated
- TypeScript type checking passes

Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>
Copy link

github-actions bot commented Oct 13, 2025

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 config

Owners: @rootfs
Files changed:

  • config/config.e2e.yaml

📁 dashboard

Owners: @JaredforReal, @Xunzhuo
Files changed:

  • dashboard/frontend/src/pages/ConfigPage.tsx

📁 src

Owners: @rootfs, @Xunzhuo, @wangchen615
Files changed:

  • src/semantic-router/pkg/config/config.go
  • src/semantic-router/pkg/extproc/reason_mode_config_test.go
  • src/semantic-router/pkg/extproc/reason_mode_selector.go
  • src/semantic-router/pkg/extproc/reasoning_integration_test.go
  • src/semantic-router/pkg/extproc/request_handler.go
  • src/semantic-router/pkg/utils/classification/generic_category_mapping_test.go
  • src/training/model_eval/result_to_config.py

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

Copy link

netlify bot commented Oct 13, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 4b214a9
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68ecef49cd02680008515bf9
😎 Deploy Preview https://deploy-preview-414--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Update generic_category_mapping_test.go to use the new structure where
reasoning_effort is a field of ModelScore instead of Category.

Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>
@rootfs rootfs merged commit db323a5 into main Oct 13, 2025
16 checks passed
joyful-ii-V-I pushed a commit to joyful-ii-V-I/semantic-router that referenced this pull request Oct 13, 2025
…llm-project#414)

* refactor(config): move reasoning fields from Category to ModelScore

Move ReasoningDescription and ReasoningEffort from Category level to ModelScore level to enable model-specific reasoning configuration.

**What type of PR is this?**

[Refactoring / Breaking Change]

**What this PR does / why we need it**:

This PR refactors the reasoning configuration structure by moving  and  fields from the Category level to the ModelScore level. This change enables more granular control over reasoning behavior at the model level rather than the category level.

**Key Changes:**
- Remove  and  from  struct
- These fields now exist in  struct (model-level configuration)
- Update  to accept  parameter
- Update all configuration files to new format (9 files)
- Update Python training scripts to generate new format
- Update TypeScript dashboard to read from best model
- Update all test files

**Breaking Change:**
This is a breaking change with no backward compatibility. Old configuration files must be migrated to the new format.

**Migration:**
Old format:
```yaml
categories:
  - name: math
    reasoning_description: "..."
    reasoning_effort: high
    model_scores:
      - model: model-a
        use_reasoning: true
```

New format:
```yaml
categories:
  - name: math
    model_scores:
      - model: model-a
        use_reasoning: true
        reasoning_description: "..."
        reasoning_effort: high
```

**Testing:**
- All Go tests pass
- All configuration files validated
- TypeScript type checking passes

Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>

* fix(test): move ReasoningEffort to ModelScore in classification test

Update generic_category_mapping_test.go to use the new structure where
reasoning_effort is a field of ModelScore instead of Category.

Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>

---------

Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>
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.

4 participants