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. Search matches abbreviated or slightly misspelled provider and model names.

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

With AI Gateway, fx uses spacexai/grok-4.7 until you choose another model, or deepseek/deepseek-v4.1-flash when your team has Token Pass. Codex and Grok have no default model: fx provider codex or fx provider grok saves the model you last used with that provider, or the first model in its catalog.

To see the available IDs from your terminal:

$fx models ls

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.

To change only the effort, run /effort. It lists the current model's levels with the one in use marked; move with the arrow keys and press Enter to apply one. To choose from a list under the prompt instead, as with /model, type /effort and press Tab. You can also pass the level directly:

$/effort high

Press ctrl+t to cycle the reasoning effort without a menu: from default through each of the model's levels, lowest first for AI Gateway models, then back to default. The status line shows the level in use, and no level at default.

The choice is saved as your personal preference, the same as choosing an effort in /model. If fx is already responding, the new effort takes over on the next turn.

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, or /fast on and /fast off to set it. fx saves your preference. While fx runs a model that --model, --provider, or FX_MODEL chose, the change lasts only for that run. Choosing a different model turns Fast mode off unless you choose fast in the model picker's speed step.

The model picker labels a model Fast when it always runs fast, such as a model whose ID ends in -fast, and Fast mode when it offers Fast mode as an option. A model can show both. Models that offer Ultrafast show Ultrafast mode.

Token Pass models

Token Pass is a monthly Vercel subscription that pays for a set of featured models through AI Gateway. When you sign in with fx login or use an AI Gateway API key on a team that has Token Pass, requests to those models draw from the team's Token Pass credit with no extra setup.

When a session starts, fx asks AI Gateway whether your team has Token Pass, with the same request /credits sends, and saves the answer for the team in ~/.fx/token-pass.json, so the next session knows it at once. For a Vercel OIDC token, fx saves the answer under the team and project the token is for. fx also learns it from the model list, /credits, and a response that Token Pass served, and forgets it when AI Gateway says the team has no active Token Pass. To see which provider served a request, press ctrl+o: a request that Token Pass served shows via token-pass. On a team without Token Pass, fx shows nothing about Token Pass unless AI Gateway itself returns a Token Pass error.

On a team with Token Pass, a new session starts on deepseek/deepseek-v4.1-flash at standard speed when you haven't chosen a model with --model, FX_MODEL, or the model picker. This applies to the interactive app, fx ask, and editors that run fx over ACP. The interactive app also says so in the transcript. If fx has no saved answer for the team, it waits up to two seconds for AI Gateway to answer: before the first prompt in the interactive app, before fx ask sends its prompt, and before it replies to an editor's ACP initialize request. A model you choose before the answer arrives stays. fx doesn't save the Token Pass default as your choice, and a resumed session keeps its own model.

When you sign in or change teams, fx shows the team it uses. If fx doesn't know that the team has Token Pass, a line under it links to the Token Pass offer.

AI Gateway's model list marks the models your team's Token Pass pays for, and fx takes them from there, so new featured models show up without an fx update. The model picker lists those models first, under a Token Pass heading above All Models. When you type a search, the picker ranks every model by how well it matches, without the headings, and labels each Token Pass model Token Pass. Token Pass credit doesn't pay for Fast mode, so the picker doesn't show Fast mode for Token Pass models and sets standard speed when you choose one. If you run /fast on with a Token Pass model selected, fx warns that those requests bill your AI Gateway credits.

Token Pass credit is a separate balance from your AI Gateway credits. /credits and fx credits show the team's remaining Token Pass credit and the date it resets as token_pass_remaining and token_pass_resets_at, and fx credits --json returns them in a token_pass object. When AI Gateway can't read the balance, fx leaves out token_pass_remaining, and the JSON has "remaining": null.

On a team with Token Pass and with a Token Pass model selected, fx also sends its own requests to Token Pass models, when the model list marks them. Auto mode reviews use deepseek/deepseek-v4.1-flash, and session titles and the vision fallback use zai/glm-5.3-flash. If the selected model can't write a context compaction summary, fx retries it with a Token Pass model from another provider. A review_model setting still chooses the reviewer.

For more about Token Pass, see the Vercel docs:

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 Ultrafast 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, except while fx runs a model that --model, --provider, or FX_MODEL chose: then they change only that run. 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. FX_ULTRAFAST accepts 1, true, on, or yes to enable and 0, false, off, or no to disable; any other value fails before a model request. When you pass more than one speed flag, the last one wins, so --ultrafast --fast runs in Fast mode.

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
}

To save only the Ultrafast default without editing the file, run fx config set ultrafast_mode true. Restart fx after either change. 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 the Ultrafast line of /status describe 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. fx ask, fx pr, fx issue, and fx acp take --provider, --model, --effort, --fast, and --ultrafast after the command, such as fx acp --provider codex --model '<model-id>'.

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"

--no-provider-strict lifts a saved restriction for that request. To route every request in one process, set FX_PROVIDER_ORDER=bedrock,anthropic and FX_PROVIDER_STRICT=1.

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.