fix: respect character config model settings #845
Closed
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.
Relates to:
N/A - Improvement to model selection functionality
Risks
Low - Changes only affect how model class is selected, with fallback to default values
Background
What does this PR do?
Updates model class selection to respect character configuration settings instead of using hardcoded values. This allows characters to use different model sizes without code changes.
What kind of change is this?
Bug fix (allows existing config file settings to be implemented as indicated in the documentation)
Documentation changes needed?
Changes to code line references and a README note for Apple Silicon users
Testing
Where should a reviewer start?
Files changed:
packages/client-direct/src/index.ts
- Updated model selection in direct message handlingpackages/client-discord/src/messages.ts
- Updated model selection in Discord message handlingpackages/client-telegram/src/index.ts
- Updated model selection in Telegram message handlingpackages/client-farcaster/src/interactions.ts
- Updated model selection in Farcaster interaction handlingpackages/plugin-bootstrap/src/actions/continue.ts
- Updated model selection in continue actionThe key change in each file is replacing hardcoded
ModelClass.SMALL
with:This ensures consistent model selection across all client types while maintaining the small model as a fallback.
Detailed testing steps
pnpm start --character="path/to/character.json"
Files changed:
packages/client-direct/src/index.ts
generateMessageResponse()
to use character model settings in direct message handlingpackages/client-discord/src/messages.ts
generateMessageResponse()
to use character model settings in Discord message handlingpackages/client-telegram/src/index.ts
andpackages/client-telegram/src/messageManager.ts
generateMessageResponse()
to use character model settings in Telegram message handlingpackages/client-farcaster/src/interactions.ts
generateMessageResponse()
to use character model settings in Farcaster interaction handlingpackages/plugin-bootstrap/src/actions/continue.ts
generateMessageResponse()
andgenerateTrueOrFalse()
callsDeploy Notes
Standard build process:
No database changes or special deployment instructions needed.
Discord username
@seanbhart