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.

166 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## Connect an AI app
33
34Workspace providers power Ask and hosted sessions. To use your own coding
35agent or chat app with g1t, [connect an AI client](/guides/bring-your-own-agent/)
36through MCP instead. This includes Codex, ChatGPT, Claude, Grok, Open WebUI
37and LibreChat; connecting a client does not copy your workspace API keys into it.
38
39Connection guides initially choose a client based on the first configured
40provider. Your explicit tab choice takes precedence and is remembered across
41projects and docs in the same browser. The inferred choice is cached, so
42browsing setup instructions does not fetch provider settings each time.
43
44## Choose where models come from
45
46**Add a provider** lists them in three groups. A workspace can have any
47number of providers, from any mix of groups.
48
49| Group | Providers | What it needs |
50| --- | --- | --- |
51| Frontier labs | Anthropic, OpenAI, Google Gemini, xAI, Mistral, DeepSeek | An API key |
52| 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. |
53| 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 |
54
55**Self-hosted or your own gateway** is for a model you run yourself
56(vLLM, Ollama behind a tunnel) or a gateway in front of other providers
57(LiteLLM, your own proxy, Amazon Bedrock or Google Vertex AI behind one).
58For an Anthropic-compatible endpoint, give the base URL without `/v1`,
59such as `https://llm.acme.dev`. For an OpenAI-compatible endpoint, give
60it up to and including the version, such as `https://llm.acme.dev/v1`. The
61key is sent as `x-api-key` (Anthropic's header) or
62`Authorization: Bearer` (OpenAI's and most others'), whichever you choose.
63
64You can name the model your team uses on each provider. It is optional,
65except for Azure OpenAI, where it is the deployment.
66
67### Get a key
68
69Each provider's form links to the page where its keys are made, and says
70how. Most show a key only once, so copy it straight into g1t. The API is
71billed apart from a chat subscription: a Claude.ai or ChatGPT plan does
72not include it.
73
74| Provider | Where | How |
75| --- | --- | --- |
76| 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**. |
77| OpenAI | [platform.openai.com/api-keys](https://platform.openai.com/api-keys) | Choose **Create new secret key**. Add credit under **Settings → Billing**. |
78| 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. |
79| xAI | [console.x.ai](https://console.x.ai) | Open **API Keys** and choose **Create API key**. Add credits under **Billing**. |
80| 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. |
81| DeepSeek | [platform.deepseek.com/api_keys](https://platform.deepseek.com/api_keys) | Choose **Create new API key**. Add a balance under **Top up**. |
82| 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. |
83| OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | Choose **Create Key**. Paid models need credits under **Credits**. |
84| Groq | [console.groq.com/keys](https://console.groq.com/keys) | Choose **Create API Key**. The free tier needs no card. |
85| Together AI | [api.together.ai/settings/api-keys](https://api.together.ai/settings/api-keys) | Copy the key shown there, or create one. |
86| Fireworks AI | [fireworks.ai/account/api-keys](https://fireworks.ai/account/api-keys) | Choose **Create API Key**. |
87| Cerebras | [cloud.cerebras.ai](https://cloud.cerebras.ai) | Open **API Keys** and choose **Generate API Key**. |
88
89### Anthropic Console workspace
90
91Sessions on issues run on the Anthropic provider's account, and the
92Anthropic Console shows each one in the Console workspace its key belongs
93to. A session does not say which workspace that is, so if the key is not
94in the account's Default workspace, tell g1t: paste any Console address
95from that workspace (such as
96`https://platform.claude.com/workspaces/wrkspc_01AbC…/sessions`), or its
97`wrkspc_` id, into the provider's **Console workspace**. Links to its
98sessions then open there. Left empty, they open in the Default workspace.
99
100## Look after a provider
101
102- **Test.** g1t checks a key when it is saved, and again whenever you
103 choose **Test**, by asking the provider for its models. A key that
104 works shows how many models it offers. One that fails says why, on the
105 provider, until it next works. An endpoint that does not list its
106 models is reached, but its key cannot be checked this way.
107- **Change.** **Change its model, address or key** sets a new model or
108 address, or replaces the key (for Anthropic, its model, Console
109 workspace or key). The old key is gone once the new one is
110 saved.
111- **Remove.** The **×** on a provider removes it and deletes its key. If
112 Ask was using it, Ask is turned off until an owner chooses another.
113
114Keys are sealed when they are saved and never shown again, to anyone. The
115page shows only their last four characters, so you can tell keys apart.
116A key is used to call the provider and is never sent to your browser.
117
118## Choose what Ask answers with
119
120Under **Ask g1t**, at the top of the page, an owner chooses one of the
121workspace's providers and its model, then **Use for Ask**:
122
123- **Auto**, the default, picks a model of that provider for each
124 question: a fast one for a short lookup, a standard one for questions
125 about why, how, what shipped, or a long conversation. See
126 [Auto](/guides/ask/#auto).
127- **A model by name** uses that one for every answer. Choose from the
128 models the provider offered when it was last tested, or, for one that
129 lists none, write the name.
130
131**Turn Ask off** stops Ask and @g1t answering until a provider is chosen
132again.
133
134## From the API
135
136Owners manage a workspace's AI through the API and MCP with a person's
137token (a workspace token cannot). Members can list the providers and read
138what Ask answers with.
139
140| MCP tool and action | Route |
141| --- | --- |
142| `ai` `list_providers` | `GET /workspaces/{workspace}/ai/providers` |
143| `ai` `add_provider` | `POST /workspaces/{workspace}/ai/providers` |
144| `ai` `update_provider` | `PATCH /workspaces/{workspace}/ai/providers/{id}` |
145| `ai` `test_provider` | `POST /workspaces/{workspace}/ai/providers/{id}/test` |
146| `ai` `remove_provider` | `DELETE /workspaces/{workspace}/ai/providers/{id}` |
147| `ai` `get_ask` | `GET /workspaces/{workspace}/ai/ask` |
148| `ai` `set_ask` | `PUT /workspaces/{workspace}/ai/ask` |
149
150```sh
151curl -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>"}'
152```
153
154`provider` is one of `anthropic`, `openai`, `gemini`, `xai`, `mistral`,
155`deepseek` (frontier labs), `azure_openai`, `openrouter`, `groq`,
156`together`, `fireworks`, `cerebras` (model platforms), `anthropic_endpoint`
157or `openai_endpoint` (self-hosted or your own gateway). `config` takes
158`base_url`, `auth_header` (`x-api-key` or `authorization`) and `model`.
159The key is checked as it is saved: the response's `models` lists what it
160offers, and `last_error` says why a check failed. `secret` is write-only;
161`secret_hint` shows its last four characters.
162
163To choose what Ask answers with, `PUT /workspaces/{workspace}/ai/ask` with
164`provider_id` (a provider's `id`) and `model` (`auto` for
165[Auto](/guides/ask/#auto), or a model it offers). Without `provider_id`,
166Ask is turned off.