Skip to content

Latest commit

 

History

History
124 lines (100 loc) · 5.01 KB

File metadata and controls

124 lines (100 loc) · 5.01 KB

Model Picker Default Presets

This opt-in feature replaces the server-provided Default model-picker slider for ChatGPT-authenticated chats with an ordered list of model and reasoning effort pairs. It does not change the manual model list, API-key, Copilot, or Aeon-managed sessions, account entitlements, workspace policy, or upstream Ultra/XHigh gates.

For an existing chat, configured pairs are kept as the composer's optimistic selection after the upstream next-turn settings RPC completes. This avoids a race where a long conversation can briefly expose stale thread metadata and reset the picker. Selecting a model/effort pair outside this feature's list removes that local override and restores the normal upstream behavior.

The stock Settings page controls which reasoning efforts are visible and whether Ultra may appear in the picker. It does not currently configure the model/effort pairs behind Default.

Configure

Add the feature and its settings to the gitignored linux-features/features.json:

{
  "enabled": ["model-picker-default-presets"],
  "settings": {
    "model-picker-default-presets": {
      "presets": [
        {
          "model": "gpt-6-astra",
          "effort": "medium",
          "default": true
        },
        {
          "model": "gpt-5.6-sol",
          "effort": "high"
        }
      ]
    }
  }
}

presets is an ordered array with no feature-defined maximum. Its order is the slider order. Each entry has:

  • model: a non-empty upstream model slug;
  • effort: none, low, medium, high, xhigh, max, or ultra;
  • optional default: exactly one entry must set it to true.

An explicitly configured array must contain at least one entry. Duplicate model/effort pairs, unknown fields, invalid efforts, and any other malformed structure stop the feature build with a descriptive error. The tracked empty manifest default exists only so CI can audit the current upstream bundle; it does not define a user configuration.

Rebuild and reinstall after editing the file:

make install-native

One available pair makes Default a fixed selection. Two or more available pairs display the slider. The feature never truncates the configured list. The configured list replaces the upstream Default slider in both local repository tasks and cloud/TPP chats. Those surfaces use separate upstream catalog and slider-config paths, and the feature patches both; selecting a model explicitly still uses the normal upstream effort choices for that model.

Runtime fallback

At runtime, the feature keeps only presets whose model is present in the current account catalog. It supplies the configured effort variants to the existing upstream selection resolver; the picker still applies workspace policy and its Ultra/XHigh visibility gates:

  • if the configured default is unavailable, the first available configured pair becomes the default;
  • if every configured pair is unavailable, the complete upstream Default configuration is returned unchanged.

Selecting Default again and creating a new chat both use the resolved default pair. Manual model selection remains upstream-owned.

The current local composer applies a selected Default pair through its normal per-conversation model setter. No account-default persistence override is needed.

Updates

The update manager preserves the gitignored feature configuration during its rebuild. Each upstream update is patched against semantic catalog and picker contracts; drift or ambiguous matches fail closed and are reported instead of partially changing the app.

The official webview is an rspack build whose application code lives in lazily loaded webview/assets/async/ chunks, so every descriptor finds its chunk by stable content strings and then by its semantic contract, never by file name. The catalog normalizer, picker slider, local resolver, and local composer are each patched in exactly one chunk. Upstream inlines the model-settings hook into every composer surface, so the existing-chat selection patch is applied to each copy and warns about any copy that drifted.

The local resolver contract follows the current signed stable package's removeXHigh filter and preset loop. The local composer takes its slider config from either of two ChatGPT-gated upstream sources; the configured list replaces whichever one is active. An enabled feature's descriptor mismatch rejects the build/update candidate and preserves the working installation. The composer context requires the current separate host-ID binding; the retired host-object context shape is rejected. The official-bundle CI audit includes populated presets so all seven descriptors are checked, including the upstream Default-option compatibility audit (the merged picker's Default option must use the catalog slider settings exclusively) and the upstream reset-effect audit.

Test

node --test linux-features/model-picker-default-presets/test.js

Set CODEX_SIGNED_EXTRACTED_APP to an extracted official app.asar to also check every descriptor against the signed rspack chunks.