-
Notifications
You must be signed in to change notification settings - Fork 760
Add model parameter to resume_session for changing models without losing context #327
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
base: main
Are you sure you want to change the base?
Conversation
…ut losing context Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
Cross-SDK Consistency ReviewThank you for adding the ability to change a session's model without losing context in the Python SDK! This is a valuable feature that addresses issue #311. However, I've identified a cross-SDK consistency issue: this feature is currently only implemented in the Python SDK, while the Node.js, Go, and .NET SDKs do not support changing the model when resuming a session. Current StatePython SDK (this PR):
Node.js SDK:
Go SDK:
.NET SDK:
RecommendationTo maintain feature parity across all SDK implementations, I suggest:
Note: All SDKs already have Would you like me to create follow-up issues for adding this feature to the other SDKs, or would you prefer to include these changes in this PR?
|
|
@copilot Instead of making the model only changeable on create/resume session, I think it would be more practical if we can directly set the model through the session object. OR make the model settable per prompt send operation like openai or other SDKs. This way if we want to change the ongoing session's model, we can directly do that without restarting it again. What do y'all think? But as I have no knowledge of how the backend is setup, if this for some reason is not feasible and the session must be restarted to set the model properly, that's absolutely fine too. |
Users currently cannot change a session's model without creating a new session, which loses conversation context and session state.
Changes
modelfield toResumeSessionConfigTypedDictresume_session()now accepts and passesmodelparameter to CLI viasession.resumeRPCUsage
Notes
modelparameter insession.resumeRPC endpointOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.