# fx × Vivgrid

> Source: https://vivgrid.com/docs/tutorials/fx

Use gpt-6.1-sol, claude-opus-5-5 and glm-5.3 in fx with Vivgrid

## fx

[fx](https://fx.sh) is an open-source coding agent for your terminal. Connect it to Vivgrid with a custom OpenAI-compatible model connection, then select among Vivgrid models in the same session.

## Install fx

On macOS or Linux, install fx with:

```bash
curl -fsSL https://fx.sh/setup.sh | bash
```

Open a new terminal and check the installation:

```bash
fx --version
```

See the [fx installation guide](https://fx.sh/docs/getting-started/installation) for other install options.

## Configure fx to Use Vivgrid

Get an API key from the [Vivgrid Console](https://console.vivgrid.com) and set it in your shell:

```bash
export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
```

Add a custom connection and model list to `~/.fx/settings.json`. Merge these keys into your existing file rather than replacing other settings:

```json title="~/.fx/settings.json" icon="json"
{
  "provider": "vivgrid",
  "providers": {
    "vivgrid": {
      "protocol": "openai-chat-completions",
      "base_url": "https://api.vivgrid.com/v1",
      "auth": {
        "type": "bearer",
        "env": "VIVGRID_API_KEY"
      },
      "model_metadata": {
        "gpt-6.1-sol": {
          "context_window": 1050000,
          "max_output_tokens": 128000,
          "supports_tool_use": true,
          "supports_vision": true
        },
        "claude-opus-5-5": {
          "context_window": 1000000,
          "max_output_tokens": 128000,
          "supports_tool_use": true,
          "supports_vision": true
        },
        "glm-5.3": {
          "context_window": 1000000,
          "max_output_tokens": 128000,
          "supports_tool_use": true
        }
      }
    }
  },
  "models": {
    "vivgrid": "gpt-6.1-sol"
  }
}
```

The model IDs and limits match the [gpt-6.1-sol](/docs/models/gpt-6.1-sol), [claude-opus-5-5](/docs/models/claude-opus-5-5), and [glm-5.3](/docs/models/glm-5.3) catalog pages. fx uses the Chat Completions API for custom connections; Vivgrid supports these models on that API.

<Callout>
  Keep your API key in the environment variable rather than writing it into the
  settings file. If you added the connection while fx was already running,
  restart fx to load the updated settings.
</Callout>

## Verify the Connection

List the models declared in the connection:

```bash
fx models
```

Check the selected provider and model:

```bash
fx status
```

## Start Using fx with Vivgrid

Start an interactive session with the configured default model:

```bash
fx
```

Choose another model with `/model`, or start a session with a specific model:

```bash
fx --provider vivgrid --model claude-opus-5-5
fx --provider vivgrid --model glm-5.3
```

You can also make a one-shot request:

```bash
fx ask --provider vivgrid --model gpt-6.1-sol "Explain the auth flow in this repository"
```

fx accepts an `--effort` option for models that support reasoning effort. Vivgrid's model-specific docs describe model/API compatibility, but do not specify how effort is handled on the Chat Completions surface. Treat effort as endpoint-dependent rather than assuming the custom connection forwards provider-specific reasoning controls.

## Summary

A single Vivgrid key and `https://api.vivgrid.com/v1` connection makes `gpt-6.1-sol`, `claude-opus-5-5`, and `glm-5.3` available in fx. Configure the endpoint once, then select a model with `/model` or the `--model` option.
