docs(realtime): fix RealtimeRunner context docstring#3748
Open
anxkhn wants to merge 1 commit into
Open
Conversation
The RealtimeRunner.__init__ docstring documented a context parameter that does not exist in its signature. context was moved to the run() method (in the [8/n] realtime refactor) but its Args entry was left behind on the constructor. Remove the stale context entry from __init__ and document run()'s actual context and model_config parameters, matching how the sibling RealtimeSession documents them. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RealtimeRunner.__init__documented acontextparameter in itsArgs:block,but the constructor has no such parameter. Its real parameters are
starting_agent,model, andconfig. Thecontextparameter actually belongsto
RealtimeRunner.run(), where it was moved in the[8/n] Make realtime more like the rest of agents sdkchange, but itsArgs:entry was left behind on theconstructor and
run()was never given one.This misleads users of the realtime API into thinking they can pass
contexttothe
RealtimeRunner(...)constructor.This change:
context:line fromRealtimeRunner.__init__'sArgs:blockso it documents only the parameters the constructor actually accepts.
Args:block toRealtimeRunner.run()documenting its real parameters,contextandmodel_config, matching how the siblingRealtimeSessiondocuments the same values.
Docs-only; no runtime, API, or behavior change.
Test plan
No executable behavior changes (docstring-only), so no new tests are warranted.
Verified the docstrings now match the real signatures by introspection, and ran
the standard checks on the changed file:
RealtimeRunner.__init__documentedArgsnames now equal its real parameters:['starting_agent', 'model', 'config'].RealtimeRunner.rundocumentedArgsnames now equal its real parameters:['context', 'model_config'].uv run ruff format --check src/agents/realtime/runner.py-> already formatted.uv run ruff check src/agents/realtime/runner.py-> All checks passed!uv run mypy src/agents/realtime/runner.py-> Success: no issues found.Per
AGENTS.md, docs-only changes may skip$code-change-verification.Issue number
N/A (no existing tracker issue).
Checks
.agents/skills/code-change-verification/scripts/run.sh(N/A perAGENTS.md docs-only exemption; ran ruff format/check + mypy on the changed file)
/reviewbefore submitting this PR (N/A)The diff