Skip to content

fix: finalize 1.15.5 correctness consolidation - #2510

Merged
jxnl merged 4 commits into
mainfrom
codex/post-1.15.5-correctness-2026-08-07
Aug 8, 2026
Merged

fix: finalize 1.15.5 correctness consolidation#2510
jxnl merged 4 commits into
mainfrom
codex/post-1.15.5-correctness-2026-08-07

Conversation

@jxnl

@jxnl jxnl commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Included fixes

Superseded PRs/issues

Validation

  • Focused regression suite: 224 passed, 1 skipped, 27 deselected
  • Python 3.9 streaming compatibility: 11 passed, 1 skipped
  • Exact guarded-release offline selection: 2020 passed, 144 skipped
  • Release validator: 6 passed and generated 1.15.5 notes successfully
  • Ruff check/format, source and test ty, uv lock --check, workflow YAML parse, pre-commit hooks, and git diff --check: passed

Skipped items

  • Provider additions/upgrades, broad architecture/features, the 38-package dependency batch, security/product decisions, and substantial examples/docs remain open for dedicated review.
  • No tag, GitHub release, PyPI publication, deployment, merge, or social post is performed by this PR.

Note

Medium Risk
Changes affect multimodal HTTP behavior, OpenAI streaming retry parsing, and iterable union validation on common response paths; risk is moderated by focused regression tests but still touches production parsing and network I/O.

Overview
This PR bundles unreleased 1.15.5 fixes: remote multimodal safety, OpenAI streaming retry parsing, iterable union streaming, and contributor CI that does not require provider secrets on fork PRs.

Remote multimodal fetches now pass a 30-second timeout on every requests.get / requests.head used to download or sniff image, audio, and PDF URLs across v2 core and OpenAI, Anthropic, and GenAI provider encoders, so hung hosts cannot block callers indefinitely.

OpenAI streaming retries route TOOLS, JSON, JSON_SCHEMA, and MD_JSON through a shared _should_parse_streaming check that still uses the streaming DSL parser when stream=True, even after the one-shot streaming model marker is consumed—so a corrected streamed retry can validate instead of falling back to one-shot parsing.

Iterable streaming treats PEP 604 unions (Weather | GoogleSearch, Iterable[Weather | GoogleSearch]) like typing.Union by validating each union member in extract_cls_task_type, with new streaming and prepare_response_model tests.

CI / changelog: Auto-client live network tests are marked llm and excluded from core, full coverage, and release pytest runs (-m 'not llm'); core tests no longer inject provider API keys into the environment. Changelog documents these items under 1.15.5 (dated 2026-08-07).

Reviewed by Cursor Bugbot for commit e92e3d6. Configure here.

bunlongheng and others added 4 commits August 7, 2026 17:43
Several requests.get/head calls that download image, audio, and PDF
content from remote URLs did not pass a timeout, so a slow or
unresponsive host could hang the calling thread indefinitely
(uncontrolled resource consumption, CWE-400). The GCS helpers in the
same module already use a 30s timeout; this applies the same default
to the remaining fetches and adds regression tests asserting a timeout
is passed.
`create_iterable(response_model=Weather | GoogleSearch)` wraps the model in
`Iterable[Weather | GoogleSearch]`, so `IterableBase.task_type` holds a
`types.UnionType`. `extract_cls_task_type` matched only `typing.Union`, so the
PEP 604 spelling skipped the member-by-member branch and instead called
`model_validate_json` on the union object itself, raising
`AttributeError: 'types.UnionType' object has no attribute 'model_validate_json'`
on the first streamed item. The `Union[Weather, GoogleSearch]` spelling works.

`iterable.py` already defines `_UNION_ORIGINS = (Union, UnionType)` and
`IterableModel` uses it to build the wrapper class, so `Iterable[A | B]`
produced a correct `IterableWeatherOrGoogleSearch` and then failed to parse
into it. Match `_UNION_ORIGINS` in `extract_cls_task_type` as well, which is
what `dsl/parallel.py` and `core/response_model.py` already do.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
instructor e92e3d6 Commit Preview URL

Branch Preview URL
Aug 08 2026, 12:54 AM

@jxnl
jxnl marked this pull request as ready for review August 8, 2026 00:56
@jxnl
jxnl merged commit 1454af9 into main Aug 8, 2026
26 checks passed
@jxnl
jxnl deleted the codex/post-1.15.5-correctness-2026-08-07 branch August 8, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants