Skip to content

Commit 2402a3c

Browse files
authored
Add support for passing custom headers in clientOptions (browserbase#1817)
# why Allow users to pass custom headers in their LLM calls # what changed Add headers to the model.ts types # test plan <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds `headers` support to `ClientOptions` so clients can send custom HTTP headers with every provider request. Useful for auth tokens or routing hints without changing global config. - **New Features** - Added `headers?: Record<string, string>` to `ClientOptions` in `packages/core/lib/v3/types/public/model.ts`; headers are sent with each request. - No breaking changes; default behavior is unchanged. <sup>Written for commit 424dc1a. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1817">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. -->
1 parent 9f02cc2 commit 2402a3c

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.changeset/yellow-cups-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
---
4+
5+
Add support for passing custom headers in clientOptions

packages/core/lib/v3/types/public/model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ export type ClientOptions = (
114114
maxImages?: number;
115115
/** Temperature for model inference */
116116
temperature?: number;
117+
/** Custom headers sent with every request to the provider */
118+
headers?: Record<string, string>;
117119
};
118120

119121
export type ModelConfiguration =

0 commit comments

Comments
 (0)