You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses 19 review threads from the second CoPilot pass; about half
were duplicates of the same underlying issue:
- examples/00-hello-world/main.py + README hello-world: api_key now
uses `os.environ.get("LLM_API_KEY") or None` so an exported-but-
empty env var falls through to no-auth (matters for local servers
that reject an empty bearer header).
- Both examples now close the OpenAIProvider in the finally block
alongside graph.drain(). Long-running consumers that copy the
snippet had been leaking the underlying httpx.AsyncClient.
- errors.py header dropped the hard-coded "seven canonical
categories" count after StructuredOutputInvalid landed.
- strict_mode_supported docstring and the surrounding spec-anchor
comment block both updated to match the implementation:
additionalProperties must be EXPLICITLY false (an omitted key
counts as non-strict, since JSON Schema's default permits extras).
- _resolve_ref now handles ref == "#" as the document root before
rejecting external refs. Root-recursive schemas that use the bare
JSON-Pointer-root form now resolve correctly. Unit test added.
- _strict_mode_check tightened to return False on unrecognized
shapes (empty {}, const-only, enum-only, unknown keywords) instead
of falling through to True. Primitive types (string/integer/
number/boolean/null) classified as terminal-strict-compatible.
Two unit tests added.
- _build_request_body now explicitly strips response_format from the
body when the provider is in fallback mode. RuntimeConfig is
extra="allow", so a caller could have piped response_format
through the extras loop past the include_response_format gate.
- provider.py module docstring's summary signature line updated to
match the Protocol's response_schema parameter.
- validate_response_schema's spec-anchor comment updated to reflect
that JSON Schema validity is now checked at the boundary via
Draft202012Validator.check_schema(), not delegated to parse time.
- test_pydantic_class_wire_body_matches_dict_form: widened the
assertion from response_format-only to full body equality, so any
regression in the class-input wire mapping (not just
response_format) gets caught.
- test_inspect_property_native_default and
test_inspect_property_fallback_when_forced converted to async
with try/finally + aclose() to match the rest of the file's
provider-lifecycle pattern.
0 commit comments