Skip to content

Commit 3ebf988

Browse files
Copilotedburns
andauthored
Port model field to CustomAgentConfig from reference implementation
Adds the 'model' property to CustomAgentConfig, allowing per-agent model selection (e.g. 'claude-haiku-4.5'). When set, the runtime will use this model for the agent, falling back to the parent session model if unavailable. Ports d0eb531 from github/copilot-sdk (#1309). Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
1 parent bb8af28 commit 3ebf988

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/main/java/com/github/copilot/sdk/json/CustomAgentConfig.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public class CustomAgentConfig {
6060
@JsonProperty("skills")
6161
private List<String> skills;
6262

63+
@JsonProperty("model")
64+
private String model;
65+
6366
/**
6467
* Gets the unique identifier name for this agent.
6568
*
@@ -255,4 +258,29 @@ public CustomAgentConfig setSkills(List<String> skills) {
255258
this.skills = skills;
256259
return this;
257260
}
261+
262+
/**
263+
* Gets the model identifier for this agent.
264+
*
265+
* @return the model identifier (e.g. "claude-haiku-4.5"), or {@code null} if
266+
* not set
267+
*/
268+
public String getModel() {
269+
return model;
270+
}
271+
272+
/**
273+
* Sets the model identifier for this agent.
274+
* <p>
275+
* When set, the runtime will attempt to use this model for the agent, falling
276+
* back to the parent session model if unavailable.
277+
*
278+
* @param model
279+
* the model identifier (e.g. "claude-haiku-4.5")
280+
* @return this config for method chaining
281+
*/
282+
public CustomAgentConfig setModel(String model) {
283+
this.model = model;
284+
return this;
285+
}
258286
}

0 commit comments

Comments
 (0)