zuplo 7.8.7 → 7.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/docs/ai-gateway/custom-policies.mdx +2 -1
  2. package/docs/ai-gateway/integrations/claude-code.mdx +82 -180
  3. package/docs/ai-gateway/integrations/claude-desktop.mdx +61 -99
  4. package/docs/ai-gateway/integrations/codex.mdx +63 -57
  5. package/docs/ai-gateway/usage-limits.mdx +2 -2
  6. package/docs/api-management/overview.md +2 -2
  7. package/docs/articles/add-api-to-backstage.mdx +4 -3
  8. package/docs/articles/api-key-consumer-bucket-portal-ui.mdx +1 -1
  9. package/docs/articles/api-key-management.mdx +1 -1
  10. package/docs/articles/custom-domains.mdx +3 -2
  11. package/docs/articles/migrate-from-apigee.md +3 -3
  12. package/docs/articles/migrate-from-aws-api-gateway.md +3 -3
  13. package/docs/articles/migrate-from-azure-apim.md +3 -3
  14. package/docs/articles/migrate-from-kong.md +3 -3
  15. package/docs/articles/source-control-setup-github.mdx +2 -2
  16. package/docs/articles/source-control.mdx +4 -3
  17. package/docs/articles/testing.mdx +5 -5
  18. package/docs/articles/upstream-iam-auth.mdx +2 -2
  19. package/docs/cli/create-zuplo-api.mdx +4 -4
  20. package/docs/cli/openapi-merge.mdx +1 -1
  21. package/docs/cli/openapi-merge.partial.mdx +1 -1
  22. package/docs/concepts/ai-gateway.mdx +1 -1
  23. package/docs/concepts/how-zuplo-works.mdx +2 -1
  24. package/docs/concepts/mcp.mdx +4 -4
  25. package/docs/dedicated/architecture.mdx +1 -1
  26. package/docs/dev-portal/migration.mdx +2 -2
  27. package/docs/errors/not-found.mdx +1 -1
  28. package/docs/getting-started/ai-gateway/portal.mdx +181 -0
  29. package/docs/getting-started/dev-portal/agent.mdx +148 -0
  30. package/docs/getting-started/dev-portal/index.mdx +26 -0
  31. package/docs/getting-started/dev-portal/local.mdx +213 -0
  32. package/docs/getting-started/dev-portal/portal.mdx +146 -0
  33. package/docs/{articles/step-3-add-api-key-auth.mdx → getting-started/gateway/add-api-key-auth/index.mdx} +32 -23
  34. package/docs/{articles/step-3-add-api-key-auth-local.mdx → getting-started/gateway/add-api-key-auth/local.mdx} +28 -20
  35. package/docs/{articles/step-2-add-rate-limiting.mdx → getting-started/gateway/add-rate-limiting/index.mdx} +22 -13
  36. package/docs/{articles/step-2-add-rate-limiting-local.mdx → getting-started/gateway/add-rate-limiting/local.mdx} +24 -14
  37. package/docs/getting-started/gateway/agent.mdx +199 -0
  38. package/docs/{articles/step-4-deploying-to-the-edge.mdx → getting-started/gateway/deploy-to-the-edge/index.mdx} +39 -27
  39. package/docs/{articles/step-4-deploying-to-the-edge-local.mdx → getting-started/gateway/deploy-to-the-edge/local.mdx} +48 -17
  40. package/docs/{articles/step-5-dynamic-rate-limiting.mdx → getting-started/gateway/dynamic-rate-limiting/index.mdx} +24 -12
  41. package/docs/{articles/step-5-dynamic-rate-limiting-local.mdx → getting-started/gateway/dynamic-rate-limiting/local.mdx} +24 -12
  42. package/docs/getting-started/gateway/index.mdx +24 -0
  43. package/docs/{articles/step-1-setup-basic-gateway.mdx → getting-started/gateway/setup-a-basic-gateway/index.mdx} +33 -21
  44. package/docs/{articles/step-1-setup-basic-gateway-local.mdx → getting-started/gateway/setup-a-basic-gateway/local.mdx} +24 -15
  45. package/docs/getting-started/index.mdx +25 -0
  46. package/docs/getting-started/mcp-gateway/agent.mdx +161 -0
  47. package/docs/getting-started/mcp-gateway/index.mdx +25 -0
  48. package/docs/{mcp-gateway/quickstart-local.mdx → getting-started/mcp-gateway/local.mdx} +64 -38
  49. package/docs/{mcp-gateway/quickstart.mdx → getting-started/mcp-gateway/portal.mdx} +71 -54
  50. package/docs/getting-started/mcp-server/agent.mdx +152 -0
  51. package/docs/getting-started/mcp-server/index.mdx +25 -0
  52. package/docs/{articles/mcp-quickstart-local.mdx → getting-started/mcp-server/local.mdx} +24 -13
  53. package/docs/{articles/mcp-quickstart.mdx → getting-started/mcp-server/portal.mdx} +35 -15
  54. package/docs/getting-started/migrate/agent.mdx +129 -0
  55. package/docs/getting-started/migrate/index.mdx +25 -0
  56. package/docs/getting-started/migrate/local.mdx +141 -0
  57. package/docs/getting-started/migrate/portal.mdx +129 -0
  58. package/docs/home.mdx +6 -0
  59. package/docs/mcp-gateway/connect-clients/chatgpt.mdx +2 -1
  60. package/docs/mcp-gateway/connect-clients/claude-code.mdx +2 -1
  61. package/docs/mcp-gateway/connect-clients/claude-desktop.mdx +23 -20
  62. package/docs/mcp-gateway/connect-clients/cursor.mdx +2 -1
  63. package/docs/mcp-gateway/connect-clients/overview.mdx +2 -1
  64. package/docs/mcp-gateway/connect-clients/vs-code.mdx +2 -1
  65. package/docs/mcp-gateway/how-it-works.mdx +2 -2
  66. package/docs/mcp-gateway/how-to/connect-upstream-api-key.mdx +4 -3
  67. package/docs/mcp-gateway/how-to/curate-tools.mdx +3 -2
  68. package/docs/mcp-gateway/overview.mdx +3 -3
  69. package/docs/policies/ai-gateway-smart-router-inbound/doc.md +14 -0
  70. package/docs/policies/akamai-ai-firewall-v2-inbound/doc.md +7 -0
  71. package/package.json +5 -5
  72. package/docs/ai-gateway/getting-started.mdx +0 -307
  73. package/docs/dev-portal/local-development.mdx +0 -72
