Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

docs(agent): the cookbook's capability claims against main after #9053

thinhlpg337ba89c8569
diff --git a/docs/src/pages/docs/agent/cli.mdx b/docs/src/pages/docs/agent/cli.mdx
index 571f137a3..98d30503d 100644
--- a/docs/src/pages/docs/agent/cli.mdx
+++ b/docs/src/pages/docs/agent/cli.mdx
@@ -221,9 +221,10 @@ per message, and 16 MiB for one input line. Only `image/png`, `image/jpeg`, `ima
`input_error.line` carries at most the first 4 KiB of it, with `line_truncated: true`: a rejected
line can be as large as the cap it crossed.
-<Callout type="warning">
-Image parts are validated against these caps but **do not reach the model yet**: the request to the
-provider carries only a message's `text` parts.
+<Callout type="info">
+A message's parts travel to the provider as written, images included: a `user` turn keeps its text
+and `image_url` parts in order. Whether a model accepts an image is the model's business, not the
+channel's - a provider without vision answers with its own error.
</Callout>
`decision` is `allow_once`, `allow_always`, or `deny`, and each `request_id` is answerable once. A
diff --git a/docs/src/pages/docs/agent/sdk-tools.mdx b/docs/src/pages/docs/agent/sdk-tools.mdx
index 9d5b51401..cf2ba9d53 100644
--- a/docs/src/pages/docs/agent/sdk-tools.mdx
+++ b/docs/src/pages/docs/agent/sdk-tools.mdx
@@ -247,11 +247,20 @@ own names. Answer with a `tool_result` carrying the same `request_id`:
</Tabs.Tab>
</Tabs>
-- **Validate the arguments yourself.** `args` is what the model produced. Jan does not check it
- against your `parameters` schema before sending the request, so a handler that trusts it acts on
- whatever the model wrote. The examples' handlers check `city` before using it.
-- **`content` is what the model sees**, as a string. There is no separate field for data only your
- UI shows: anything you put in `content` goes to the model.
+- **Ask for the shape you want, then check anyway.** Before the request is emitted, Jan validates
+ `args` against the `parameters` you declared, and a call that breaks the schema never reaches you:
+ the model is told the mismatch and can try again. The check covers `type`, `properties`,
+ `required`, `additionalProperties`, `items`, `minItems`, `maxItems`, `enum`, `const`, `minLength`,
+ `maxLength`, `minimum`, `maximum`, `exclusiveMinimum`, `exclusiveMaximum` and `pattern`; any other
+ keyword is ignored, never failed. A schema is a shape, not a safety property - a handler that
+ moves hardware still checks what it acts on.
+- **`content` is what the model sees.** It is either a string or a content-part array of `text` and
+ `image_url` parts, held to the same caps as a `user` message. The parts' text becomes the run's
+ tool message, and an image follows it as the next user turn - a provider's tool response carries
+ text, so that is where an image can ride. There is no separate field for data only your UI shows:
+ anything you put in `content` goes to the model.
+- **`details` stays yours.** The optional `details` object on a `tool_result` never leaves the
+ client side: it is not in the tool message the model sees.
- **Report a failure, don't drop the call.** `is_error: true` with the reason in `content` reaches
the model as the tool's error, and the turn goes on. An unanswered call holds the run.
- **Each `request_id` is answered once.** A second answer, or an answer to an id that is not
@@ -278,7 +287,7 @@ call after it. Keep stdin open until the `result` arrives.
## Not in the preview yet
-- Images in a tool result: `content` is text.
-- Host tools inside [subagents](/docs/agent/subagents): a subagent is given no host tools.
- Changing the declared set during a run.
-- Schema validation of `args` by Jan.
+
+A subagent's host tool call reaches you exactly as the main run's does, attributed by the child's
+`run_id` (a main-run request carries none); children cannot dispatch children.
diff --git a/docs/src/pages/docs/agent/sdk.mdx b/docs/src/pages/docs/agent/sdk.mdx
index 140d850fe..4f24d1454 100644
--- a/docs/src/pages/docs/agent/sdk.mdx
+++ b/docs/src/pages/docs/agent/sdk.mdx
@@ -75,8 +75,14 @@ Check the build you run rather than trusting a page: the `init` record says what
| Follow-ups, permission answers, `abort` | `init.input_kinds` lists `user`, `permission` and `abort` | Yes |
| [Host tools](/docs/agent/sdk-tools) | `jan cli agent run --help` lists `--host-tools`; `init.input_kinds` lists `tool_result` | No - on `main`, arriving with the next nightly |
| The generated JSON Schema | `jan cli agent schema` exists | No - on `main`, arriving with the next nightly |
-| Several sessions in one process over JSON-RPC | `jan cli agent --help` lists `rpc` | No - on `main`, arriving with the next nightly. It has no host tools yet |
-| Images in a `user` message | `init.input_content_parts` is not `null` | No. Builds from `main` accept and validate them but **do not forward them to the model yet**: only the text parts reach the provider |
+| Several sessions in one process over JSON-RPC | `jan cli agent --help` lists `rpc` | No - on `main`, arriving with the next nightly. `main` also serves host tools over RPC (`session/start` `tools`, `tool/respond`) |
+| Images in a `user` message | `init.input_content_parts` is not `null` | No - on `main`, arriving with the next nightly. `main` forwards the parts to the provider as written, images included |
-Not in any build yet: images in a host tool result, host tools called from subagents, and the
-JavaScript and Python SDK packages. Run `jan update` to move to the newest nightly.
+Not in any build yet: the JavaScript and Python SDK packages. On `main`, two more behaviours arrive
+with the next nightly: an image in a host tool result (it follows the tool message as a user turn,
+since a provider's tool response carries text), and a subagent's host tool call, which reaches you
+like the main run's, attributed by the child's `run_id`. Run `jan update` to move to the newest
+nightly.
+
+Capabilities here were checked on 2026-09-24 against `main` (`cc4927cff`) and the nightly named
+above; a build's own `init` record is the authority.