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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ changes accumulate. Track in-flight protocol changes via PRs touching
### Changed

- `ConfigPropertySchema.enum` now accepts `JsonPrimitive[]` instead of `string[]`, allowing numeric, boolean, and null enum values.
- `ModelSelection.config` values are now `JsonPrimitive` (`string | number | boolean | null`) instead of `string`, allowing numeric, boolean, and null configuration values.

## [0.5.0] — Unreleased

Expand Down
2 changes: 2 additions & 0 deletions clients/go/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file.

- `ConfigPropertySchema.Enum` field is now `[]json.RawMessage` instead of `[]string`,
allowing numeric, boolean, and null enum values.
- `ModelSelection.Config` values are now `json.RawMessage` instead of `string`,
allowing numeric, boolean, and null configuration values.

## [0.4.0] — 2026-06-19

Expand Down
6 changes: 4 additions & 2 deletions clients/go/ahptypes/state.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,10 @@ type SessionModelInfo struct {
type ModelSelection struct {
// Model identifier
Id string `json:"id"`
// Model-specific configuration values
Config map[string]string `json:"config,omitempty"`
// Model-specific configuration values. Values are JSON primitives: most
// pickers produce strings, but some (e.g. a numeric context-size picker)
// produce numbers or booleans, which are carried through as-is.
Config map[string]json.RawMessage `json:"config,omitempty"`
}

// A selected custom agent for a session.
Expand Down
2 changes: 2 additions & 0 deletions clients/kotlin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump

- `ConfigPropertySchema.enum` field is now `List<JsonElement>?` instead of
`List<String>?`, allowing numeric, boolean, and null enum values.
- `ModelSelection.config` values are now `JsonElement` instead of `String`,
allowing numeric, boolean, and null configuration values.

## [0.4.0] — 2026-06-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,11 @@ data class ModelSelection(
*/
val id: String,
/**
* Model-specific configuration values
* Model-specific configuration values. Values are JSON primitives: most
* pickers produce strings, but some (e.g. a numeric context-size picker)
* produce numbers or booleans, which are carried through as-is.
*/
val config: Map<String, String>? = null
val config: Map<String, JsonElement>? = null
)

@Serializable
Expand Down
2 changes: 2 additions & 0 deletions clients/rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ matching `## [X.Y.Z]` heading is missing from this file.
on `ahp-ws` with `default-features = false, features = ["native-tls"]`.
- `ConfigPropertySchema.enum` field is now `Option<Vec<AnyValue>>` instead of
`Option<Vec<String>>`, allowing numeric, boolean, and null enum values.
- `ModelSelection.config` values are now `AnyValue` instead of `String`,
allowing numeric, boolean, and null configuration values.

## [0.4.0] — 2026-06-19

Expand Down
6 changes: 4 additions & 2 deletions clients/rust/crates/ahp-types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,11 @@ pub struct SessionModelInfo {
pub struct ModelSelection {
/// Model identifier
pub id: String,
/// Model-specific configuration values
/// Model-specific configuration values. Values are JSON primitives: most
/// pickers produce strings, but some (e.g. a numeric context-size picker)
/// produce numbers or booleans, which are carried through as-is.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub config: Option<std::collections::HashMap<String, String>>,
pub config: Option<std::collections::HashMap<String, AnyValue>>,
}

/// A selected custom agent for a session.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,14 @@ public struct SessionModelInfo: Codable, Sendable {
public struct ModelSelection: Codable, Sendable {
/// Model identifier
public var id: String
/// Model-specific configuration values
public var config: [String: String]?
/// Model-specific configuration values. Values are JSON primitives: most
/// pickers produce strings, but some (e.g. a numeric context-size picker)
/// produce numbers or booleans, which are carried through as-is.
public var config: [String: AnyCodable]?

public init(
id: String,
config: [String: String]? = nil
config: [String: AnyCodable]? = nil
) {
self.id = id
self.config = config
Expand Down
2 changes: 2 additions & 0 deletions clients/swift/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ the tag matches the version pinned in [`VERSION`](VERSION).

- `ConfigPropertySchema.enum` field is now `[AnyCodable]?` instead of
`[String]?`, allowing numeric, boolean, and null enum values.
- `ModelSelection.config` values are now `AnyCodable` instead of `String`,
allowing numeric, boolean, and null configuration values.

## [0.4.0] — 2026-06-19

Expand Down
2 changes: 2 additions & 0 deletions clients/typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ hotfix escape hatch.

- `ConfigPropertySchema.enum` field is now `JsonPrimitive[]` instead of
`string[]`, allowing numeric, boolean, and null enum values.
- `ModelSelection.config` values are now `JsonPrimitive` instead of `string`,
allowing numeric, boolean, and null configuration values.

### Fixed

Expand Down
4 changes: 2 additions & 2 deletions schema/actions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2484,9 +2484,9 @@
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/$defs/JsonPrimitive"
},
"description": "Model-specific configuration values"
"description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is."
}
},
"required": [
Expand Down
4 changes: 2 additions & 2 deletions schema/commands.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1822,9 +1822,9 @@
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/$defs/JsonPrimitive"
},
"description": "Model-specific configuration values"
"description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is."
}
},
"required": [
Expand Down
4 changes: 2 additions & 2 deletions schema/errors.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,9 @@
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/$defs/JsonPrimitive"
},
"description": "Model-specific configuration values"
"description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is."
}
},
"required": [
Expand Down
4 changes: 2 additions & 2 deletions schema/notifications.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/$defs/JsonPrimitive"
},
"description": "Model-specific configuration values"
"description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is."
}
},
"required": [
Expand Down
4 changes: 2 additions & 2 deletions schema/state.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,9 @@
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/$defs/JsonPrimitive"
},
"description": "Model-specific configuration values"
"description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is."
}
},
"required": [
Expand Down
9 changes: 7 additions & 2 deletions types/channels-root/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import type {
ConfigSchema,
JsonPrimitive,
ProtectedResourceMetadata,
} from '../common/state.js';
import type { TerminalInfo } from '../channels-terminal/state.js';
Expand Down Expand Up @@ -131,8 +132,12 @@ export interface SessionModelInfo {
export interface ModelSelection {
/** Model identifier */
id: string;
/** Model-specific configuration values */
config?: Record<string, string>;
/**
* Model-specific configuration values. Values are JSON primitives: most
* pickers produce strings, but some (e.g. a numeric context-size picker)
* produce numbers or booleans, which are carried through as-is.
*/
config?: Record<string, JsonPrimitive>;
}

// ─── Root Config Types ───────────────────────────────────────────────────────
Expand Down
Loading