@@ -22,7 +22,8 @@ terms. By the end, one app on your gateway rejects a prompt containing
22
22
  ## Prerequisites
23
23
 
24
24
  - An AI Gateway project connected to a Git repository, with a provider, a team,
25
- and an app—the [Getting Started](./getting-started.mdx) guide covers this
25
+ and an app—the [Getting Started](../getting-started/ai-gateway/portal.mdx)
26
+ guide covers this
26
27
  - A local clone of the gateway's repository
27
28
 
28
29
  <Stepper>
@@ -2,92 +2,70 @@
2
2
  title: Claude Code
3
3
  sidebar_label: Claude Code
4
4
  description:
5
- Point Claude Code at an AI Gateway app so every Claude Code request is
6
- authenticated, metered, and routed by the gateway.
5
+ Route Claude Code requests through a Zuplo AI Gateway app, with a provider key
6
+ or your Claude subscription.
7
7
  ---
8
8
 
9
- You can configure [Claude Code](https://www.claude.com/product/claude-code) to
10
- send its model requests through the Zuplo AI Gateway, so the gateway
11
- authenticates, meters, and routes every Claude Code session.
9
+ Route [Claude Code](https://www.claude.com/product/claude-code) through the
10
+ Zuplo AI Gateway. The gateway authenticates, meters, and routes every session.
12
11
 
13
- The gateway can authenticate to Anthropic in two ways. Pick one before you
14
- configure Claude Code:
12
+ The gateway authenticates to Anthropic in one of two ways:
15
13
 
16
- | Approach | The gateway sends Anthropic | Claude Code sends the gateway |
17
- | --------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------- |
18
- | [Configured provider key](#use-a-configured-provider-key) | The Anthropic API key saved on your provider | The app's API key as `ANTHROPIC_AUTH_TOKEN` |
19
- | [Your Claude subscription](#use-your-claude-subscription) | The credential from your `claude.ai` login, such as a Claude Max plan | The app's API key in a `zp-gateway-api-key` header, plus your login as-is |
14
+ | Approach | The gateway sends Anthropic | Claude Code sends the gateway |
15
+ | ---------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------- |
16
+ | [Provider key](#use-a-provider-key) | The Anthropic API key saved on your provider | The app's API key as `ANTHROPIC_AUTH_TOKEN` |
17
+ | [Claude subscription](#use-your-claude-subscription) | Your `claude.ai` login, such as a Claude Max plan | The app's API key in a `zp-gateway-api-key` header, plus your login |
20
18
 
21
- Both approaches share the same provider, team, and app setup, and the same model
22
- configuration.
23
-
24
- ## Claude Code Setup
19
+ ## Prerequisites
25
20
 
26
21
  <Stepper>
27
22
 
28
- 1. Create a [new provider](../managing-providers.mdx) in the AI Gateway for
29
- Anthropic
30
-
31
- 2. [Set up a new team](../managing-teams.mdx)
32
-
33
- 3. If you plan to use your Claude subscription, configure the team's
34
- [API Key Authentication policy](#configure-the-api-key-authentication-policy)
35
- for passthrough before you create the app
23
+ 1. Create an Anthropic [provider](../managing-providers.mdx) in the AI Gateway.
36
24
 
37
- 4. Create a [new app](../managing-apps.mdx) to use with Claude Code and assign
38
- it to the team you created
25
+ 2. [Create a team](../managing-teams.mdx). For the subscription approach,
26
+ [configure its API Key Authentication policy](#configure-the-api-key-authentication-policy)
27
+ now.
39
28
 
40
- 5. Copy the **API URL** and **API Key** shown at the top of the app page
29
+ 3. [Create an app](../managing-apps.mdx) for Claude Code and assign it to the
30
+ team.
41
31
 
42
- 6. Add the gateway URL, the app's API key, and model mappings to
43
- `.claude/settings.json`, following the section below for the approach you
44
- chose
32
+ 4. Copy the **API URL** and **API Key** from the app page.
45
33
 
46
34
  </Stepper>
47
35
 
48
- ### Before copying: replace the provider name
36
+ ## Configure Claude Code
49
37
 
50
- :::warning
38
+ :::warning{title="Replace the provider name"}
51
39
 
52
- The examples below assume your provider is named `anthropic`. Replace that
53
- prefix with the name of **your** provider before copying the configuration. For
54
- example, a provider named `my-anthropic` routes `my-anthropic/claude-sonnet-5`,
55
- while a Bedrock provider named `bedrock` routes
56
- `bedrock/anthropic.claude-sonnet-5`. The model part must be an id that provider
57
- understands.
40
+ The examples assume your provider is named `anthropic`. Replace that prefix with
41
+ the name of **your** provider before copying anything. A provider named
42
+ `my-anthropic` routes `my-anthropic/claude-sonnet-5`; a Bedrock provider named
43
+ `bedrock` routes `bedrock/anthropic.claude-sonnet-5`. The model part must be an
44
+ ID that provider serves. Check [your provider's page](../managing-providers.mdx)
45
+ in the Portal.
58
46
 
59
47
  :::
60
48
 
61
- The gateway routes every request using `providerName/model`. The provider prefix
62
- picks which of your providers handles the request — a gateway can contain
63
- several providers that serve Anthropic models.
64
-
65
- ### Where Claude Code reads its settings
66
-
67
- You can configure Claude Code either globally or per project by editing the
68
- settings file:
49
+ Claude Code reads `~/.claude/settings.json`, or `.claude/settings.json` in a
50
+ project. Add the block for your approach, then restart Claude Code.
69
51
 
70
- - **Global:** `~/.claude/settings.json`
71
- - **Project-specific:** `.claude/settings.json` in your project directory
72
-
73
- Each approach below shows the `env` and `modelOverrides` blocks to add to that
74
- file. Restart Claude Code after saving it, and all your Claude Code LLM requests
75
- route through the AI Gateway.
76
-
77
- :::note
78
-
79
- Claude Code appends `/v1/messages` to the base URL itself, so
80
- `ANTHROPIC_BASE_URL` is the app's URL _without_ the `/v1` suffix.
81
-
82
- :::
52
+ ### Rules
83
53
 
84
- ## Use a configured provider key
54
+ - `ANTHROPIC_BASE_URL` is the app's API URL _without_ `/v1`. Claude Code appends
55
+ `/v1/messages`.
56
+ - Set every `ANTHROPIC_*_MODEL` variable and every `modelOverrides` entry.
57
+ Claude Code's built-in model names have no prefix. The variables map the
58
+ `opus`, `sonnet`, `haiku`, and `fable` aliases;
59
+ [`modelOverrides`](https://code.claude.com/docs/en/model-config#override-model-ids-per-version)
60
+ maps exact IDs; the `/model` picker can select either.
61
+ - The app's
62
+ [Model Filtering](../../policies/ai-gateway-model-filtering-v2-inbound.mdx)
63
+ policy controls which models the app can use.
85
64
 
86
- With this approach the gateway calls Anthropic with the API key you saved on the
87
- [provider](../managing-providers.mdx). Claude Code presents only the app's API
88
- key, and Anthropic bills the account that owns the provider key.
65
+ ## Use a provider key
89
66
 
90
- Add the following configuration to the settings file:
67
+ The gateway calls Anthropic with the key saved on your provider. Anthropic bills
68
+ that key's account. Your Claude subscription is not used.
91
69
 
92
70
  ```json
93
71
  {
@@ -111,58 +89,37 @@ Add the following configuration to the settings file:
111
89
  }
112
90
  ```
113
91
 
114
- `ANTHROPIC_AUTH_TOKEN` replaces whatever login Claude Code would otherwise use,
115
- so this approach doesn't consume your Claude subscription.
92
+ `ANTHROPIC_AUTH_TOKEN` replaces your `claude.ai` login.
116
93
 
117
94
  ## Use your Claude subscription
118
95
 
119
- With this approach Claude Code stays signed in to `claude.ai` — for example with
120
- a Claude Max plan — and the gateway forwards that login credential to Anthropic
121
- as the request's provider credential. The app's API key travels in a separate
122
- `zp-gateway-api-key` header, so the gateway still authenticates the app, applies
123
- its policy chain, and meters its usage.
124
-
125
- Two pieces of configuration make this work: the app's **API Key Authentication**
126
- policy accepts the app key from the `zp-gateway-api-key` header and passes the
127
- `Authorization` header through, and Claude Code sends both headers.
96
+ Claude Code stays signed in to `claude.ai`. The gateway forwards that login to
97
+ Anthropic and reads the app's API key from a separate `zp-gateway-api-key`
98
+ header, so it still authenticates the app, runs its policies, and meters usage.
128
99
 
129
100
  ### Configure the API Key Authentication policy
130
101
 
131
- The [API Key Authentication](../../policies/ai-gateway-auth-v2-inbound.mdx)
132
- policy needs three options for passthrough:
133
-
134
- | Option | Value | Effect |
135
- | ----------------------- | -------------------- | -------------------------------------------------------- |
136
- | `credentialPassthrough` | On | Forward the caller's `Authorization` header to Anthropic |
137
- | `authHeader` | `zp-gateway-api-key` | Read the app's API key from this header instead |
138
- | `authScheme` | Empty value | The header holds the bare key, with no `Bearer` prefix |
139
-
140
- You can set these options on the team's
141
- [policy template](../policy-templates.mdx), so every app created in the team
142
- starts with passthrough enabled, or on a single app's **Policies** tab. The
143
- steps below use the team template; the app's policy editor works the same way.
102
+ On the team's [policy template](../policy-templates.mdx), or on one app's
103
+ **Policies** tab, edit **API Key Authentication**:
144
104
 
145
105
  <Stepper>
146
106
 
147
- 1. Open the team in the Zuplo Portal and select its **Policy Template** tab.
148
-
149
- 2. Click the edit (pencil) icon on the **API Key Authentication** entry.
150
-
151
- 3. Turn on **credentialPassthrough**.
107
+ 1. Turn on **credentialPassthrough**.
152
108
 
153
- 4. Set **authHeader** to `zp-gateway-api-key`.
109
+ 2. Set **authHeader** to `zp-gateway-api-key`.
154
110
 
155
- 5. Leave **authScheme** blank and click **Use an empty value for authScheme**.
156
- The field then reports "Empty value set. The default (Bearer) is not
157
- applied." Clearing the field alone isn't enough: a blank field omits the
158
- option, so the `Bearer` default still applies and every request fails with
159
- `401 Invalid Authorization Scheme`.
111
+ 3. Leave **authScheme** blank and click **Use an empty value for authScheme**.
112
+ The field reports "Empty value set. The default (Bearer) is not applied."
160
113
 
161
- 6. Click **Apply**, then **Save changes**.
114
+ 4. Click **Apply**, then **Save changes**.
162
115
 
163
116
  </Stepper>
164
117
 
165
- The **JSON** editor mode shows the equivalent options:
118
+ A blank **authScheme** field is not an empty value. It omits the option, the
119
+ `Bearer` default still applies, and every request fails with
120
+ `401 Invalid Authorization Scheme`.
121
+
122
+ In the **JSON** editor:
166
123
 
167
124
  ```json
168
125
  {
@@ -172,29 +129,20 @@ The **JSON** editor mode shows the equivalent options:
172
129
  }
173
130
  ```
174
131
 
175
- ### The provider still needs an API key
176
-
177
- The Portal requires an API key to save an Anthropic provider, and passthrough
178
- requests never send it: the request to Anthropic carries the caller's credential
179
- instead. Anything else that uses this provider's configured credential still
180
- needs a real key. That includes apps on this gateway that don't use passthrough
181
- and any
182
- [Fallback Model](../../policies/ai-gateway-fallback-model-v2-inbound.mdx)
183
- target, because fallback requests use the provider's configured credential
184
- rather than the caller's. If nothing on the gateway uses the configured
185
- credential, a placeholder value works.
132
+ ### Rules
186
133
 
187
- The app's playground in the Portal sends the app key as a bearer token in
188
- `Authorization`, so it can't call an app that uses passthrough. Test the app
189
- from Claude Code instead, as described below.
134
+ - The provider still needs an API key to save. Passthrough requests never use
135
+ it. Apps without passthrough and every
136
+ [Fallback Model](../../policies/ai-gateway-fallback-model-v2-inbound.mdx)
137
+ target do. If nothing uses it, a placeholder value works.
138
+ - The Portal playground sends the app key as `Authorization: Bearer`, so it
139
+ can't call a passthrough app. Test from Claude Code.
140
+ - Do not set `ANTHROPIC_AUTH_TOKEN` or `ANTHROPIC_API_KEY`, in the settings file
141
+ or in your shell. Either one replaces your login, and the gateway forwards it
142
+ to Anthropic instead.
190
143
 
191
144
  ### Configure Claude Code
192
145
 
193
- Add the following configuration to the settings file. Don't set
194
- `ANTHROPIC_AUTH_TOKEN` or `ANTHROPIC_API_KEY` here or in your shell: either one
195
- replaces your `claude.ai` login, and the gateway would then forward that value
196
- to Anthropic as the credential.
197
-
198
146
  ```json
199
147
  {
200
148
  "env": {
@@ -217,73 +165,27 @@ to Anthropic as the credential.
217
165
  }
218
166
  ```
219
167
 
220
- `ANTHROPIC_CUSTOM_HEADERS` adds the `zp-gateway-api-key` header to every request
221
- Claude Code makes, while Claude Code keeps sending its own `Authorization`
222
- header from your login. The gateway consumes those incoming headers, uses the
223
- login credential to authenticate the Anthropic request, and never sends your app
224
- key to Anthropic.
168
+ `ANTHROPIC_CUSTOM_HEADERS` adds the `zp-gateway-api-key` header. Claude Code
169
+ keeps sending its own `Authorization` header from your login. The gateway never
170
+ sends your app key to Anthropic.
225
171
 
226
- ### Verify the subscription setup
227
-
228
- Restart Claude Code, then confirm which credential it's using and send one
229
- request through the gateway:
172
+ ## Verify
230
173
 
231
174
  ```bash
232
175
  claude auth status --text
233
176
  claude -p "Reply with the single word OK"
234
177
  ```
235
178
 
236
- The first command should report that you're signed in with your `claude.ai`
237
- account rather than an API key or auth token. The second returns a short reply,
238
- and the request appears in the app's usage in the Zuplo Portal. In an
239
- interactive session, `/status` shows the same login information.
240
-
241
- If the request fails:
242
-
243
- - `401` with `Invalid Authorization Scheme` — `authScheme` still has its
244
- `Bearer` default. Set it to an explicit empty value in the policy.
245
- - `401` with `Header configured by options.authHeader is missing` — Claude Code
246
- didn't send `zp-gateway-api-key`. Check `ANTHROPIC_CUSTOM_HEADERS`.
247
- - `401` with `credentialPassthrough requires a non-empty Authorization header` —
248
- Claude Code isn't signed in. Run `claude` and use `/login`.
249
- - An authentication error from Anthropic — Anthropic rejected the forwarded
250
- login credential. Sign in to Claude Code again.
251
-
252
- ## Configure every Claude Code model variable
253
-
254
- The model ids in these examples reflect what was current when this page was
255
- written, and ids differ across providers — a Bedrock provider serves different
256
- ids than Anthropic directly, and availability can vary by region. Check
257
- [your provider's page](../managing-providers.mdx) in the portal for the models
258
- it currently serves, and use those ids.
259
-
260
- None of Claude Code's built-in model names carry a provider prefix, so each of
261
- the model variables above must be set to a prefixed reference:
262
-
263
- - `ANTHROPIC_MODEL` — the startup model. Set it to a prefixed reference so the
264
- gateway can route the first request.
265
- - `ANTHROPIC_SMALL_FAST_MODEL` — the model for background tasks.
266
- - `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`,
267
- `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_FABLE_MODEL` — what the
268
- `opus`/`sonnet`/`haiku`/`fable` aliases resolve to, so `claude --model opus`
269
- and `/model sonnet` keep working. In these examples,
270
- `ANTHROPIC_DEFAULT_FABLE_MODEL` maps `fable` to `anthropic/claude-fable-5-1`.
271
-
272
- Claude Code's `/model` picker can select either an alias or an exact model ID.
273
- `ANTHROPIC_DEFAULT_*_MODEL` maps aliases to gateway model names;
274
- [`modelOverrides`](https://code.claude.com/docs/en/model-config#override-model-ids-per-version)
275
- maps exact IDs. The examples configure both so either selection works through
276
- the gateway.
277
-
278
- :::caution{title='HTTP 400: model must use "providerName/model"'}
279
-
280
- This error means the selected model lacks its provider prefix. At startup, check
281
- `ANTHROPIC_MODEL`. After choosing a picker entry, check its `modelOverrides`
282
- entry, or type `/model fable` to use the configured alias. Restart Claude Code
283
- after editing the settings file.
179
+ With the subscription approach, the first command reports a `claude.ai` login,
180
+ not an API key or auth token. The request appears in the app's usage in the
181
+ Zuplo Portal.
284
182
 
285
- :::
183
+ ## Troubleshooting
286
184
 
287
- The app's
288
- [Model Filtering](../../policies/ai-gateway-model-filtering-v2-inbound.mdx)
289
- policy controls which models the app may use.
185
+ | Error | Fix |
186
+ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
187
+ | `400` `model must use "providerName/model"` | The selected model has no provider prefix. Check `ANTHROPIC_MODEL`, or the picker entry's `modelOverrides` mapping. Restart after editing. |
188
+ | `401` `Invalid Authorization Scheme` | `authScheme` still has its `Bearer` default. Set an explicit empty value. |
189
+ | `401` `Header configured by options.authHeader is missing` | Claude Code didn't send `zp-gateway-api-key`. Check `ANTHROPIC_CUSTOM_HEADERS`. |
190
+ | `401` `credentialPassthrough requires a non-empty Authorization header` | Claude Code isn't signed in. Run `claude` and use `/login`. |
191
+ | An authentication error from Anthropic | Anthropic rejected the forwarded login. Sign in to Claude Code again. |
@@ -2,156 +2,118 @@
2
2
  title: Claude Desktop
3
3
  sidebar_label: Claude Desktop
4
4
  description:
5
- Point Claude Desktop at an AI Gateway app so every Chat, Cowork, and Code
6
- session is authenticated, metered, and routed by the gateway.
5
+ Route Claude Desktop's Chat, Cowork, and Code sessions through a Zuplo AI
6
+ Gateway app.
7
7
  ---
8
8
 
9
- [Claude Desktop](https://claude.com/download) can use the Zuplo AI Gateway as
10
- its inference provider, so the gateway authenticates, meters, and routes every
11
- Chat, Cowork, and Code session started from the desktop app.
9
+ Route [Claude Desktop](https://claude.com/download) through the Zuplo AI
10
+ Gateway. The gateway authenticates, meters, and routes every Chat, Cowork, and
11
+ Code session started from the app.
12
12
 
13
- This page covers routing Claude Desktop's model requests through the AI Gateway.
14
13
  To give Claude Desktop tools from a Zuplo MCP route instead, see
15
14
  [Connect Claude Desktop and Claude.ai](../../mcp-gateway/connect-clients/claude-desktop.mdx).
16
15
 
17
- ## Claude Desktop Setup
16
+ ## Prerequisites
18
17
 
19
18
  <Stepper>
20
19
 
21
- 1. Create a [new provider](../managing-providers.mdx) in the AI Gateway for
22
- Anthropic
20
+ 1. Create an Anthropic [provider](../managing-providers.mdx) in the AI Gateway.
23
21
 
24
- 2. [Set up a new team](../managing-teams.mdx)
22
+ 2. [Create a team](../managing-teams.mdx).
25
23
 
26
- 3. Create a [new app](../managing-apps.mdx) to use with Claude Desktop and
27
- assign it to the team you created
24
+ 3. [Create an app](../managing-apps.mdx) for Claude Desktop and assign it to the
25
+ team.
28
26
 
29
- 4. Copy the **API URL** and **API Key** shown at the top of the app page
30
-
31
- 5. Enter the API URL, API key, and model list in Claude Desktop's third-party
32
- inference settings
27
+ 4. Copy the **API URL** and **API Key** from the app page.
33
28
 
34
29
  </Stepper>
35
30
 
36
- ### Before copying: replace the provider name
37
-
38
- :::warning
39
-
40
- The examples below assume your provider is named `anthropic`. Replace that
41
- prefix with the name of **your** provider before copying the configuration. For
42
- example, a provider named `my-anthropic` routes `my-anthropic/claude-sonnet-5`,
43
- while a Bedrock provider named `bedrock` routes
44
- `bedrock/anthropic.claude-sonnet-5`. The model part must be an id that provider
45
- understands.
46
-
47
- :::
48
-
49
- The gateway routes every request using `providerName/model`. The provider prefix
50
- picks which of your providers handles the request — a gateway can contain
51
- several providers that serve Anthropic models.
52
-
53
- ### Configure third-party inference
54
-
55
- Configure Claude Desktop's inference provider in its in-app configuration
56
- window, available on macOS and Windows:
31
+ ## Configure Claude Desktop
57
32
 
58
33
  <Stepper>
59
34
 
60
- 1. From the menu bar (macOS) or the application menu (Windows), select **Help →
61
- Troubleshooting → Enable Developer Mode**.
35
+ 1. Select **Help → Troubleshooting → Enable Developer Mode** from the menu bar
36
+ (macOS) or the application menu (Windows).
62
37
 
63
38
  2. Open **Developer → Configure Third-Party Inference**.
64
39
 
65
- 3. In the **Connection** section, set **Inference provider** to **Gateway**.
40
+ 3. Under **Connection**, set **Inference provider** to **Gateway**.
66
41
 
67
- 4. In the **Gateway credentials** card, set **Gateway base URL** to the app's
68
- API URL, for example
42
+ 4. Under **Gateway credentials**, set **Gateway base URL** to the app's API URL,
43
+ for example
69
44
  `https://my-gateway-main-2e18f50.zuplo.app/config_fe0a04972d2848e0a94ae4b8bcd1497e`,
70
45
  and **Gateway API key** to the app's API key.
71
46
 
72
47
  5. Leave **Credential kind** set to **Static API key** and **Gateway auth
73
48
  scheme** set to **Bearer**.
74
49
 
75
- 6. In the **Models** section, add the models the app may use to the **Model
76
- list**. See [Add models to the Model list](#add-models-to-the-model-list).
50
+ 6. Under **Models**, add each model the app may use. See
51
+ [Add models](#add-models).
77
52
 
78
- 7. Click **Apply locally**. Claude Desktop writes the configuration and
79
- relaunches into it.
53
+ 7. Click **Apply locally**. Claude Desktop saves the configuration and
54
+ relaunches.
80
55
 
81
56
  </Stepper>
82
57
 
83
- :::note
58
+ ### Rules
84
59
 
85
- Claude Desktop appends `/v1/messages` to the base URL itself, so **Gateway base
86
- URL** is the app's URL _without_ the `/v1` suffix.
60
+ - **Gateway base URL** is the app's API URL _without_ `/v1`. Claude Desktop
61
+ appends `/v1/messages`.
62
+ - **Gateway auth scheme** stays **Bearer**. The gateway reads the API key from
63
+ the `Authorization: Bearer` header.
64
+ - **Credential kind** stays **Static API key**. AI Gateway apps authenticate
65
+ with API keys, not identity-provider tokens.
87
66
 
88
- :::
67
+ ## Add models
89
68
 
90
- :::caution{title="Keep the auth scheme set to Bearer"}
69
+ :::warning{title="Replace the provider name"}
91
70
 
92
- The gateway reads the API key from the `Authorization: Bearer` header, so keep
93
- **Gateway auth scheme** set to **Bearer**. Likewise, keep **Credential kind**
94
- set to **Static API key** — AI Gateway apps authenticate with their own API
95
- keys, not identity-provider tokens.
71
+ The examples assume your provider is named `anthropic`. Replace that prefix with
72
+ the name of **your** provider before entering any model. A provider named
73
+ `my-anthropic` routes `my-anthropic/claude-sonnet-5`; a Bedrock provider named
74
+ `bedrock` routes `bedrock/anthropic.claude-sonnet-5`. The model part must be an
75
+ ID that provider serves. Check [your provider's page](../managing-providers.mdx)
76
+ in the Portal.
96
77
 
97
78
  :::
98
79
 
99
- ### Add models to the Model list
100
-
101
- The **Model list** in the **Models** section overrides the model list Claude
102
- Desktop discovers on its own. Click **Add** once per model the app may use, and
103
- fill in each entry:
80
+ The **Model list** replaces the models Claude Desktop discovers on its own.
81
+ Click **Add** once per model:
104
82
 
105
83
  - **Model ID** — the full `providerName/model` reference, for example
106
- `anthropic/claude-sonnet-5`. A bare id such as `claude-sonnet-5` fails to
107
- route through the gateway.
108
- - **Display name** — the name shown in the model picker, for example
109
- `Claude Sonnet 5`. Leave it blank and Claude Desktop formats a name from the
110
- id.
111
- - **Offer 1M-context variant** — leave this off unless your provider's
112
- deployment accepts 1M-token context for the model.
84
+ `anthropic/claude-sonnet-5`. A bare ID fails with a `400`.
85
+ - **Display name** — the name in the model picker. Leave it blank and Claude
86
+ Desktop formats one from the ID.
87
+ - **Offer 1M-context variant** — off, unless your provider accepts 1M-token
88
+ context for the model.
113
89
  - **Tier alias** — the Claude tier (Opus, Sonnet, Haiku, or Fable) this model
114
- stands in for. Setting it pins what the bare alias (for example `opus`)
115
- resolves to, so tier names route to your prefixed model reference.
90
+ stands in for. The bare alias, for example `opus`, then resolves to it.
116
91
 
117
- The first entry is the default selection in the model picker. Include a
118
- Haiku-tier model — Claude Desktop runs background and sub-agent tasks on a
119
- small, fast model.
120
-
121
- The model ids in these examples reflect what was current when this page was
122
- written, and ids differ across providers — a Bedrock provider serves different
123
- ids than Anthropic directly, and availability can vary by region. Check
124
- [your provider's page](../managing-providers.mdx) in the portal for the models
125
- it currently serves, and use those ids.
92
+ The first entry is the picker default. Include a Haiku-tier model: Claude
93
+ Desktop runs background and sub-agent tasks on a small, fast model.
126
94
 
127
95
  The app's
128
96
  [Model Filtering](../../policies/ai-gateway-model-filtering-v2-inbound.mdx)
129
- policy controls which models the app may use.
130
-
131
- ### Verify the configuration
97
+ policy controls which models the app can use.
132
98
 
133
- After Claude Desktop relaunches, send a message in a Chat conversation and start
134
- a Cowork session. Both requests route through the gateway and count against the
135
- [app](../managing-apps.mdx) in the Zuplo Portal, as do Code sessions started
136
- from the desktop app. Terminal Claude Code sessions outside the desktop app use
137
- a separate configuration — see [Claude Code](./claude-code.mdx).
99
+ ## Verify
138
100
 
139
- :::caution{title='HTTP 400: model must use "providerName/model"'}
101
+ Send a message in Chat and start a Cowork session. Both appear in the app's
102
+ usage in the Zuplo Portal, as do Code sessions started from the desktop app.
103
+ Terminal Claude Code sessions use their own configuration. See
104
+ [Claude Code](./claude-code.mdx).
140
105
 
141
- If a request fails with `The request body model must use "providerName/model"`,
142
- the selected model reference is missing its provider prefix. Give every entry in
143
- the model list a full `providerName/model` reference.
106
+ ## Troubleshooting
144
107
 
145
- :::
108
+ | Error | Fix |
109
+ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
110
+ | `400` `The request body model must use "providerName/model"` | A model list entry has no provider prefix. Give every entry a full `providerName/model` ID. |
146
111
 
147
- ### Deploy to a fleet
112
+ ## Deploy to a fleet
148
113
 
149
- To roll the configuration out to many devices, use the configuration window's
150
- **Export** menu instead of **Apply locally**. It generates a `.mobileconfig`
151
- profile for macOS MDM tools such as Jamf, a `.reg` policy file for Intune or
152
- Group Policy, and related deployment artifacts. Managed configuration takes
153
- precedence over local settings, so users can't point the app at a different
154
- endpoint. For the deployment workflow and the full configuration key reference,
155
- see Anthropic's
114
+ Use the configuration window's **Export** menu instead of **Apply locally**. It
115
+ produces a `.mobileconfig` profile for macOS MDM tools such as Jamf, a `.reg`
116
+ policy file for Intune or Group Policy, and related artifacts. Managed
117
+ configuration overrides local settings. See Anthropic's
156
118
  [Deploy Claude Desktop with an LLM gateway](https://claude.com/docs/third-party/claude-desktop/gateway)
157
119
  and [Deploy with MDM](https://claude.com/docs/third-party/claude-desktop/mdm).