kcode-k1-chat-websearch-request 0.1.0

Strict WebSearch request parsing for the K1 chat session actor
Documentation
1
2
3
4
5
6
7
# kcode-k1-chat-websearch-request

`parse(arguments: &str, deadline: Instant) -> Result<kcode_k1_codex_websearch::Request, String>` decodes the strict K1 `WebSearch` object. It requires string `query` and `model`, accepts only optional non-null string `reasoning_effort`, and rejects aliases, unknown fields, missing values, nulls, nonstrings, and non-object JSON with `WebSearch failed: invalid arguments`.

The model must begin with exact case-sensitive `codex/`; `parse` strips that prefix once or returns `WebSearch failed: unsupported model route; expected model to begin with "codex/"`. It preserves decoded strings and the supplied deadline exactly, and defaults omitted effort to `medium`.

Parsing is linear in the argument bytes and performs no I/O, scheduling, or provider work.