mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Add browser extension request headers to config requirements (#51194)
## What changed Support `browser_use.extension.request_headers` as a list of `name`/`value` pairs and expose it through `config/requirements/read` as `browserUse.extension.requestHeaders`. Update the generated JSON schemas, TypeScript types, and Python models. Preserve header values, including template strings, verbatim. Higher-priority requirement layers replace the entire header list, including with an explicit empty list. Redact header values in Rust debug output while retaining them in API serialization. ## Testing Add coverage for parsing and malformed entries, extension scoping, empty-list overrides, API mapping and read responses, and debug redaction without changing serialized values. GitOrigin-RevId: 02299e82a91aa863966d0277091bc5e8cc1ebe07
This commit is contained in:
@@ -465,22 +465,6 @@ class BrowserUseOriginPolicyConfig(BaseModel):
|
||||
uploads: AllowDenyRequirement | None = None
|
||||
|
||||
|
||||
class BrowserUseRequirements(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
allow_global_persistent_approval: Annotated[
|
||||
bool | None, Field(alias="allowGlobalPersistentApproval")
|
||||
] = None
|
||||
allow_history_access: Annotated[bool | None, Field(alias="allowHistoryAccess")] = None
|
||||
allow_webmcp: Annotated[bool | None, Field(alias="allowWebmcp")] = None
|
||||
default_origin_policy: Annotated[
|
||||
BrowserUseOriginPolicy | None, Field(alias="defaultOriginPolicy")
|
||||
] = None
|
||||
disable_auto_review: Annotated[bool | None, Field(alias="disableAutoReview")] = None
|
||||
origins: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class ByteRange(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -3872,6 +3856,14 @@ class RemoteControlStatusChangedNotification(BaseModel):
|
||||
status: RemoteControlConnectionStatus
|
||||
|
||||
|
||||
class RequestHeader(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
name: str
|
||||
value: str
|
||||
|
||||
|
||||
class RequestId(RootModel[str | int]):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -6860,6 +6852,30 @@ class BrowserUseConfig(BaseModel):
|
||||
origins: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class BrowserUseExtensionRequirements(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
request_headers: Annotated[list[RequestHeader] | None, Field(alias="requestHeaders")] = None
|
||||
|
||||
|
||||
class BrowserUseRequirements(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
allow_global_persistent_approval: Annotated[
|
||||
bool | None, Field(alias="allowGlobalPersistentApproval")
|
||||
] = None
|
||||
allow_history_access: Annotated[bool | None, Field(alias="allowHistoryAccess")] = None
|
||||
allow_webmcp: Annotated[bool | None, Field(alias="allowWebmcp")] = None
|
||||
default_origin_policy: Annotated[
|
||||
BrowserUseOriginPolicy | None, Field(alias="defaultOriginPolicy")
|
||||
] = None
|
||||
disable_auto_review: Annotated[bool | None, Field(alias="disableAutoReview")] = None
|
||||
extension: BrowserUseExtensionRequirements | None = None
|
||||
origins: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class CancelLoginAccountResponse(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
|
||||
Reference in New Issue
Block a user