| 1 | --- |
| 2 | title: AI providers |
| 3 | description: 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 |
| 7 | models g1t works with. It is one of the workspace's own settings, like |
| 8 | Billing or Runners, and not an integration: the |
| 9 | [Integrations](/guides/integrations/) directory is for connecting other |
| 10 | products, such as Sentry or Linear. |
| 11 | |
| 12 | Everything here runs on your workspace's own keys. g1t hosts no model for |
| 13 | it and bills nothing for it: what a model costs is on your provider's |
| 14 | bill, under your agreement with them. |
| 15 | |
| 16 | What 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 | |
| 23 | Only workspace owners add, test, change and remove providers, and choose |
| 24 | what Ask uses. Members see which providers there are and what Ask answers |
| 25 | with. |
| 26 | |
| 27 | ## Choose where models come from |
| 28 | |
| 29 | **Add a provider** lists them in three groups. A workspace can have any |
| 30 | number of providers, from any mix of groups. |
| 31 | |
| 32 | | Group | Providers | What it needs | |
| 33 | | --- | --- | --- | |
| 34 | | Frontier labs | Anthropic, OpenAI, Google Gemini, xAI, Mistral, DeepSeek | An API key | |
| 35 | | 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. | |
| 36 | | 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 | |
| 37 | |
| 38 | **Self-hosted or your own gateway** is for a model you run yourself |
| 39 | (vLLM, Ollama behind a tunnel) or a gateway in front of other providers |
| 40 | (LiteLLM, your own proxy, Amazon Bedrock or Google Vertex AI behind one). |
| 41 | For an Anthropic-compatible endpoint, give the base URL without `/v1`, |
| 42 | such as `https://llm.acme.dev`. For an OpenAI-compatible endpoint, give |
| 43 | it up to and including the version, such as `https://llm.acme.dev/v1`. The |
| 44 | key is sent as `x-api-key` (Anthropic's header) or |
| 45 | `Authorization: Bearer` (OpenAI's and most others'), whichever you choose. |
| 46 | |
| 47 | You can name the model your team uses on each provider. It is optional, |
| 48 | except for Azure OpenAI, where it is the deployment. |
| 49 | |
| 50 | ### Anthropic Console workspace |
| 51 | |
| 52 | Sessions on issues run on the Anthropic provider's account, and the |
| 53 | Anthropic Console shows each one in the Console workspace its key belongs |
| 54 | to. A session does not say which workspace that is, so if the key is not |
| 55 | in the account's Default workspace, tell g1t: paste any Console address |
| 56 | from that workspace (such as |
| 57 | `https://platform.claude.com/workspaces/wrkspc_01AbC…/sessions`), or its |
| 58 | `wrkspc_` id, into the provider's **Console workspace**. Links to its |
| 59 | sessions then open there. Left empty, they open in the Default workspace. |
| 60 | |
| 61 | ## Look after a provider |
| 62 | |
| 63 | - **Test.** g1t checks a key when it is saved, and again whenever you |
| 64 | choose **Test**, by asking the provider for its models. A key that |
| 65 | works shows how many models it offers. One that fails says why, on the |
| 66 | provider, until it next works. An endpoint that does not list its |
| 67 | models is reached, but its key cannot be checked this way. |
| 68 | - **Change.** **Change its model, address or key** sets a new model or |
| 69 | address, or replaces the key (for Anthropic, its model, Console |
| 70 | workspace or key). The old key is gone once the new one is |
| 71 | saved. |
| 72 | - **Remove.** The **×** on a provider removes it and deletes its key. If |
| 73 | Ask was using it, Ask is turned off until an owner chooses another. |
| 74 | |
| 75 | Keys are sealed when they are saved and never shown again, to anyone. The |
| 76 | page shows only their last four characters, so you can tell keys apart. |
| 77 | A key is used to call the provider and is never sent to your browser. |
| 78 | |
| 79 | ## Choose what Ask answers with |
| 80 | |
| 81 | Under **Ask g1t**, at the top of the page, an owner chooses one of the |
| 82 | workspace's providers and its model, then **Use for Ask**: |
| 83 | |
| 84 | - **Auto**, the default, picks a model of that provider for each |
| 85 | question: a fast one for a short lookup, a standard one for questions |
| 86 | about why, how, what shipped, or a long conversation. See |
| 87 | [Auto](/guides/ask/#auto). |
| 88 | - **A model by name** uses that one for every answer. Choose from the |
| 89 | models the provider offered when it was last tested, or, for one that |
| 90 | lists none, write the name. |
| 91 | |
| 92 | **Turn Ask off** stops Ask and @g1t answering until a provider is chosen |
| 93 | again. |
| 94 | |
| 95 | ## From the API |
| 96 | |
| 97 | Owners manage a workspace's AI through the API and MCP with a person's |
| 98 | token (a workspace token cannot). Members can list the providers and read |
| 99 | what Ask answers with. |
| 100 | |
| 101 | | MCP tool and action | Route | |
| 102 | | --- | --- | |
| 103 | | `ai` `list_providers` | `GET /workspaces/{workspace}/ai/providers` | |
| 104 | | `ai` `add_provider` | `POST /workspaces/{workspace}/ai/providers` | |
| 105 | | `ai` `update_provider` | `PATCH /workspaces/{workspace}/ai/providers/{id}` | |
| 106 | | `ai` `test_provider` | `POST /workspaces/{workspace}/ai/providers/{id}/test` | |
| 107 | | `ai` `remove_provider` | `DELETE /workspaces/{workspace}/ai/providers/{id}` | |
| 108 | | `ai` `get_ask` | `GET /workspaces/{workspace}/ai/ask` | |
| 109 | | `ai` `set_ask` | `PUT /workspaces/{workspace}/ai/ask` | |
| 110 | |
| 111 | ```sh |
| 112 | curl -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>"}' |
| 113 | ``` |
| 114 | |
| 115 | `provider` is one of `anthropic`, `openai`, `gemini`, `xai`, `mistral`, |
| 116 | `deepseek` (frontier labs), `azure_openai`, `openrouter`, `groq`, |
| 117 | `together`, `fireworks`, `cerebras` (model platforms), `anthropic_endpoint` |
| 118 | or `openai_endpoint` (self-hosted or your own gateway). `config` takes |
| 119 | `base_url`, `auth_header` (`x-api-key` or `authorization`) and `model`. |
| 120 | The key is checked as it is saved: the response's `models` lists what it |
| 121 | offers, and `last_error` says why a check failed. `secret` is write-only; |
| 122 | `secret_hint` shows its last four characters. |
| 123 | |
| 124 | To choose what Ask answers with, `PUT /workspaces/{workspace}/ai/ask` with |
| 125 | `provider_id` (a provider's `id`) and `model` (`auto` for |
| 126 | [Auto](/guides/ask/#auto), or a model it offers). Without `provider_id`, |
| 127 | Ask is turned off. |