You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
AIBridge is a smart proxy for AI. It acts as a man-in-the-middle between your users' coding agents / IDEs
9
-
andAIproviders like OpenAI and Anthropic. By intercepting all the AI traffic between these clients and
10
-
the upstream APIs,AIBridge can record user prompts, token usage, and tool invocations.
8
+
Bridge is a smart proxy for AI. It acts as a man-in-the-middle between your users' coding agents / IDEs
9
+
and providers like OpenAI and Anthropic. By intercepting all the AI traffic between these clients and
10
+
the upstream APIs, Bridge can record user prompts, token usage, and tool invocations.
11
11
12
-
AIBridge solves 3 key problems:
12
+
Bridge solves 3 key problems:
13
13
14
14
1.**Centralized authn/z management**: no more issuing & managing API tokens for OpenAI/Anthropic usage.
15
15
Users use their Coder session or API tokens to authenticate with`coderd` (Coder control plane), and
@@ -19,7 +19,7 @@ AI Bridge solves 3 key problems:
19
19
3.**Centralized MCP administration**: define a set of approved MCP servers and tools which your users may
20
20
use, and prevent users from using their own.
21
21
22
-
###When to use AI Bridge
22
+
##When to use AI Bridge
23
23
24
24
As the library of LLMs and their associated tools grow, administrators are pressured to provide auditing, measure adoption, provide tools through MCP, and track token spend. Disparate SAAS platforms provide_some_ of these for_some_ tools, but there is no centralized, secure solution for these challenges.
25
25
@@ -34,7 +34,7 @@ We advise trying Bridge as self-hosted proxy to monitor LLM usage agnostically a
34
34
35
35
##Setup
36
36
37
-
AIBridge runs inside the Coder control plane, requiring no separate compute to deploy or scale. Once enabled,`coderd` hosts the bridge in-memory and brokers traffic to your configured AI providers on behalf of authenticated users.
37
+
Bridge runs inside the Coder control plane, requiring no separate compute to deploy or scale. Once enabled,`coderd` hosts the bridge in-memory and brokers traffic to your configured AI providers on behalf of authenticated users.
38
38
39
39
**Required**:
40
40
@@ -45,7 +45,7 @@ AI Bridge runs inside the Coder control plane, requiring no separate compute to
45
45
###Activation
46
46
47
47
To enable this feature, activate the`aibridge` experiment using an environment variable or a CLI flag.
48
-
Additionally, you will need to enableAIBridge explicitly:
48
+
Additionally, you will need to enable Bridge explicitly:
49
49
50
50
```sh
51
51
CODER_EXPERIMENTS="aibridge" CODER_AIBRIDGE_ENABLED=true coder server
@@ -57,23 +57,23 @@ _If you have other experiments enabled, separate them by commas._
57
57
58
58
###Providers
59
59
60
-
AIBridge currently supports OpenAI and Anthropic APIs.
60
+
Bridge currently supports OpenAI and Anthropic APIs.
61
61
62
62
**API Key**:
63
63
64
-
The single key used to authenticate all requests fromAIBridge to OpenAI/Anthropic APIs.
64
+
The single key used to authenticate all requests from Bridge to OpenAI/Anthropic APIs.
AI bridge is compatible with_[Google Vertex AI](https://cloud.google.com/vertex-ai?hl=en)_,_[AWS Bedrock](https://aws.amazon.com/bedrock/)_, and other LLM brokers. You may specify the base URL(s) above to the appropriate API endpoint for your provider.
76
+
Bridge is compatible with_[Google Vertex AI](https://cloud.google.com/vertex-ai?hl=en)_,_[AWS Bedrock](https://aws.amazon.com/bedrock/)_, and other LLM brokers. You may specify the base URL(s) above to the appropriate API endpoint for your provider.
77
77
78
78
---
79
79
@@ -82,7 +82,7 @@ AI bridge is compatible with _[Google Vertex AI](https://cloud.google.com/vertex
82
82
83
83
##Collected Data
84
84
85
-
AIBridge collects:
85
+
Bridge collects:
86
86
87
87
- The last`user` prompt of each request
88
88
- All token usage (associated with each prompt)
@@ -106,7 +106,7 @@ We provide an example Grafana dashboard that you can import as a starting point
106
106
`coderd` runs an in-memory instance of`aibridged`, whose logic is mostly contained inhttps://github.com/coder/aibridge. In future releases we will support running external instances for higher throughput and complete memory isolation from`coderd`.
107
107
108
108
<details>
109
-
<summary>See a diagram of howAIBridge interception works</summary>
109
+
<summary>See a diagram of how Bridge interception works</summary>
110
110
111
111
```mermaid
112
112
@@ -167,22 +167,22 @@ sequenceDiagram
167
167
168
168
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) is a mechanism for connecting AI applications to external systems.
169
169
170
-
AIBridge can connect to MCP servers and inject tools automatically, enabling you to centrally manage the list of tools you wish to grant your users.
170
+
Bridge can connect to MCP servers and inject tools automatically, enabling you to centrally manage the list of tools you wish to grant your users.
171
171
172
172
>[!NOTE]
173
173
>Only MCP servers which support OAuth2 Authorization are supported currently. In future releases we will support[optional authorization](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#protocol-requirements).
174
174
>
175
175
>[_Streamable HTTP_](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) is the only supported transport currently. In future releases we will support the (now deprecated)[_Server-Sent Events_](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#backwards-compatibility) transport.
176
176
177
-
AIBridge makes use of[External Auth](../admin/external-auth/index.md) applications, as they define OAuth2 connections to upstream services. If your External Auth application hosts a remote MCP server, you can configure AI Bridge to connect to it, retrieve its tools and inject them into requests automatically - all while using each individual user's access token.
177
+
Bridge makes use of[External Auth](../admin/external-auth/index.md) applications, as they define OAuth2 connections to upstream services. If your External Auth application hosts a remote MCP server, you can configure Bridge to connect to it, retrieve its tools and inject them into requests automatically - all while using each individual user's access token.
178
178
179
179
For example, GitHub has a[remote MCP server](https://github.com/github/github-mcp-server?tab=readme-ov-file#remote-github-mcp-server) and we can use it as follows.
180
180
181
181
```bash
182
182
CODER_EXTERNAL_AUTH_0_TYPE=github
183
183
CODER_EXTERNAL_AUTH_0_CLIENT_ID=...
184
184
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=...
185
-
# TellAIBridge where it can find this service's remote MCP server.
185
+
# Tell Bridge where it can find this service's remote MCP server.
@@ -210,13 +210,13 @@ In the above example, if you prompted your AI model with "list your available gi
210
210
>1.`bmcp_github_update_gist`
211
211
>2.`bmcp_github_list_gists`
212
212
213
-
AIBridge marks automatically injected tools with a prefix`bmcp_` ("bridged MCP"). It also namespaces all tool names by the ID of their associated External Auth application (in this case`github`).
213
+
Bridge marks automatically injected tools with a prefix`bmcp_` ("bridged MCP"). It also namespaces all tool names by the ID of their associated External Auth application (in this case`github`).
214
214
215
215
##Tool Injection
216
216
217
-
If a model decides to invoke a tool and it has a`bmcp_` suffix andAIBridge has a connection with the related MCP server, it will invoke the tool. The tool result will be passed back to the upstream AI provider, and this will loop until the model has all of its required data. These inner loops are not relayed back to the client; all it seems is the result of this loop. See[Implementation Details](#implementation-details).
217
+
If a model decides to invoke a tool and it has a`bmcp_` suffix and Bridge has a connection with the related MCP server, it will invoke the tool. The tool result will be passed back to the upstream AI provider, and this will loop until the model has all of its required data. These inner loops are not relayed back to the client; all it seems is the result of this loop. See[Implementation Details](#implementation-details).
218
218
219
-
In contrast, tools which are defined by the client (i.e. the[`Bash` tool](https://docs.claude.com/en/docs/claude-code/settings#tools-available-to-claude) defined by_Claude Code_) cannot be invoked byAIBridge, and the tool call from the model will be relayed to the client, after which it will invoke the tool.
219
+
In contrast, tools which are defined by the client (i.e. the[`Bash` tool](https://docs.claude.com/en/docs/claude-code/settings#tools-available-to-claude) defined by_Claude Code_) cannot be invoked by Bridge, and the tool call from the model will be relayed to the client, after which it will invoke the tool.
220
220
221
221
If you have the`oauth2` and`mcp-server-http` experiments enabled, Coder's own[internal MCP tools](mcp-server.md) will be injected automatically.
222
222
@@ -230,14 +230,14 @@ If you have the `oauth2` and `mcp-server-http` experiments enabled, Coder's own
230
230
231
231
##Known Issues / Limitations
232
232
233
-
- Codex CLI currently does not work withAIBridge due to a JSON marshaling issue:https://github.com/coder/aibridge/issues/19
233
+
- Codex CLI currently does not work with Bridge due to a JSON marshaling issue:https://github.com/coder/aibridge/issues/19
234
234
- Claude Code web searches do not report correctly:https://github.com/coder/aibridge/issues/11
235
235
236
236
##Supported APIs
237
237
238
238
API support is broken down into two categories:
239
239
240
-
-**Intercepted**: requests are intercepted, audited, and augmented - fullAIBridge functionality
240
+
-**Intercepted**: requests are intercepted, audited, and augmented - full Bridge functionality
241
241
-**Passthrough**: requests are proxied directly to the upstream, no auditing or augmentation takes place
242
242
243
243
Where relevant, both streaming and non-streaming requests are supported.