• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dcdpr / jp / 26605957513
67%

Build:
DEFAULT BRANCH: main
Ran 28 May 2026 10:29PM UTC
Jobs 1
Files 380
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 May 2026 10:27PM UTC coverage: 65.963% (+0.005%) from 65.958%
26605957513

push

github

web-flow
fix(llm, openai): Fix nullable `array`/`object` params in strict mode (#674)

OpenAI's strict validator was rejecting tool-call schemas that encoded
optional array/object parameters as `{type: ["array", "null"], items:
...}`. The validator treats `items` as orphaned from the array type
variant in a union, causing an "array schema missing items" error.

The fix changes `make_schema_nullable` to use an `anyOf` wrapper for
structured types (`array`, `object`) instead of extending the `type`
field into an array. Primitives (`string`, `integer`, etc.) keep the
simpler `{type: ["string", "null"]}` form, which OpenAI accepts without
issue. This matches the shape emitted by Pydantic/OpenAI's own SDK for
`Optional[List[T]]` and `Optional[BaseModel]`.

As part of this work, the two previously separate strict-mode helpers —
`transform_schema` (used for structured outputs) and
`enforce_strict_object_structure` (used for function-calling) — are
unified into a single in-place `ensure_strict_schema(&mut Value)`
function. Both code paths now share identical semantics: objects get
`additionalProperties: false`, every property lands in `required`, and
previously-optional properties are made nullable. The old
`make_config_nullable` helper (which operated on `ToolParameterConfig`
directly) is removed; nullability is now always injected at the JSON
schema level.

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>

96 of 105 new or added lines in 1 file covered. (91.43%)

2 existing lines in 1 file now uncovered.

31552 of 47833 relevant lines covered (65.96%)

264.2 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
77.02
0.07% crates/jp_llm/src/provider/openai.rs

Coverage Regressions

Lines Coverage ∆ File
2
77.02
0.07% crates/jp_llm/src/provider/openai.rs
Jobs
ID Job ID Ran Files Coverage
1 26605957513.1 28 May 2026 10:29PM UTC 380
65.96
GitHub Action Run
Source Files on build 26605957513
  • Tree
  • List 380
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26605957513
  • 90ce5593 on github
  • Prev Build on main (#26588707478)
  • Next Build on main (#26605996498)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc