12 KiB
v0.3.2 Fast Mode Implementation Plan
Goal
v0.3.2 adds a /fast command that lets users opt into faster provider inference when the active provider/model supports it. The setting should feel like a user preference, but the runtime state should be capability-aware: fast mode is shown as enabled only when the current provider/model can actually honor it.
Success statement:
A ChatGPT Codex user can type
/fast, see fast mode enabled for Codex models that support it, switch to an unsupported provider/model and see fast mode become unavailable, then switch back and have the preference apply again.
Scope
In scope
- Add an idle-only
/fastlocal command that toggles the user's fast-mode preference. - Persist the preference in Cassady config so it survives new chats and restarts.
- Add provider/model capability metadata that determines whether fast mode is currently active.
- Implement fast-mode request support for
ChatGPT Codexfirst. - Keep unsupported providers/models explicit: the preference can remain on, but the UI/status should say fast mode is unavailable rather than enabled.
- Update
/status, the bottom/status line, command autocomplete/help, README, and bundled docs. - Add focused tests for command parsing, persistence, capability gating, provider request shaping, and model switching.
Out of scope
- Adding fast-mode support for OpenAI-compatible providers in v0.3.2.
- Guessing provider-specific fast-mode request fields without verified behavior.
- Adding latency benchmarking, automatic mode selection, or per-turn speed/quality controls beyond the
/fasttoggle. - Changing the default model selection flow except to record fast-mode capability for known built-in presets.
- Treating fast mode as a quality guarantee; providers may still vary in latency and output behavior.
Context or Current State
Cassady already has several runtime preferences and model/provider capability paths that should guide this work:
src/app.rsparses local slash commands such as/model,/login,/logout, and/status, and already restricts provider/model changes to idle state.src/config.rspersists default model and reasoning effort inconfig.jsonand stores model metadata inmodels.json.ModelDefinitionalready includes capability-like metadata such assupports_tools,supports_streaming, andreasoning.ProviderClient::from_configinsrc/providers/mod.rsdispatches by provider kind toOpenAiCompatibleProviderorChatGptCodexProvider.src/providers/chatgpt_codex.rsis the first provider where fast mode should affect the outgoing request./modelalready reloads model metadata and resets reasoning effort based on the new model./statuscurrently reports chat id, model, mode, cwd, records, and current status.
The important product behavior is that "fast mode preference" and "fast mode active" are different states:
- Preference: whether the user wants fast mode when possible.
- Active: whether the current provider/model supports fast mode and the preference is enabled.
Design Principles
- Preference stays stable, capability controls activation. Switching to an unsupported provider/model should not erase the user's preference; it should only make fast mode inactive until support is available again.
- Provider-specific request details stay behind provider clients. The agent loop should pass a normalized fast-mode flag; each provider decides whether and how to encode it.
- UI wording must distinguish enabled from unavailable. Avoid showing "fast mode enabled" when Cassady cannot send a fast-mode request for the active provider/model.
- Extend metadata, do not hardcode every check in the TUI. Use provider/model capability helpers so future providers can add fast mode without rewriting command handling.
- Keep unsupported behavior quiet and compatible. Existing OpenAI-compatible providers should continue working unchanged and should not receive unknown request fields.
Design
User model
Add a user preference to config.json:
{
"default_fast_mode": true
}
Suggested behavior:
- Missing
default_fast_modedefaults tofalse. /fasttoggles the preference while idle./fast onand/fast offmay be supported if easy, but the minimum required command is the toggle form.- The preference is persisted immediately, similar to last-used model/reasoning persistence.
- The active state is recomputed whenever config, provider, model, or model metadata changes.
Status examples:
fast mode: enabled
fast mode: unavailable for provider fireworks
fast mode: off
If the user toggles fast mode on while using an unsupported provider:
fast mode preference on; unavailable for this provider/model
If the user later switches to a supported Codex model, the UI should show:
fast mode enabled
Capability model
Add a small capability representation, preferably on model metadata with provider-kind fallback:
{
"id": "gpt-5.5",
"provider": "chatgpt-codex",
"fast_mode": {
"supported": true
}
}
Rules:
fast_mode.supporteddefaults tofalseunless a provider-specific built-in preset intentionally marks it true.- For the
ChatGPT Codexbuilt-in setup path, saved Codex model metadata should mark fast mode as supported when the implementation can send the fast-mode request for that provider. - Manual custom providers and discovered OpenAI-compatible models should default to unsupported.
- If a provider supports fast mode for all models but model metadata is missing, provider-specific capability fallback may return supported. Keep that fallback in config/provider capability helpers, not in UI string matching.
Add helper APIs along these lines:
pub struct FastModeState {
pub preferred: bool,
pub supported: bool,
pub active: bool,
pub unavailable_reason: Option<String>,
}
impl Config {
pub fn fast_mode_state(&self) -> FastModeState;
}
active should be exactly preferred && supported.
Provider request behavior
Thread the active fast-mode boolean through the provider settings:
ProviderClient::from_config(&config, reasoning_effort, fast_mode_active)
or include it in a runtime options struct if that is cleaner:
pub struct ProviderRuntimeOptions {
pub reasoning_effort: ReasoningEffort,
pub fast_mode: bool,
}
ChatGptCodexProvider should encode fast mode using the verified Codex responses request shape. During implementation, verify the exact field against the current Codex behavior and capture the resulting request body in tests. The plan intentionally does not prescribe a speculative field name.
OpenAI-compatible providers should ignore the setting until support is explicitly added. They must not receive experimental Codex-only fields.
UI and command behavior
Add LocalCommand::Fast(FastModeCommand) in src/app.rs.
Minimum command behavior:
/fast
Recommended optional forms:
/fast on
/fast off
/fast status
Command handling:
- Only allow changes while idle.
- Persist the preference to
config.json. - Recompute active state from the current provider/model after toggling.
- Append or show a concise status message.
- Include
/fastin autocomplete/local command help.
Update /status to include both preference and active state, for example:
fast: enabled
or:
fast: preferred, unavailable for provider fireworks
The bottom/status line should include a compact signal only when useful:
fastwhen active.- No
fastlabel when off. - Optional
fast unavailableonly immediately after toggling or in/status, to avoid clutter.
Model and provider switching
When /model changes the active model:
- Reload
config.model_metadataas today. - Recompute reasoning effort as today.
- Recompute fast-mode state.
- Show the model status with fast-mode state when the preference is on.
Expected examples:
model: gpt-5.5 · fast enabled
model: accounts/fireworks/models/qwen3p7-plus · fast unavailable
When /login or /logout updates provider config:
- Reload config as today.
- Preserve
default_fast_mode. - Recompute fast-mode state for the new active provider/model.
Configuration and docs
Update docs to describe:
default_fast_modeinconfig.json.fast_mode.supportedinmodels.json./fastcommand behavior.- Provider support status: v0.3.2 supports fast mode only for
ChatGPT Codex. - The distinction between fast-mode preference and active fast-mode support.
Implementation Steps
- Extend config types in
src/config.rs:- Add
default_fast_mode: Option<bool>to the config file representation. - Add
fast_modemetadata to model definitions. - Add a
FastModeStatehelper that computes preferred/supported/active.
- Add
- Add persistence helpers:
- Save fast-mode preference without disturbing unrelated config fields.
- Ensure existing
save_last_usedbehavior preserves the new field.
- Mark built-in
ChatGPT Codexmodel metadata as fast-mode capable during setup/login when the provider implementation supports it. - Add provider runtime options and pass
fast_mode_state.activeintoProviderClientconstruction fromsrc/agent.rs. - Implement Codex request support in
src/providers/chatgpt_codex.rsusing the verified fast-mode request shape. - Keep
OpenAiCompatibleProviderbehavior unchanged and add tests proving it does not receive fast-mode fields. - Add
/fastparsing and idle command handling insrc/app.rs, including optionalon,off, andstatusforms if the implementation remains small. - Update
/status, status-line rendering, autocomplete/help text, and model-switch status messages. - Update
README.md,docs/commands.md,docs/configuration.md,docs/providers.md,docs/workflows.md, anddocs/glossary.md. - Add focused tests and run
cargo fmtpluscargo test --locked --all-targets.
Tests
config.jsonwithoutdefault_fast_modedefaults to fast mode off.default_fast_mode: trueloads and persists without losing existing config fields.models.jsonparsesfast_mode.supported.- Unsupported or missing fast-mode metadata produces
FastModeState { preferred: true, supported: false, active: false }. - A supported ChatGPT Codex model produces
active: truewhen preference is on. /fastparses as a local command and rejects unexpected arguments unless expliciton/off/statusforms are implemented./fastcannot change preference during an active turn.- Toggling
/fastwhile on an unsupported provider stores the preference but reports unavailable. - Switching from a supported Codex model to an unsupported model hides the active fast-mode signal without clearing the preference.
- Switching back to a supported Codex model restores active fast mode.
ChatGptCodexProviderincludes the verified fast-mode request field only when active.OpenAiCompatibleProviderrequest bodies are unchanged when fast-mode preference is on but unsupported./statusincludes fast-mode state.- README and bundled docs mention
/fastand provider-specific support. cargo fmtpasses.cargo test --locked --all-targetspasses when practical.
Documentation
- README command list and provider setup notes.
docs/commands.mdfor/fastsyntax and idle-only behavior.docs/configuration.mdfordefault_fast_modeandmodels.jsonfast-mode capability metadata.docs/providers.mdfor the initial ChatGPT Codex-only support.docs/workflows.mdfor switching models/providers with fast-mode preference preserved.docs/glossary.mdfor "Fast mode" as a preference plus provider/model capability.
Acceptance Criteria
/fasttoggles a persisted fast-mode preference.- Fast mode is shown as enabled only when the active provider/model supports it.
- Unsupported providers/models do not show fast mode enabled and do not receive fast-mode request fields.
- ChatGPT Codex requests include the verified fast-mode option when the preference is on and the active Codex model supports it.
- Switching models/providers recomputes fast-mode active state without clearing the user's preference.
/status, autocomplete/help, README, and bundled docs describe the feature accurately.cargo fmtandcargo test --locked --all-targetspass before implementation handoff.