Models

Use /model to choose a model. fx remembers your selection for each provider.

Browse and select

Type /model and search by name, or press ctrl+p to switch models without losing the prompt you are typing.

The available models depend on your provider. Use /provider to change it. A custom connection uses the model IDs understood by its endpoint.

To see the available IDs from your terminal:

$fx models

If fx is already responding, the new model takes over on the next turn.

Reasoning effort

After choosing a model with /model, select a reasoning effort if the model supports it. Higher effort gives the model more room to reason and can take longer. Choose default to use the model's default effort.

You can also choose a different model and effort for each subagent.

Fast mode

Use /fast to turn faster inference on or off for models that support it. fx saves your preference.

Ultrafast mode

Ultrafast is a separate, default-off request for OpenAI's higher-priced service tier through AI Gateway. It requires an OpenAI model whose Gateway catalog advertises Ultrafast pricing. It does not work through custom connections or subscription providers.

Check pricing before enabling Ultrafast

Ultrafast costs more than the standard tier. Check your model's current Gateway pricing before sending a prompt. Eligible subagents can inherit the request and incur the same higher prices.

Enable it in fx

Select an eligible model, then enable the request:

/model openai/gpt-6-astra
/ultrafast on
/ultrafast status

Use /ultrafast off to disable it. With no argument, /ultrafast reports status; it does not toggle the setting like /fast.

You can also change Ultra mode in /settings, or choose ultrafast in the model picker's speed step. To select the model, effort, and speed together:

/model openai/gpt-6-astra xhigh ultrafast

The selection notice includes the effort and speed. Both speed modes use one lightning marker: plain for Fast and yellow for Ultrafast. These controls save your personal preference. Switching models without explicitly choosing Ultrafast clears the existing request.

Enable it for one process

These examples select an eligible model without changing your saved defaults:

fx --provider gateway --model openai/gpt-6-astra --ultrafast
FX_PROVIDER=gateway fx ask --model openai/gpt-6-astra --ultrafast "Review this change"
FX_PROVIDER=gateway fx acp --model openai/gpt-6-astra --ultrafast

Or use environment variables with any of those entry points:

FX_PROVIDER=gateway FX_MODEL=openai/gpt-6-astra FX_ULTRAFAST=1 fx

--no-ultrafast or FX_ULTRAFAST=0 explicitly disables the request. CLI flags take precedence over environment variables. Malformed FX_ULTRAFAST values and conflicting Fast/Ultrafast flags fail before a model request.

Save a profile default

Add these fields to ~/.fx/settings.json, preserving your other settings:

{
  "provider": "gateway",
  "models": { "gateway": "openai/gpt-6-astra" },
  "ultrafast_mode": true
}

Restart fx after editing the file. You can also set ultrafast_mode in a profile workspace entry. A committed project .fx.json cannot enable it. CLI and environment opt-ins stay process-local and are not saved into a later session.

A resumed conversation restores its saved preference unless a CLI or environment override applies. Use an explicit disable when you want to resume without the higher-priced tier.

Eligibility and served-tier confirmation

fx uses Gateway pricing metadata rather than a model-name allowlist. A model such as GPT-5.6 Sol qualifies only when the catalog for your selected Gateway account/team advertises its Ultrafast prices. OpenAI preview access alone does not establish Gateway eligibility. fx rejects unknown or unsupported eligibility before sending a completion request; it does not silently downgrade locally.

Ultrafast routes only through OpenAI. A strict provider list that excludes openai is rejected. Enabling Fast disables Ultrafast, and enabling Ultrafast disables Fast.

ultrafast_requested in fx status --json and /status describes the request, not the tier Gateway served. If Gateway does not confirm Ultrafast, fx warns that the response may have used a standard or lower tier. The footer is not proof of billing or throughput.

ACP clients can change the request per session. Subagents inherit it subject to their model and saved preference. libfx exposes model.ultrafast for native and WebAssembly agents. Session titles, permission reviews, and compaction do not inherit it.

Temporary overrides

Choose a provider and model when starting fx:

fx --provider gateway --model '<model-id>'

Or choose a model for one prompt:

fx ask --model '<model-id>' "Review the changes in this branch"

These flags leave your saved defaults unchanged. For fx ask, set FX_PROVIDER when you also need a different provider. You can use the same environment variables with fx acp.

AI Gateway routing

One AI Gateway model may be available from several inference providers. Use provider_order to prefer specific providers, and provider_strict to prevent fallback outside that list:

{
  "provider_order": ["bedrock", "anthropic"],
  "provider_strict": true
}

These settings work in .fx.json and ~/.fx/settings.json. For one request:

fx ask --provider-order bedrock,anthropic --provider-strict "Review this change"

Use provider slugs from the AI Gateway model catalog. fx ask --json returns the provider that served the last request in resolved_provider when AI Gateway reports it.

Selection order

If fx starts with an unexpected model, check --model and FX_MODEL first: both override saved preferences, and --model takes precedence. Workspace preferences in ~/.fx/settings.json override global preferences. Use /status to check the current selection. See Configuration for settings and scopes.

AI Gateway catalogs

AI Gateway can include models available to your selected Vercel team. To use another team's catalog, change teams.