ultraworkers-claw-code/rust/crates
Jobdori e4c3871882 feat(api): add reasoning_effort field to MessageRequest and OpenAI-compat path
Users of OpenAI-compatible reasoning models (o4-mini, o3, deepseek-r1,
etc.) had no way to control reasoning effort — the field was missing from
MessageRequest and never emitted in the request body.

Changes:
- Add `reasoning_effort: Option<String>` to `MessageRequest` in types.rs
  - Annotated with skip_serializing_if = "Option::is_none" for clean JSON
  - Accepted values: "low", "medium", "high" (passed through verbatim)
- In `build_chat_completion_request`, emit `"reasoning_effort"` when set
- Two unit tests:
  - `reasoning_effort_is_included_when_set`: o4-mini + "high" → field present
  - `reasoning_effort_omitted_when_not_set`: gpt-4o, no field → absent

Existing callers use `..Default::default()` and are unaffected.
One struct-literal test that listed all fields explicitly updated with
`reasoning_effort: None`.

The CLI flag to expose this to users is a follow-up (ROADMAP #34 partial).
This commit lands the foundational API-layer plumbing needed for that.

Partial ROADMAP #34.
2026-04-09 04:02:59 +09:00
..
api feat(api): add reasoning_effort field to MessageRequest and OpenAI-compat path 2026-04-09 04:02:59 +09:00
commands fix(commands): fix brittle /session help assertion after delete subcommand addition 2026-04-08 09:33:51 +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 style: cargo fmt — fix CI formatting failures 2026-04-08 11:21:13 +09:00
rusty-claude-cli feat(cli): populate Git SHA, target triple, and build date at compile time via build.rs 2026-04-08 18:11:46 +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