Default Python SDK approval policy to never

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-05-09 12:03:09 +03:00
parent 78c0d5ca3d
commit d80a43263f
10 changed files with 220 additions and 18 deletions

View File

@@ -46,7 +46,7 @@ PROMPT = (
"Analyze a safe rollout plan for enabling a feature flag in production. "
"Return JSON matching the requested schema."
)
APPROVAL_POLICY = AskForApproval.model_validate("never")
APPROVAL_POLICY = AskForApproval.never
async def main() -> None:

View File

@@ -44,7 +44,7 @@ PROMPT = (
"Analyze a safe rollout plan for enabling a feature flag in production. "
"Return JSON matching the requested schema."
)
APPROVAL_POLICY = AskForApproval.model_validate("never")
APPROVAL_POLICY = AskForApproval.never
with Codex(config=runtime_config()) as codex:
thread = codex.thread_start(model="gpt-5.4", config={"model_reasoning_effort": "high"})

View File

@@ -75,7 +75,7 @@ SANDBOX_POLICY = SandboxPolicy.model_validate(
"access": {"type": "fullAccess"},
}
)
APPROVAL_POLICY = AskForApproval.model_validate("never")
APPROVAL_POLICY = AskForApproval.never
async def main() -> None:

View File

@@ -73,7 +73,7 @@ SANDBOX_POLICY = SandboxPolicy.model_validate(
"access": {"type": "fullAccess"},
}
)
APPROVAL_POLICY = AskForApproval.model_validate("never")
APPROVAL_POLICY = AskForApproval.never
with Codex(config=runtime_config()) as codex: