ultraworkers-claw-code/rust/crates/api/src
Jobdori e7e0fd2dbf fix(api): strict object schema for OpenAI /responses endpoint
OpenAI /responses validates tool function schemas strictly:
- object types must have "properties" (at minimum {})
- "additionalProperties": false is required

/chat/completions is lenient and accepts schemas without these fields,
but /responses rejects them with "object schema missing properties" /
"invalid_function_parameters".

Add normalize_object_schema() which recursively walks the JSON Schema
tree and fills in missing "properties"/{} and "additionalProperties":false
on every object-type node. Existing values are not overwritten.

Call it in openai_tool_definition() before building the request payload
so both /chat/completions and /responses receive strict-validator-safe
schemas.

Add unit tests covering:
- bare object schema gets both fields injected
- nested object schemas are normalised recursively
- existing additionalProperties is not overwritten

Fixes the live repro where gpt-5.4 via OpenAI compat accepted connection
and routing but rejected every tool call with schema validation errors.

Closes ROADMAP #33.
2026-04-09 03:03:43 +09:00
..
providers fix(api): strict object schema for OpenAI /responses endpoint 2026-04-09 03:03:43 +09:00
client.rs fix(api): route DashScope models to dashscope config, not openai 2026-04-08 18:04:37 +09:00
error.rs fix(api): auth-provider error copy — prefix-routing hints + sk-ant-* bearer detection — closes ROADMAP #28 2026-04-08 16:29:03 +09:00
http_client.rs feat: b6-openai-models — batch 6 2026-04-07 15:52:30 +09:00
lib.rs feat: b6-pdf-extract-v2 follow-up work — batch 6 2026-04-07 16:11:51 +09:00
prompt_cache.rs feat(api): add tuning params (temperature, top_p, penalties, stop) to MessageRequest 2026-04-08 07:07:33 +09:00
sse.rs fix(api): enrich JSON parse errors with response body, provider, and model 2026-04-07 14:22:05 +09:00
types.rs feat(api): add tuning params (temperature, top_p, penalties, stop) to MessageRequest 2026-04-08 07:07:33 +09:00