Skip to content

docs: document auto_previous_response_id#3383

Merged
seratch merged 1 commit into
openai:mainfrom
ioleksiuk:docs/runner-docstring-drift
May 13, 2026
Merged

docs: document auto_previous_response_id#3383
seratch merged 1 commit into
openai:mainfrom
ioleksiuk:docs/runner-docstring-drift

Conversation

@ioleksiuk
Copy link
Copy Markdown
Contributor

Summary

Two pieces of doc drift accumulated in the public `Runner` methods:

This PR adds the missing `auto_previous_response_id` entry to each `Args:` block and updates the `error_handlers` description to list both handler kinds.

Test plan

```
$ uv run python -c "
import inspect
from agents import Runner
for name in ('run', 'run_sync', 'run_streamed'):
doc = inspect.getdoc(getattr(Runner, name)) or ''
print(name, 'auto_previous_response_id:', 'auto_previous_response_id' in doc,
'model_refusal:', 'model_refusal' in doc)
"
run auto_previous_response_id: True model_refusal: True
run_sync auto_previous_response_id: True model_refusal: True
run_streamed auto_previous_response_id: True model_refusal: True
```

  • `uv run ruff check src/agents/run.py src/agents/run_config.py` — All checks passed.
  • Docs-only change; no runtime tests apply.

Issue number

N/A — found during a docstring/signature drift audit following recent param/handler additions.

Checks

  • I've added new tests (if relevant) — docs only, no test changes
  • I've added/updated the relevant documentation
  • I've run `make lint` and `make format`
  • I've made sure tests pass

Copy link
Copy Markdown
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

We'd like to have only the auto_previous_response_id documentation

Comment thread src/agents/run.py Outdated
Comment thread src/agents/run_config.py Outdated
@seratch seratch added documentation Improvements or additions to documentation feature:core labels May 13, 2026
…s value list

PR openai#2117 added the `auto_previous_response_id` parameter to
`Runner.run`, `Runner.run_sync`, and `Runner.run_streamed` signatures
but did not document it in the `Args:` blocks (parameter appears in
`inspect.signature` but not in `inspect.getdoc`).

Add the missing `auto_previous_response_id` entry to each `Args:`
block. Drop the "Currently supports max_turns" enumeration from the
`error_handlers` docstrings (3 in `run.py`, 1 in
`run_config.py:RunOptions.error_handlers`) to avoid documenting a list
that will drift again as more handler kinds are added.
@ioleksiuk ioleksiuk force-pushed the docs/runner-docstring-drift branch from 79d5b26 to b9c37e8 Compare May 13, 2026 17:29
@ioleksiuk
Copy link
Copy Markdown
Contributor Author

Thanks for the review! Updated to address both comments:

  • Dropped the Currently supports ... enumeration from all four error_handlers docstrings (3 in run.py, 1 in run_config.py). The line now reads just error_handlers: Error handlers keyed by error kind. — no list to fall out of date.
  • auto_previous_response_id documentation kept in all three Runner methods (unchanged from the previous push).

Rebased onto latest main and force-pushed.

@ioleksiuk ioleksiuk requested a review from seratch May 13, 2026 17:47
@seratch seratch changed the title docs: document auto_previous_response_id and model_refusal error handler docs: document auto_previous_response_id May 13, 2026
@seratch seratch added this to the 0.17.x milestone May 13, 2026
@seratch seratch enabled auto-merge (squash) May 13, 2026 23:31
@seratch seratch merged commit 900cab6 into openai:main May 13, 2026
9 checks passed
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 feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants