Skip to content

docs: updates for 0.19.0#3872

Open
seratch wants to merge 2 commits into
mainfrom
docs/unreleased-main-behavior-0.19
Open

docs: updates for 0.19.0#3872
seratch wants to merge 2 commits into
mainfrom
docs/unreleased-main-behavior-0.19

Conversation

@seratch

@seratch seratch commented Jul 17, 2026

Copy link
Copy Markdown
Member

This pull request brings all the document changes for the upcoming release.

@seratch seratch added this to the 0.19.x milestone Jul 17, 2026
@seratch seratch added the documentation Improvements or additions to documentation label Jul 17, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45756e6dbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/tools.md
Comment thread docs/ja/tools.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73afebec3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/streaming.md Outdated
Comment thread docs/tools.md Outdated
Comment thread docs/results.md Outdated
Comment thread docs/tools.md Outdated
Comment thread docs/tools.md Outdated
@seratch
seratch force-pushed the docs/unreleased-main-behavior-0.19 branch from 73afebe to 86103b3 Compare July 19, 2026 22:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86103b3ede

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/human_in_the_loop.md

Set `needs_approval` to `True` to always require approval or provide an async function that decides per call. The callable receives the run context, parsed tool parameters, and the tool call ID.

Callable approval rules fail closed when the SDK cannot safely inspect the arguments. If the arguments are malformed JSON, are valid JSON but not an object (for example, `null` or a list), or contain non-standard constants such as `NaN`, `Infinity`, or `-Infinity`, the callable is not invoked and the call requires manual approval. This behavior is the same for Runner and Realtime tool calls.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude empty strings from the fail-closed guarantee

For a function call whose arguments is an empty string, this security guarantee does not hold: parse_function_tool_arguments() evaluates json.loads(arguments or "{}"), so both Runner and Realtime invoke the approval callback with {} and the callback may waive approval; a low-level FunctionTool can then receive the original empty raw arguments. Document this empty-value normalization explicitly or make empty arguments fail closed as claimed.

AGENTS.md reference: AGENTS.md:L74-L74

Useful? React with 👍 / 👎.

Comment thread docs/tools.md
- Add at most one `ProgrammaticToolCallingTool()` to an agent. The agent must also expose at least one programmatically callable tool, a `ToolSearchTool()` backed by a namespace, deferred function, or deferred hosted MCP server, or an opaque prompt-managed tool surface. A bare `ToolSearchTool()` without a searchable surface is rejected.
- `allowed_callers` controls how a tool may be invoked. Omitting it allows direct model calls only. Use `["programmatic"]` for program-only access or `["direct", "programmatic"]` to allow both.
- SDK tool types that can opt in are `FunctionTool`, `CustomTool`, `ShellTool`, `ApplyPatchTool`, `HostedMCPTool`, and `CodeInterpreterTool`. Function, custom, shell, and apply-patch tools expose `allowed_callers` directly. For hosted MCP and code interpreter, set `allowed_callers` inside `tool_config`.
- For `@function_tool(allowed_callers=[...])`, a structured return annotation such as a Pydantic model, TypedDict, or dataclass automatically becomes a strict object output schema and is validated before the value is returned to the program. Use `output_type=...` when the function has no usable annotation, or the lower-level `output_json_schema={...}` escape hatch when you already have a strict object schema. `output_type` and `output_json_schema` are mutually exclusive. Plain `str`, `Any`, and `None` returns remain untyped. For a schema-backed program-owned call, the default failure formatter is disabled because its free-form text does not satisfy the output schema. A handler exception therefore propagates unless you provide a custom `failure_error_function` that returns schema-conforming JSON.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify schema validation for Runner-generated outcomes

When a schema-backed programmatic function hits the default timeout path or an input/output guardrail or approval rejection, the Runner deliberately adds the call to schema_bypassed_tool_runs and builds its output with output_json_schema=None; these paths return plain strings such as timeout or rejection text to the program. The handler-exception caveat added here does not cover these distinct SDK-generated outcomes, so the generated JavaScript can still receive a value that violates the advertised strict object schema. Limit the validation guarantee to successful and explicitly schema-conforming custom outputs, and document the unstructured Runner-generated outcomes.

AGENTS.md reference: AGENTS.md:L74-L74

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant