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
Copy file name to clipboardExpand all lines: api-reference/inference-api/config-object.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -650,7 +650,7 @@ You can find more examples of schemas [below](/api-reference/inference-api/confi
650
650
|`passthrough`| Defer provider resolution to the incoming request | boolean | No | - | When `true`, the target does not require `provider`. See [Passthrough targets](/product/ai-gateway/configs#passthrough-targets)|
651
651
|`override_params`| Pass model name and other hyper parameters | object | No | "model", "temperature", "frequency\_penalty", "logit\_bias", "logprobs", "top\_logprobs", "max\_tokens", "n", "presence\_penalty", "response\_format", "seed", "stop", "top_p", etc. | Pass everything that's typically part of the payload |
652
652
|`default_params`| Inject parameters into the request body only when not already present (respects client-sent values) | object | No | Any payload field | See [Default and drop params](/product/ai-gateway/configs#default-and-drop-params)|
653
-
|`drop_params`| Remove parameters from the final request body using dot-notation paths (supports nested keys and array indices) | array of strings | No | Any payload field path | See [Default and drop params](/product/ai-gateway/configs#default-and-drop-params)|
653
+
|`drop_params`| Remove parameters from the final request body using bracket-notation paths (nested keys, array indices, and `[*]` wildcards) | array of strings | No | Any payload field path | See [Default and drop params](/product/ai-gateway/configs#default-and-drop-params)|
Copy file name to clipboardExpand all lines: integrations/libraries/claude-code-bedrock.mdx
+9-43Lines changed: 9 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,40 +72,11 @@ Replace:
72
72
73
73
That's it! All Claude Code requests now route through Bedrock via Portkey. Monitor usage in the [Portkey Dashboard](https://app.portkey.ai/logs).
74
74
75
-
## Forward Headers (Required for Some Features)
76
-
77
-
Some Claude Code features require the `anthropic-beta` header to reach Bedrock. Configure this in a [Portkey Config](/product/ai-gateway/configs):
78
-
79
-
<Steps>
80
-
<Steptitle="Create a Config">
81
-
82
-
Go to [Configs](https://app.portkey.ai/configs) → **Create Config**:
83
-
84
-
```json
85
-
{
86
-
"provider": "@bedrock-prod",
87
-
"forward_headers": ["anthropic-beta"]
88
-
}
89
-
```
90
-
91
-
Save and copy the Config ID.
92
-
</Step>
93
-
94
-
<Steptitle="Update Claude Code Settings">
95
-
96
-
Add the config to your settings:
75
+
<Info>
76
+
Portkey automatically handles `anthropic-beta` headers for Bedrock: unsupported beta flags are filtered, provider-specific values are remapped, and supported flags are forwarded upstream. You do not need `forward_headers` in your config for Claude Code to work.
To bypass this filtering and pass `anthropic-beta` through unchanged, add `"forward_headers": ["anthropic-beta"]` to your [Portkey Config](/product/ai-gateway/configs).
79
+
</Info>
109
80
110
81
## Trace Requests
111
82
@@ -139,8 +110,7 @@ Route to backup providers when Bedrock fails. Create a config with fallback targ
139
110
{ "provider": "@bedrock-prod" },
140
111
{ "provider": "@anthropic-prod" },
141
112
{ "provider": "@vertex-prod" }
142
-
],
143
-
"forward_headers": ["anthropic-beta"]
113
+
]
144
114
}
145
115
```
146
116
@@ -154,8 +124,7 @@ Distribute requests across multiple providers or regions:
Copy file name to clipboardExpand all lines: integrations/libraries/claude-code-vertex.mdx
+9-43Lines changed: 9 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,40 +68,11 @@ Replace:
68
68
69
69
That's it! All Claude Code requests now route through Vertex AI via Portkey. Monitor usage in the [Portkey Dashboard](https://app.portkey.ai/logs).
70
70
71
-
## Forward Headers (Required for Some Features)
71
+
<Info>
72
+
Portkey automatically handles `anthropic-beta` headers for Vertex AI: unsupported beta flags are filtered, provider-specific values are remapped, and supported flags are forwarded upstream. You do not need `forward_headers` in your config for Claude Code to work.
72
73
73
-
Some Claude Code features require the `anthropic-beta` header to reach Vertex AI. Configure this in a [Portkey Config](/product/ai-gateway/configs):
74
-
75
-
<Steps>
76
-
<Steptitle="Create a Config">
77
-
78
-
Go to [Configs](https://app.portkey.ai/configs) → **Create Config**:
To bypass this filtering and pass `anthropic-beta` through unchanged, add `"forward_headers": ["anthropic-beta"]` to your [Portkey Config](/product/ai-gateway/configs).
75
+
</Info>
105
76
106
77
## Trace Requests
107
78
@@ -135,8 +106,7 @@ Route to backup providers when Vertex AI fails. Create a config with fallback ta
135
106
{ "provider": "@vertex-prod" },
136
107
{ "provider": "@anthropic-prod" },
137
108
{ "provider": "@bedrock-prod" }
138
-
],
139
-
"forward_headers": ["anthropic-beta"]
109
+
]
140
110
}
141
111
```
142
112
@@ -150,8 +120,7 @@ Distribute requests across multiple regions:
Copy file name to clipboardExpand all lines: product/ai-gateway/configs.mdx
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,10 +172,21 @@ Each config target can shape the request body before it reaches the upstream pro
172
172
|---|---|
173
173
| `default_params` | Injects parameters into the request body **only when not already present**. Unlike `override_params`, this respects values set by the client. |
174
174
| `override_params` | Always overwrites the matching field on the request body. |
175
-
| `drop_params` | Removes parameters from the final request body using dot-notation paths. Supports nested keys and array indices (e.g., `tools.0.function.name`). |
175
+
| `drop_params` | Removes fields from the final request body using bracket-notation paths (see below). |
176
176
177
177
Execution order: `default_params` → `override_params` → `drop_params`. All three fields inherit through nested target configs the same way `override_params` does — values defined on a parent target apply to its children unless overridden.
178
178
179
+
### `drop_params` paths
180
+
181
+
Each entry in `drop_params` is a path into the request body. The gateway deletes the matching property before forwarding the request. Paths that do not exist on the request are silently ignored.
182
+
183
+
| Path style | Example | What it removes |
184
+
| --- | --- | --- |
185
+
| Top-level key | `"logprobs"`, `"metadata"` | A field on the root object |
186
+
| Nested object | `"response_format.json_schema"` | A field at any depth (dot-separated segments) |
187
+
| Array index | `"tools[0].function.strict"`, `"messages[2]"` | One element in an array and anything nested under it |
188
+
| Wildcard array | `"tools[*].function.strict"`, `"messages[*].content[*].cache_control.scope"` | The same nested field on **every** array element (and nested arrays when using multiple `[*]`) |
189
+
179
190
### Example
180
191
181
192
```json
@@ -186,7 +197,7 @@ Execution order: `default_params` → `override_params` → `drop_params`. All t
0 commit comments