Skip to content

Commit 5d47dc1

Browse files
shubh24claude
andcommitted
feat: add headers field to ModelConfigParam for custom LLM proxy auth
Adds optional `headers` field to `ModelConfigParam`, allowing users to pass custom HTTP headers with every request to their model provider. This aligns the Python SDK with the core TypeScript SDK which already supports `headers` on `ClientOptions` and `ModelConfigObjectSchema`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a30258c commit 5d47dc1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/stagehand/types/model_config_param.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Dict
6+
57
from typing_extensions import Literal, Required, Annotated, TypedDict
68

79
from .._utils import PropertyInfo
@@ -19,5 +21,8 @@ class ModelConfigParam(TypedDict, total=False):
1921
base_url: Annotated[str, PropertyInfo(alias="baseURL")]
2022
"""Base URL for the model provider"""
2123

24+
headers: Dict[str, str]
25+
"""Custom headers sent with every request to the model provider"""
26+
2227
provider: Literal["openai", "anthropic", "google", "microsoft"]
2328
"""AI provider for the model (or provide a baseURL endpoint instead)"""

0 commit comments

Comments
 (0)