Add TOPIC_DETECTION_MODEL env var for topic detection model override#44
Closed
MichaelAnders wants to merge 1 commit intoFast-Editor:mainfrom
Closed
Add TOPIC_DETECTION_MODEL env var for topic detection model override#44MichaelAnders wants to merge 1 commit intoFast-Editor:mainfrom
MichaelAnders wants to merge 1 commit intoFast-Editor:mainfrom
Conversation
Problem: Topic detection requests use the same large model as the main request. For users running local models, this adds unnecessary GPU load for a simple classification task. There is no way to redirect topic detection to a lighter, faster model. Changes implemented: 1. Configuration (src/config/index.js) - Added TOPIC_DETECTION_MODEL env var, defaulting to "default" (use main model) - When set to a model name, topic detection requests use that model instead - Added to config object and hot reload support in reloadConfig() Testing: - TOPIC_DETECTION_MODEL=default (or unset): unchanged behavior - TOPIC_DETECTION_MODEL=llama3.2:1b: config correctly reads the value - Hot reload picks up changes without restart - npm run test:unit passes with no regressions
Contributor
Author
|
Closing: all TOPIC_DETECTION_MODEL changes are included in PR #39 (strict superset). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TOPIC_DETECTION_MODELenv var to redirect topic detection to a lighter modelProblem
Topic detection requests use the same large model as the main request. For users running local models, this adds unnecessary GPU load for a simple classification task.
Changes
TOPIC_DETECTION_MODELenv var (default:"default"), wired into config object andreloadConfig()for hot reload supportConfiguration
Testing
npm run test:unitpasses with no regressions