mirror of
https://github.com/openai/codex.git
synced 2026-05-18 10:12:59 +00:00
@@ -932,6 +932,8 @@ def _model_arg_lines(
|
||||
for field in fields:
|
||||
value = field.py_name
|
||||
if field.py_name == "approval_policy":
|
||||
# TODO: Add a public approval callback API that lets callers return
|
||||
# typed approval results, then honor caller-supplied policies.
|
||||
value = "_approval_policy_never(approval_policy)"
|
||||
lines.append(f"{indent}{field.wire_name}={value},")
|
||||
return lines
|
||||
|
||||
@@ -70,8 +70,8 @@ def _split_user_agent(user_agent: str) -> tuple[str | None, str | None]:
|
||||
|
||||
|
||||
def _approval_policy_never(_approval_policy: AskForApproval | None) -> AskForApproval:
|
||||
# TODO: Handle approval requests in the SDK before honoring caller-supplied
|
||||
# policies.
|
||||
# TODO: Add a public approval callback API that lets callers return typed
|
||||
# approval results, then honor caller-supplied policies.
|
||||
return AskForApproval.never
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user