feat(webui): add session-scoped reasoning effort (#6441)
* feat(webui): add session-scoped model options Extend the composer preset menu with inherited reasoning effort and Codex Fast mode overrides. Persist choices with ordinary inputs, isolate captured runtimes, and restore browser preferences without changing shared presets. Add regression coverage for pending preset ordering, settings initialization, session and host isolation, queue edits, Codex request mapping, and narrow-screen controls. * feat(webui): refine session model options and add Codex Ultrafast Fit the composer options into a compact single row and preview reasoning effort only during a drag. Add Fast/Ultrafast controls for eligible Codex models, preserve explicit session choices across reloads, and document the speed tiers. * fix(webui): add Codex speed control to the component gallery * fix(webui): preserve saved model options after preset rename Use the session options for display when a browser preference no longer matches the preset. Omit model options from the next message unless the browser has a matching choice, so stale preferences cannot overwrite options the gateway already saved.
This commit is contained in:
1 parent
2b232c9133
commit
0f45d74fec
82 files changed
+2289
-113
No files matched your search
@@ -24,6 +24,7 @@ from nanobot.session.manager import (
|
||||
message_preview_text,
|
||||
metadata_title,
|
||||
)
|
||||
from nanobot.session.model_selection import SESSION_MODEL_KEYS, SessionModelPreset
|
||||
from nanobot.session.summary import is_summary_checkpoint
|
||||
from nanobot.session.types import PARENT_SESSION_KEY, SESSION_TYPE_KEY
|
||||
|
||||
@@ -473,6 +474,24 @@ class SqliteSessionStore:
|
||||
self._write_metadata(db, key, {**payload["metadata"], **updates})
|
||||
return True
|
||||
|
||||
def rename_model_preset(self, old_name: str, new_name: str) -> list[str]:
|
||||
changed: list[str] = []
|
||||
with self.transaction():
|
||||
for row in self.list_metadata():
|
||||
metadata = row["metadata"]
|
||||
try:
|
||||
selection = SessionModelPreset.from_metadata(metadata)
|
||||
except ValueError:
|
||||
continue
|
||||
if selection.base_preset != old_name:
|
||||
continue
|
||||
for key in SESSION_MODEL_KEYS:
|
||||
metadata.pop(key, None)
|
||||
metadata.update(SessionModelPreset(new_name, selection.overrides).metadata_update())
|
||||
self.replace_metadata(row["key"], metadata)
|
||||
changed.append(row["key"])
|
||||
return changed
|
||||
|
||||
def replace_metadata(
|
||||
self, key: str, metadata: dict[str, Any], *, updated_at: datetime | None = None,
|
||||
) -> None:
|
||||
|
||||
Reference in new issue
Block a user