ultraworkers-claw-code/rust/crates
YeonGyu-Kim fd7aade5b5 fix(api): tolerate null tool_calls in OpenAI-compat stream delta chunks
Some OpenAI-compatible providers emit 'tool_calls: null' in streaming
delta chunks instead of omitting the field or using an empty array:

  "delta": {"content":"","function_call":null,"tool_calls":null}

serde's #[serde(default)] only handles absent keys — an explicit null
value still fails deserialization with:
  'invalid type: null, expected a sequence'

Fix: replace #[serde(default)] with a custom deserializer helper
deserialize_null_as_empty_vec() that maps null -> Vec::default(),
keeping the existing absent-key default behaviour.

Regression test added: delta_with_null_tool_calls_deserializes_as_empty_vec
uses the exact provider response shape from gaebal-gajae's repro (2026-04-09).

112 api lib tests pass. Fmt clean.

Companion to gaebal-gajae's local 448cf2c — independently reproduced
and landed on main.
2026-04-09 21:39:52 +09:00
..
api fix(api): tolerate null tool_calls in OpenAI-compat stream delta chunks 2026-04-09 21:39:52 +09:00
commands fix(cli): wire /tokens and /cache as aliases for /stats; implement /stats 2026-04-09 21:34:36 +09:00
compat-harness wip: plugins progress 2026-04-01 07:09:06 +00:00
mock-anthropic-service feat(harness+usage): add auto_compact and token_cost parity scenarios 2026-04-03 22:41:42 +09:00
plugins fix(plugins): chmod +x generated hook scripts + tolerate BrokenPipe in stdin write — closes ROADMAP #25 hotfix lane 2026-04-08 15:48:20 +09:00
runtime feat(cli): wire --reasoning-effort flag end-to-end — closes ROADMAP #34 2026-04-09 11:08:00 +09:00
rusty-claude-cli fix(cli): wire /tokens and /cache as aliases for /stats; implement /stats 2026-04-09 21:34:36 +09:00
telemetry feat: anthropic SDK header matching + request profile 2026-04-01 05:55:25 +00:00
tools fix(tools): serialize web_search env-var tests with env_lock to prevent race 2026-04-08 18:34:06 +09:00