[pull] main from openai:main - #193
Merged
Merged
Conversation
Automated Release PR --- ## [3.21.0](v3.20.0...v3.21.0) (2026-09-29) ### Features * **api:** add GPT-6.1 Sol model identifier ([#3986](#3986)) ([160b2c0](160b2c0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
## Summary Adds typed computer-use tools, approval responses, screenshots, and desktop settings to beta.agents. ## Changes - Support computer_use tools and optional screenshots. - Add browser authentication and origin-access approval inputs and required actions. - Expose computer-use calls and credential-free approval history. - Add desktop settings for hosted environments and environment templates. Co-authored-by: marcuswood-oai <323319819+marcuswood-oai@users.noreply.github.com>
Automated Release PR --- ## [3.22.0](v3.21.0...v3.22.0) (2026-09-29) ### Features * **api:** add computer use to beta agents ([#3989](#3989)) ([f5dddb5](f5dddb5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
- [x] I understand that this repository is auto-generated and my pull
request may not be merged
## Changes being requested
A JSON `true` with a trailing newline is parsed as `False`. Both
response parsers now trim whitespace and keep case-insensitive parsing.
## Additional context & links
| # | Scenario | Command | Result |
| --- | --- | --- | --- |
| 1 | Local file download | Program below | `true\n`: `False` before,
`True` after |
<details><summary>Reproducer and raw logs</summary>
```bash
PYTHONPATH=src python - <<'PY'
from http import HTTPStatus
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from threading import Thread
import httpx2
from openai import OpenAI
FILES: dict[str, bytes] = {"file_false": b"false\n", "file_true": b"true\n"}
class Handler(BaseHTTPRequestHandler):
def do_GET(self) -> None:
body = FILES[self.path.split("/")[3]]
self.send_response(HTTPStatus.OK)
self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, format: str, *args: object) -> None:
pass
server = ThreadingHTTPServer(server_address=("127.0.0.1", 0), RequestHandlerClass=Handler)
thread = Thread(target=server.serve_forever)
thread.start()
try:
with OpenAI(api_key="local", base_url=f"http://127.0.0.1:{server.server_port}/v1",
http_client=httpx2.Client(trust_env=False)) as client:
for file_id in FILES:
raw = client.files.with_raw_response.content(file_id=file_id)
with client.files.with_streaming_response.content(file_id=file_id) as streamed:
values = (raw.parse(to=bool), streamed.parse(to=bool))
print(file_id, raw.status_code, values, flush=True)
expected = file_id == "file_true"
assert values == (expected, expected), "Incorrect boolean result"
finally:
server.shutdown()
server.server_close()
thread.join()
PY
```
Before:
```text
file_false 200 (False, False)
file_true 200 (False, False)
Traceback (most recent call last):
File "<stdin>", line 34, in <module>
AssertionError: Incorrect boolean result
exit=1
```
After:
```text
file_false 200 (False, False)
file_true 200 (True, True)
exit=0
```
</details>
Both parser modules hit the same existing `AttributeError: module 'rich'
has no attribute 'console'` in the display helper before and after this
change.
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Co-authored-by: Marcus Wood <marcuswood@openai.com>
## Summary The streaming snippet in `helpers.md:172` prints `event.content` for `content.delta` events, but `ContentDeltaEvent` only has `delta` and `snapshot` fields (`src/openai/lib/streaming/chat/_events.py`) — running the snippet raises `AttributeError`. Changed to `event.delta`, which the same page already documents at line 199. ## Checklist - [x] I understand that this repository is auto-generated and my pull request may not be merged Co-authored-by: Marcus Wood <marcuswood@openai.com>
## Summary Clarifies the error raised when authentication cannot be resolved. ## Changes - List each authentication header once and use the correct singular or plural wording. - Remove stray quotation marks without changing authentication validation or the exception type. Fixes #3962 Co-authored-by: marcuswood-oai <323319819+marcuswood-oai@users.noreply.github.com>
…3992) ## Summary Connect the WebSocket redirect/reconnect test harness to the generated resource registry so newly generated resource families inherit the existing coverage. The harness supplies synthetic required connection arguments and retains SDK-owned beta Realtime coverage. API definitions and runtime behavior are unchanged. ## Validation - All 99 WebSocket redirect/reconnect tests pass locally. - Ruff formatting and lint pass for the changed test file. - Full SDK, compatibility, and Castiron checks run in CI. Co-authored-by: apcha-oai <228803254+apcha-oai@users.noreply.github.com>
- [x] I understand that this repository is auto-generated and my pull
request may not be merged
## Changes being requested
Add a `.gitattributes` marking `tests/sample_file.txt -text`.
A default Windows checkout (`core.autocrlf=true`, the setting Git for
Windows recommends) converts that fixture to CRLF because nothing tells
Git it is a fixed byte fixture. `test_base64_file_input` base64-encodes
the file and compares against a fixed LF-based digest, so it fails out
of the box on a fresh Windows clone:
AssertionError: assert '...IHdvcmxkIQ0K' == '...IHdvcmxkIQo='
With the attribute, `git ls-files --eol tests/sample_file.txt` shows
`i/lf w/lf attr/-text` and `pytest tests/test_transform.py -k
base64_file_input` goes from 2 failed to 2 passed on the same clone; the
rest of `tests/test_transform.py` (60 tests) stays green. The fixture's
bytes in the repository are unchanged.
## Additional context & links
The file is not generated code, so nothing in the SDK regeneration
touches it. Same shape as other repos' fixture handling for byte-exact
test inputs.
---------
Co-authored-by: Marcus Wood <marcuswood@openai.com>
## Summary - `examples/parsing_tools_stream.py:27`: the comment credits `.parse_stream()` for the tool-call deserialization, but no such method exists in the SDK (`grep -rn parse_stream src/openai` → 0) — the wrapping comes from `pydantic_function_tool(...)`. The comment drifted when the example moved from `client.beta.chat.completions.stream`. - `examples/realtime/audio_util.py:16`: `CHUNK_LENGTH_S = 0.05 # 100ms` — 0.05 s is 50 ms (1200 frames at the module's 24 kHz rate). Comment corrected. Comment-only changes in examples/. ## Checklist - [x] I understand that this repository is auto-generated and my pull request may not be merged Co-authored-by: Marcus Wood <marcuswood@openai.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )