Skip to content

Conversation

@bliuk
Copy link
Contributor

@bliuk bliuk commented Oct 21, 2025

Description

This PR fixes a bug in ClientSideConnection.setSessionModel() where it incorrectly calls session/set_mode instead of session/set_model.

Problem

The setSessionModel() method was calling the wrong RPC method (session_set_mode), which caused parameter validation failures because the server expected modeId instead of
modelId.

Solution

Changed line 598 in src/acp.ts to call the correct RPC method: schema.AGENT_METHODS.session_set_model

Changes

  • File: src/acp.ts
  • Line: 598
  • Change: session_set_modesession_set_model

Code Diff

  async setSessionModel(
    params: schema.SetSessionModelRequest
  ): Promise<schema.SetSessionModelResponse> {
    return (
      (await this.#connection.sendRequest(
-       schema.AGENT_METHODS.session_set_mode,
+       schema.AGENT_METHODS.session_set_model,
        params
      )) ?? {}
    );
  }

The setSessionModel method was incorrectly calling session_set_mode
instead of session_set_model, causing parameter validation errors.

Changed line 598 in src/acp.ts to use the correct RPC method.

Fixes: Parameter validation error when calling setSessionModel()
Copy link
Member

@benbrandt benbrandt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this!

@benbrandt benbrandt enabled auto-merge (squash) October 21, 2025 08:34
@benbrandt benbrandt merged commit 724df9b into agentclientprotocol:main Oct 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants