From 5a54ab4328202106eeed7caae7a603f8843cd0d6 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 8 Jul 2025 23:37:56 -1000 Subject: [PATCH 1/2] temporarily patch custom defined llm clients on api --- .changeset/loud-ties-beg.md | 5 +++++ lib/index.ts | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 .changeset/loud-ties-beg.md diff --git a/.changeset/loud-ties-beg.md b/.changeset/loud-ties-beg.md new file mode 100644 index 000000000..17ce213b0 --- /dev/null +++ b/.changeset/loud-ties-beg.md @@ -0,0 +1,5 @@ +--- +"@browserbasehq/stagehand": patch +--- + +Temporarily patch custom clients serialization error on api diff --git a/lib/index.ts b/lib/index.ts index 8e534ed87..4c55c4330 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -614,6 +614,13 @@ export class Stagehand { if (llmClient) { this.llmClient = llmClient; + this.logger({ + category: "init", + message: + "Custom LLM clients are currently not supported in API mode, share your feedback in slack! https://stagehand.dev/slack", + level: 1, + }); + this.usingAPI = false; } else { try { // try to set a default LLM client From cb4f80b105496deaa48d4415f1fef79e0103252b Mon Sep 17 00:00:00 2001 From: Miguel <36487034+miguelg719@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:50:07 -1000 Subject: [PATCH 2/2] Update lib/index.ts --- lib/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index 4c55c4330..786958ff1 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -617,7 +617,7 @@ export class Stagehand { this.logger({ category: "init", message: - "Custom LLM clients are currently not supported in API mode, share your feedback in slack! https://stagehand.dev/slack", + "Custom LLM clients are currently not supported in API mode", level: 1, }); this.usingAPI = false;