Fx
Use aicentos in Fx — add a custom model connection through the user-level settings.json
Last updated:
Fx is a coding agent from Vercel Labs, written in Zig as a single native binary and model-agnostic. Custom model connections are defined in the user-level ~/.fx/settings.json; point the base URL at aicentos.
One pitfall to call out first: .fx.json in the project root is a different thing. It deliberately disallows most fields (including models) so that a cloned repository cannot swap out your model or endpoint. Custom endpoints must be written in ~/.fx/settings.json — putting them in .fx.json has no effect.
Prerequisites
First create a dedicated key for Fx on the console's "API Keys" page (naming it fx makes usage easier to track):
- Console: https://aicentos.com
- Create a key: https://aicentos.com/keys
- Top up when the balance runs out: https://aicentos.com/wallet
Confirm Fx is installed:
curl -fsSL https://fx.sh/setup.sh | bash
fx --versionConfiguration to fill in
| Field | Value |
|---|---|
| Config file | ~/.fx/settings.json |
| Base URL | https://aicentos.com/v1 |
| API Key | The key created in the console |
| Model | A model name from the Model Gallery in the console |
Setup steps
1. Edit the user-level settings
In ~/.fx/settings.json, register a connection following the "custom model connection" format. The field structure of the connection object is defined by the official documentation:
- Documentation: https://fx.sh/docs
- README: https://github.com/vercel-labs/fx
Set the API address of the connection to:
https://aicentos.com/v1For the API Key, use the one you created in the console; take model names from the Model Gallery in the console.
2. Point Fx at the connection
Fx lets you specify the provider and model at launch:
fx provider local FX_MODEL=gpt-4o fx ask "Answer in one sentence: what is 1+1?"Or specify it with an environment variable:
export FX_MODEL="gpt-4o"3. Confirm the current provider
Fx remembers your choice per provider; the next launch reuses the previous provider.
Test
First verify connectivity with a side-effect-free prompt:
fx ask "Answer in one sentence: what is 1+1?"A normal response means the integration works. On authentication errors, first check whether the base URL includes /v1 and whether the API Key has stray spaces.
Notes
- Do not touch
.fx.json. The project-level file only allows a few fields such asprovider_orderandprovider_strict, has nomodelfield, and is not used to configure custom endpoints. provider_order/provider_strictare Vercel AI Gateway routing parameters; they only apply to Gateway requests — custom model connections ignore them. Do not expect them to switch the upstream.- Official support for custom model connections in Fx is still evolving; older versions may need a newer build to recognize them. After upgrading, run the test command above once before real use.
- The binary install script downloads from the network; verify that you trust the source before running it.
Related links
- Project home: https://github.com/vercel-labs/fx