-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add session-scoped secondary model with Alt+S picker option #3463
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-code-sdk": minor | ||
| --- | ||
|
|
||
| Add `Session.setSecondaryModel()` and `Session.getSecondaryModel()` for the session-scoped secondary model on the v2 engine (the v1 client rejects the setter with `NOT_IMPLEMENTED` and reads back `undefined`). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-code": minor | ||
| --- | ||
|
|
||
| Add an Alt+S shortcut in the /secondary-model picker to set the subagent model for the current session only, without saving it as the default or affecting other windows. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-code": patch | ||
| --- | ||
|
|
||
| Keep a running window's secondary model unchanged when the saved default is edited elsewhere; the new default now applies only to newly started sessions. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,11 @@ export class SubagentTool implements ISubagentTool { | |
| readonly name: string = 'Agent'; | ||
|
|
||
| get parameters(): Record<string, unknown> { | ||
| const parameters = exposesSubagentModelChoice(this.config, this.flags) | ||
| const parameters = exposesSubagentModelChoice( | ||
| this.config, | ||
| this.flags, | ||
| this.subagents.secondaryModel, | ||
| ) | ||
|
Comment on lines
+88
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a session-only model is selected, this makes the Useful? React with 👍 / 👎. |
||
| ? SUBAGENT_TOOL_PARAMETERS | ||
| : SUBAGENT_TOOL_PARAMETERS_NO_MODEL; | ||
| return this.flags.enabled(SUBAGENT_FORK_FLAG_ID) | ||
|
|
@@ -151,6 +155,7 @@ export class SubagentTool implements ISubagentTool { | |
| this.config, | ||
| this.flags, | ||
| this.profile.data().modelAlias, | ||
| this.subagents.secondaryModel, | ||
| ); | ||
| if (modelLines !== undefined) { | ||
| description += `\n\n${modelLines}`; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
[secondary_model].force = true, this callback is still offered for every v2 session, so Alt-S successfully stores the selected alias and reports that new subagents will use it. However,resolveSubagentBindingreturns the forced model before consulting the session value, making the action a silent no-op. Suppress or reject the session-only action whenforceis active instead of displaying a false success message.Useful? React with 👍 / 👎.