Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.4.2 (2025-09-22)

### Rust

**Unstable** fix missing method for model selection in Rust library.

## 0.4.1 (2025-09-22)

### Protocol
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "agent-client-protocol"
authors = ["Zed <hi@zed.dev>"]
version = "0.4.1"
version = "0.4.2"
edition = "2024"
license = "Apache-2.0"
description = "A protocol for standardizing communication between code editors and AI coding agents"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zed-industries/agent-client-protocol",
"version": "0.4.1",
"version": "0.4.2",
"publishConfig": {
"access": "public"
},
Expand Down
10 changes: 7 additions & 3 deletions rust/acp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl Agent for ClientSideConnection {
self.conn
.request(
SESSION_SET_MODEL_METHOD_NAME,
Some(ClientRequest::ModelSelectRequest(args)),
Some(ClientRequest::SetSessionModelRequest(args)),
)
.await
}
Expand Down Expand Up @@ -613,6 +613,10 @@ impl Side for AgentSide {
SESSION_SET_MODE_METHOD_NAME => serde_json::from_str(params.get())
.map(ClientRequest::SetSessionModeRequest)
.map_err(Into::into),
#[cfg(feature = "unstable")]
SESSION_SET_MODEL_METHOD_NAME => serde_json::from_str(params.get())
.map(ClientRequest::SetSessionModelRequest)
.map_err(Into::into),
SESSION_PROMPT_METHOD_NAME => serde_json::from_str(params.get())
.map(ClientRequest::PromptRequest)
.map_err(Into::into),
Expand Down Expand Up @@ -681,9 +685,9 @@ impl<T: Agent> MessageHandler<AgentSide> for T {
Ok(AgentResponse::SetSessionModeResponse(response))
}
#[cfg(feature = "unstable")]
ClientRequest::ModelSelectRequest(args) => {
ClientRequest::SetSessionModelRequest(args) => {
let response = self.set_session_model(args).await?;
Ok(AgentResponse::ModelSelectResponse(response))
Ok(AgentResponse::SetSessionModelResponse(response))
}
ClientRequest::ExtMethodRequest(args) => {
let response = self.ext_method(args).await?;
Expand Down
4 changes: 2 additions & 2 deletions rust/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ pub enum ClientRequest {
SetSessionModeRequest(SetSessionModeRequest),
PromptRequest(PromptRequest),
#[cfg(feature = "unstable")]
ModelSelectRequest(SetSessionModelRequest),
SetSessionModelRequest(SetSessionModelRequest),
ExtMethodRequest(ExtRequest),
}

Expand All @@ -799,7 +799,7 @@ pub enum AgentResponse {
SetSessionModeResponse(#[serde(default)] SetSessionModeResponse),
PromptResponse(PromptResponse),
#[cfg(feature = "unstable")]
ModelSelectResponse(SetSessionModelResponse),
SetSessionModelResponse(SetSessionModelResponse),
ExtMethodResponse(#[schemars(with = "serde_json::Value")] Arc<RawValue>),
}

Expand Down
4 changes: 2 additions & 2 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
{
"$ref": "#/$defs/SetSessionModelResponse",
"title": "ModelSelectResponse"
"title": "SetSessionModelResponse"
},
{
"title": "ExtMethodResponse"
Expand Down Expand Up @@ -367,7 +367,7 @@
},
{
"$ref": "#/$defs/SetSessionModelRequest",
"title": "ModelSelectRequest"
"title": "SetSessionModelRequest"
},
{
"title": "ExtMethodRequest"
Expand Down
16 changes: 8 additions & 8 deletions typescript/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export type AgentRequest =
| LoadSessionRequest
| SetSessionModeRequest
| PromptRequest
| ModelSelectRequest
| SetSessionModelRequest
| ExtMethodRequest1;
/**
* Configuration for connecting to an MCP (Model Context Protocol) server.
Expand Down Expand Up @@ -388,7 +388,7 @@ export type AgentResponse =
| LoadSessionResponse
| SetSessionModeResponse
| PromptResponse
| ModelSelectResponse
| SetSessionModelResponse
| ExtMethodResponse1;
/**
* Unique identifier for a Session Mode.
Expand Down Expand Up @@ -1157,7 +1157,7 @@ export interface PromptRequest {
*
* Request parameters for setting a session model.
*/
export interface ModelSelectRequest {
export interface SetSessionModelRequest {
/**
* Extension point for implementations
*/
Expand Down Expand Up @@ -1477,7 +1477,7 @@ export interface PromptResponse {
*
* Response to `session/set_model` method.
*/
export interface ModelSelectResponse {
export interface SetSessionModelResponse {
/**
* Extension point for implementations
*/
Expand Down Expand Up @@ -1876,7 +1876,7 @@ export const setSessionModeRequestSchema = z.object({
});

/** @internal */
export const modelSelectRequestSchema = z.object({
export const setSessionModelRequestSchema = z.object({
_meta: z.record(z.unknown()).optional(),
modelId: z.string(),
sessionId: z.string(),
Expand Down Expand Up @@ -1929,7 +1929,7 @@ export const promptResponseSchema = z.object({
});

/** @internal */
export const modelSelectResponseSchema = z.object({
export const setSessionModelResponseSchema = z.object({
_meta: z.record(z.unknown()).optional(),
});

Expand Down Expand Up @@ -2413,7 +2413,7 @@ export const agentRequestSchema = z.union([
loadSessionRequestSchema,
setSessionModeRequestSchema,
promptRequestSchema,
modelSelectRequestSchema,
setSessionModelRequestSchema,
extMethodRequest1Schema,
]);

Expand All @@ -2425,7 +2425,7 @@ export const agentResponseSchema = z.union([
loadSessionResponseSchema,
setSessionModeResponseSchema,
promptResponseSchema,
modelSelectResponseSchema,
setSessionModelResponseSchema,
extMethodResponse1Schema,
]);

Expand Down