feat(agent): enhance agent model management and command handling#1093
Closed
linsheng9731 wants to merge 3 commits intosipeed:mainfrom
Closed
feat(agent): enhance agent model management and command handling#1093linsheng9731 wants to merge 3 commits intosipeed:mainfrom
linsheng9731 wants to merge 3 commits intosipeed:mainfrom
Conversation
- Added model switching functionality for agents, allowing dynamic model changes at runtime. - Introduced a new command handler for Telegram and Discord channels to facilitate model switching. - Updated agent registry to manage default agent selection and model resolution. - Enhanced configuration management to support default model settings. - Improved candidate resolution logic for agent instances. - Added tests for default agent retrieval and fallback behavior.
…ttings - Introduced a config field in the DiscordChannel struct to manage proxy settings. - Updated the downloadAttachment method to utilize the new configuration for proxy URLs.
89e8eb1 to
e532524
Compare
Author
Made-with: Cursor # Conflicts: # go.mod # pkg/agent/instance.go # pkg/config/config.go
f908ede to
7dd3a48
Compare
|
@linsheng9731 Hi! This PR has had no activity for over 2 weeks, so I'm closing it for now to keep things organized. Feel free to reopen anytime if you'd like to continue. |
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.
📝 Description
This PR adds runtime model switching via command in chat channels and makes the switch effective immediately without restarting the gateway.
Main changes:
/switch model <name>command support in Telegram and Discord.ModelSwitchManagerruntime switch flow:AgentRegistry.🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
N/A
📚 Technical Context (Skip for Docs)
Previously, channel-level switch command handling updated config/model fields but did not fully guarantee runtime consistency (provider/candidate refresh and unified authorization path).
This PR centralizes runtime switching in
ModelSwitchManagerand updates registry state atomically, while adding tests to reduce regression risk.🧪 Test Environment
model_list(runtime switch tested with configured aliases)📸 Evidence (Optional)
Click to view Logs/Screenshots
make buildgo test ./pkg/agent ./pkg/channels/telegramgo test ./pkg/agent ./pkg/channels/discord ./pkg/channels/telegramGET /healthreturns{"status":"ok",...}☑️ Checklist