| 1 | --- |
| 2 | title: Model providers |
| 3 | description: Connect Anthropic, OpenAI, Gemini or any compatible endpoint, choose which model does which work, and pay for it where you choose. |
| 4 | --- |
| 5 | |
| 6 | Each workspace decides where its agents' model spend goes: |
| 7 | |
| 8 | - **g1t's hosted models.** g1t chooses the model for each kind of work, pays |
| 9 | the provider, and charges your workspace what it cost plus 20%. The |
| 10 | plan's included usage and [the trial](/guides/usage-and-billing/#the-trial) |
| 11 | pay for it first. While payments are in test mode, they are open only |
| 12 | to a few invited workspaces, g1t's own among them; a card check or a |
| 13 | trial does not open them. Every other workspace connects its own |
| 14 | provider, and an agent assigned without one is refused with a message |
| 15 | that says so. Once payments go live, they are open to all. |
| 16 | - **Your own providers.** Connect as many as you use, then choose, for each |
| 17 | kind of work, which provider and model it runs on. Each provider bills |
| 18 | you directly. Open to every workspace now. |
| 19 | |
| 20 | g1t's own routing is fixed; yours is not. |
| 21 | |
| 22 | ## Providers |
| 23 | |
| 24 | Labs and platforms need only a key; g1t knows where they are. |
| 25 | |
| 26 | | | Provider | What you give | |
| 27 | | --- | --- | --- | |
| 28 | | Labs | **Anthropic** | An API key | |
| 29 | | | **OpenAI** | An API key | |
| 30 | | | **Google Gemini** | An API key from Google AI Studio | |
| 31 | | | **xAI** (Grok) | An API key | |
| 32 | | | **Mistral** | An API key | |
| 33 | | | **DeepSeek** | An API key | |
| 34 | | Platforms | **Azure OpenAI** | Your resource's endpoint, its key, and a deployment name | |
| 35 | | | **OpenRouter** | An API key: hundreds of models from every lab | |
| 36 | | | **Groq** | An API key | |
| 37 | | | **Together AI** | An API key | |
| 38 | | | **Fireworks AI** | An API key | |
| 39 | | | **Cerebras** | An API key | |
| 40 | | Any endpoint | **Anthropic-compatible** | A base URL, and a key if it needs one: your own Cloudflare AI Gateway, LiteLLM, Bedrock or Vertex behind a proxy | |
| 41 | | | **OpenAI-compatible** | A base URL including its version, a model, and a key if it needs one: vLLM, Ollama behind a tunnel, LiteLLM | |
| 42 | |
| 43 | An endpoint behind an authenticated Cloudflare AI Gateway also takes the |
| 44 | gateway's token, sent as `cf-aig-authorization`. |
| 45 | |
| 46 | g1t's agents run Claude Code, which speaks Anthropic's API. Every provider |
| 47 | but Anthropic and an Anthropic-compatible endpoint speaks OpenAI's, so g1t's model proxy translates each |
| 48 | request, and the streamed answer back, tool calls included, and meets each |
| 49 | provider's quirks: the token limits DeepSeek and Groq set, how Mistral |
| 50 | names a required tool, Azure's `api-key` header, and the thought signatures |
| 51 | Gemini needs back with each tool call. Agents work the same either way. |
| 52 | How well they work depends on the model: it has to be good at using tools |
| 53 | over many steps. |
| 54 | |
| 55 | ## Connect a provider |
| 56 | |
| 57 | 1. Open the workspace's **Settings → Integrations**. You need to be an owner. |
| 58 | 2. Under **Model providers**, choose one, and give its key (and address, for |
| 59 | an endpoint). |
| 60 | 3. **Connect**. g1t checks the key at once and lists the provider's models. |
| 61 | **Test** checks it again later. |
| 62 | |
| 63 | A workspace can connect any number, including several of the same kind. |
| 64 | |
| 65 | ## Choose which model does which work |
| 66 | |
| 67 | Under **Which model does which work**, each kind of work has a choice: |
| 68 | |
| 69 | | Kind of work | | |
| 70 | | --- | --- | |
| 71 | | Everything | Used for any kind of work that does not choose for itself. | |
| 72 | | Making changes | Writing the change for an issue, and revising it. | |
| 73 | | Reviewing | The second agent that reviews each change. | |
| 74 | | Planning | Turning an outcome into issues. | |
| 75 | | Catching up | Bringing a change up to date with `main`. | |
| 76 | |
| 77 | Each can go to g1t's models, or to any of your providers on any of its |
| 78 | models. An Anthropic provider also offers **g1t's choice of Claude**, |
| 79 | which runs g1t's large-tier model, Claude Sonnet 5.5 today, on your key. |
| 80 | Routing between tiers by the size of the work is only for g1t's hosted |
| 81 | models; see [which model runs](/guides/working-with-g1t/#which-model-runs). For example: make |
| 82 | changes on Claude through your Anthropic key, review on GPT through your |
| 83 | OpenAI key, and catch up on a small model through OpenRouter. |
| 84 | |
| 85 | **Save routing**, and the next runs use it. Without any routing, work goes |
| 86 | to g1t's models where they are open to the workspace, and otherwise to the |
| 87 | first provider you connected. |
| 88 | |
| 89 | A pull request's session says which model ran, and through which provider. |
| 90 | |
| 91 | ## What it costs |
| 92 | |
| 93 | Your providers bill you for the models. g1t charges only each run's |
| 94 | [sandbox time](/guides/usage-and-billing/#sandbox-time), at what it costs |
| 95 | g1t plus 20%, by the second. A change, a review, a revision, a catch-up |
| 96 | and a plan each run in a sandbox, and each sandbox is a line on the |
| 97 | statement. See [Usage and billing](/guides/usage-and-billing/). |
| 98 | |
| 99 | That sandbox time counts toward the workspace's usage limit like any |
| 100 | other. |
| 101 | |
| 102 | ## Your keys never reach a sandbox |
| 103 | |
| 104 | An agent works in a sandbox with internet access, on code and text that |
| 105 | anyone could have written. g1t assumes a sandbox can be talked into |
| 106 | printing its environment, so no key is ever in it: |
| 107 | |
| 108 | 1. When a run starts, g1t gives the sandbox a token for that run only. |
| 109 | 2. The sandbox sends its model requests to `https://models.g1t.sh` with that |
| 110 | token in place of a key. |
| 111 | 3. g1t's model proxy looks the token up, adds the key for the provider the |
| 112 | work is routed to, translates if the provider speaks OpenAI's API, and |
| 113 | forwards the request. Answers stream straight back. |
| 114 | |
| 115 | As each answer passes, the proxy reads how many tokens it used (input, |
| 116 | output, and cache reads and writes) and counts them for the run, under the |
| 117 | person it was for. Those counts are for usage views; they never change what |
| 118 | a run is charged. |
| 119 | |
| 120 | The token stops working within seconds of the run finishing, however it |
| 121 | ends, and within seconds if you disconnect the provider. A run whose end |
| 122 | g1t never hears about loses it three hours after it starts. Keys are sealed when you save them, and used |
| 123 | only by the proxy. g1t's own runs work the same way, with g1t's key. |
| 124 | |
| 125 | ## From the API |
| 126 | |
| 127 | | MCP tool and action | Route | |
| 128 | | --- | --- | |
| 129 | | `workspace` `connect_integration` | `POST /workspaces/{workspace}/integrations` with `provider` one of `anthropic`, `openai`, `gemini`, `xai`, `mistral`, `deepseek`, `azure_openai`, `openrouter`, `groq`, `together`, `fireworks`, `cerebras`, `anthropic_endpoint`, `openai_endpoint` | |
| 130 | | `workspace` `get_model_routes` | `GET /workspaces/{workspace}/model-routes` | |
| 131 | | `workspace` `set_model_routes` | `PUT /workspaces/{workspace}/model-routes` | |
| 132 | |
| 133 | ```sh |
| 134 | curl -X PUT https://api.g1t.sh/workspaces/acme/model-routes \ |
| 135 | -H "Authorization: Bearer $G1T_TOKEN" -H "Content-Type: application/json" \ |
| 136 | -d '{"routes": [ |
| 137 | {"task": "default", "connection_id": "con_…anthropic", "model": null}, |
| 138 | {"task": "review", "connection_id": "con_…openai", "model": "gpt-5"} |
| 139 | ]}' |
| 140 | ``` |
| 141 | |
| 142 | `task` is `default`, `implement`, `review`, `plan` or `update`. |
| 143 | `connection_id` is null for g1t's hosted models. `model` is null for the |
| 144 | provider's default, or for an Anthropic provider, g1t's choice of Claude. |