Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

154 linesCodeBlameRaw
1---
2title: AI providers
3description: Choose the models g1t works with in your workspace. Use a frontier lab or a model platform, or a model you host yourself, on your own keys. Ask, @g1t in Chat and sessions on issues answer with them.
4---
5
6**AI**, at `g1t.sh/<workspace>/-/ai`, is where a workspace chooses the
7models g1t works with. It is one of the workspace's own settings, like
8Billing or Runners, and not an integration: the
9[Integrations](/guides/integrations/) directory is for connecting other
10products, such as Sentry or Linear.
11
12Everything here runs on your workspace's own keys. g1t hosts no model for
13it and bills nothing for it: what a model costs is on your provider's
14bill, under your agreement with them.
15
16What uses it:
17
18- **[Ask g1t](/guides/ask/)**, in the top bar, and **@g1t in Chat**
19 answer with the provider and model chosen under **Ask g1t**.
20- **Sessions on issues** start on the workspace's Anthropic provider. See
21 [Start a session on your Anthropic account](/guides/sessions/#start-a-session-on-your-anthropic-account).
22
23Only workspace owners add, test, change and remove providers, and choose
24what Ask uses. Members see which providers there are and what Ask answers
25with.
26
27Adding a provider is the first step of
28[Getting started](/guides/workspaces/#getting-started), the setup guide a
29new workspace's owners see on Home; owners can add one and choose Ask's
30model right there. **Getting started** on this page opens it again.
31
32## Choose where models come from
33
34**Add a provider** lists them in three groups. A workspace can have any
35number of providers, from any mix of groups.
36
37| Group | Providers | What it needs |
38| --- | --- | --- |
39| Frontier labs | Anthropic, OpenAI, Google Gemini, xAI, Mistral, DeepSeek | An API key |
40| Model platforms | Azure OpenAI, OpenRouter, Groq, Together AI, Fireworks AI, Cerebras | An API key. Azure OpenAI also needs your resource's endpoint and the deployment's name. |
41| Self-hosted or your own gateway | Anthropic-compatible endpoint, OpenAI-compatible endpoint | A base URL over `https://`, and a key if it asks for one |
42
43**Self-hosted or your own gateway** is for a model you run yourself
44(vLLM, Ollama behind a tunnel) or a gateway in front of other providers
45(LiteLLM, your own proxy, Amazon Bedrock or Google Vertex AI behind one).
46For an Anthropic-compatible endpoint, give the base URL without `/v1`,
47such as `https://llm.acme.dev`. For an OpenAI-compatible endpoint, give
48it up to and including the version, such as `https://llm.acme.dev/v1`. The
49key is sent as `x-api-key` (Anthropic's header) or
50`Authorization: Bearer` (OpenAI's and most others'), whichever you choose.
51
52You can name the model your team uses on each provider. It is optional,
53except for Azure OpenAI, where it is the deployment.
54
55### Get a key
56
57Each provider's form links to the page where its keys are made, and says
58how. Most show a key only once, so copy it straight into g1t. The API is
59billed apart from a chat subscription: a Claude.ai or ChatGPT plan does
60not include it.
61
62| Provider | Where | How |
63| --- | --- | --- |
64| Anthropic | [platform.claude.com/settings/keys](https://platform.claude.com/settings/keys) | Sign in to the Claude Console and choose **Create key**. Add credits under **Billing**. |
65| OpenAI | [platform.openai.com/api-keys](https://platform.openai.com/api-keys) | Choose **Create new secret key**. Add credit under **Settings → Billing**. |
66| Google Gemini | [aistudio.google.com/apikey](https://aistudio.google.com/apikey) | Sign in with a Google account and choose **Create API key**. The free tier needs no card. |
67| xAI | [console.x.ai](https://console.x.ai) | Open **API Keys** and choose **Create API key**. Add credits under **Billing**. |
68| Mistral | [console.mistral.ai/api-keys](https://console.mistral.ai/api-keys) | Choose **Create new key**. Pick a plan under **Billing**; the free Experiment plan works. |
69| DeepSeek | [platform.deepseek.com/api_keys](https://platform.deepseek.com/api_keys) | Choose **Create new API key**. Add a balance under **Top up**. |
70| Azure OpenAI | [portal.azure.com](https://portal.azure.com) | Open your Azure OpenAI resource, then **Resource Management → Keys and Endpoint**: copy **KEY 1** and the endpoint. Deployments are listed in the Azure AI Foundry portal. |
71| OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | Choose **Create Key**. Paid models need credits under **Credits**. |
72| Groq | [console.groq.com/keys](https://console.groq.com/keys) | Choose **Create API Key**. The free tier needs no card. |
73| Together AI | [api.together.ai/settings/api-keys](https://api.together.ai/settings/api-keys) | Copy the key shown there, or create one. |
74| Fireworks AI | [fireworks.ai/account/api-keys](https://fireworks.ai/account/api-keys) | Choose **Create API Key**. |
75| Cerebras | [cloud.cerebras.ai](https://cloud.cerebras.ai) | Open **API Keys** and choose **Generate API Key**. |
76
77### Anthropic Console workspace
78
79Sessions on issues run on the Anthropic provider's account, and the
80Anthropic Console shows each one in the Console workspace its key belongs
81to. A session does not say which workspace that is, so if the key is not
82in the account's Default workspace, tell g1t: paste any Console address
83from that workspace (such as
84`https://platform.claude.com/workspaces/wrkspc_01AbC…/sessions`), or its
85`wrkspc_` id, into the provider's **Console workspace**. Links to its
86sessions then open there. Left empty, they open in the Default workspace.
87
88## Look after a provider
89
90- **Test.** g1t checks a key when it is saved, and again whenever you
91 choose **Test**, by asking the provider for its models. A key that
92 works shows how many models it offers. One that fails says why, on the
93 provider, until it next works. An endpoint that does not list its
94 models is reached, but its key cannot be checked this way.
95- **Change.** **Change its model, address or key** sets a new model or
96 address, or replaces the key (for Anthropic, its model, Console
97 workspace or key). The old key is gone once the new one is
98 saved.
99- **Remove.** The **×** on a provider removes it and deletes its key. If
100 Ask was using it, Ask is turned off until an owner chooses another.
101
102Keys are sealed when they are saved and never shown again, to anyone. The
103page shows only their last four characters, so you can tell keys apart.
104A key is used to call the provider and is never sent to your browser.
105
106## Choose what Ask answers with
107
108Under **Ask g1t**, at the top of the page, an owner chooses one of the
109workspace's providers and its model, then **Use for Ask**:
110
111- **Auto**, the default, picks a model of that provider for each
112 question: a fast one for a short lookup, a standard one for questions
113 about why, how, what shipped, or a long conversation. See
114 [Auto](/guides/ask/#auto).
115- **A model by name** uses that one for every answer. Choose from the
116 models the provider offered when it was last tested, or, for one that
117 lists none, write the name.
118
119**Turn Ask off** stops Ask and @g1t answering until a provider is chosen
120again.
121
122## From the API
123
124Owners manage a workspace's AI through the API and MCP with a person's
125token (a workspace token cannot). Members can list the providers and read
126what Ask answers with.
127
128| MCP tool and action | Route |
129| --- | --- |
130| `ai` `list_providers` | `GET /workspaces/{workspace}/ai/providers` |
131| `ai` `add_provider` | `POST /workspaces/{workspace}/ai/providers` |
132| `ai` `update_provider` | `PATCH /workspaces/{workspace}/ai/providers/{id}` |
133| `ai` `test_provider` | `POST /workspaces/{workspace}/ai/providers/{id}/test` |
134| `ai` `remove_provider` | `DELETE /workspaces/{workspace}/ai/providers/{id}` |
135| `ai` `get_ask` | `GET /workspaces/{workspace}/ai/ask` |
136| `ai` `set_ask` | `PUT /workspaces/{workspace}/ai/ask` |
137
138```sh
139curl -X POST https://api.g1t.sh/workspaces/acme/ai/providers -H "Authorization: Bearer $G1T_TOKEN" -H "Content-Type: application/json" -d '{"provider": "openai_endpoint", "name": "Our vLLM", "config": {"base_url": "https://llm.acme.dev/v1", "model": "qwen3-coder"}, "secret": "<key>"}'
140```
141
142`provider` is one of `anthropic`, `openai`, `gemini`, `xai`, `mistral`,
143`deepseek` (frontier labs), `azure_openai`, `openrouter`, `groq`,
144`together`, `fireworks`, `cerebras` (model platforms), `anthropic_endpoint`
145or `openai_endpoint` (self-hosted or your own gateway). `config` takes
146`base_url`, `auth_header` (`x-api-key` or `authorization`) and `model`.
147The key is checked as it is saved: the response's `models` lists what it
148offers, and `last_error` says why a check failed. `secret` is write-only;
149`secret_hint` shows its last four characters.
150
151To choose what Ask answers with, `PUT /workspaces/{workspace}/ai/ask` with
152`provider_id` (a provider's `id`) and `model` (`auto` for
153[Auto](/guides/ask/#auto), or a model it offers). Without `provider_id`,
154Ask is turned off.