clay-server 2.45.0-beta.1 → 2.45.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -178,25 +178,21 @@ function hasBeta(name) {
178
178
  function rebuildModelList() {
179
179
  if (!configModelList) return;
180
180
  // Picker visibility by vendor+mode:
181
- // Claude TUI -> shown (Claude TUI accepts mid-thread model swaps).
182
- // Claude GUI -> hidden (Agent SDK binds model at session creation;
183
- // changing mid-thread breaks tool schemas and cache reuse).
184
- // Codex GUI -> shown but locked after the first message (Codex protocol
185
- // binds model at thread creation; sdk-bridge setModel
186
- // already stores into sm.currentModel when there's no
187
- // active queryInstance, so picks made before the first
188
- // message do take effect on thread start).
181
+ // Claude TUI -> shown, free (Claude TUI accepts mid-thread model swaps).
182
+ // GUI (Claude SDK + Codex) -> shown, but locked once the session has
183
+ // history. Both bind the model at session creation and
184
+ // changing mid-thread breaks tool schemas / cache reuse,
185
+ // so we allow the pick only before the first message.
186
+ // sdk-bridge setModel stores into sm.currentModel when
187
+ // there's no active queryInstance, so a pick made before
188
+ // the first message takes effect on session start.
189
189
  var modelSection = configModelList.parentElement;
190
190
  var s = store.snap();
191
191
  var vendor = s.currentVendor || "claude";
192
- var hideModelPicker = s.activeSessionMode === "gui" && vendor === "claude";
193
- if (modelSection) modelSection.style.display = hideModelPicker ? "none" : "";
192
+ if (modelSection) modelSection.style.display = "";
194
193
  configModelList.innerHTML = "";
195
- if (hideModelPicker) return;
196
194
 
197
- var lockedForCodex = vendor === "codex"
198
- && s.activeSessionMode === "gui"
199
- && !!s.sessionHasHistory;
195
+ var lockedForGui = s.activeSessionMode === "gui" && !!s.sessionHasHistory;
200
196
 
201
197
  var list = s.currentModels.length > 0 ? s.currentModels : (s.currentModel ? [{ value: s.currentModel, displayName: s.currentModel }] : []);
202
198
  for (var i = 0; i < list.length; i++) {
@@ -207,12 +203,12 @@ function rebuildModelList() {
207
203
  var btn = document.createElement("button");
208
204
  btn.className = "config-radio-item";
209
205
  if (value === s.currentModel) btn.classList.add("active");
210
- if (lockedForCodex) btn.classList.add("locked");
206
+ if (lockedForGui) btn.classList.add("locked");
211
207
  btn.dataset.model = value;
212
208
  btn.textContent = label;
213
- if (lockedForCodex) {
209
+ if (lockedForGui) {
214
210
  btn.disabled = true;
215
- btn.title = "Model is locked after the first message in a Codex session. Start a new session to change it.";
211
+ btn.title = "Model is locked after the first message in a GUI session. Start a new session to change it.";
216
212
  } else {
217
213
  btn.addEventListener("click", function () {
218
214
  var model = this.dataset.model;
@@ -227,7 +223,7 @@ function rebuildModelList() {
227
223
  configModelList.appendChild(btn);
228
224
  }
229
225
 
230
- if (lockedForCodex) {
226
+ if (lockedForGui) {
231
227
  var hint = document.createElement("div");
232
228
  hint.className = "config-model-hint";
233
229
  hint.textContent = "Locked after first message — start a new session to change.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.45.0-beta.1",
3
+ "version": "2.45.0-beta.2",
4
4
  "description": "Self-hosted team workspace for Claude Code and Codex. Multi-user, browser-based, with persistent AI mates.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",