@vedmalex/ai-connect 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1207,12 +1207,10 @@ ACP routes are treated as harness-owned connections:
1207
1207
  Tool semantics are intentionally split:
1208
1208
 
1209
1209
  - `api` routes support tool schema passthrough via `parameters.tools`
1210
- - `api` routes also support client-managed tools through `clientTools`
1211
- - `clientTools` are executed locally by `ai-connect` after the provider returns tool calls
1212
1210
  - `parameters.tools` remains the right path for upstream-managed tool schemas that are not executed by `ai-connect`
1213
1211
  - `acp` routes support harness-owned tool execution
1214
1212
  - `acp` routes do not currently forward request-defined tool schema from `parameters.tools`
1215
- - `cli` and current built-in `server` routes do not support tool schema passthrough or tool execution
1213
+ - client-managed tools (`clientTools`) are executed locally by `ai-connect` and work on **all four transports** (since 0.11.0): natively on `api`, via an in-process loopback MCP bridge on `acp` (`session/new.mcpServers`; the agent must advertise HTTP MCP support), and via a shared text-based round protocol on `cli` / `server`
1216
1214
 
1217
1215
  That distinction is also reflected in route capabilities:
1218
1216
 
@@ -1257,11 +1255,13 @@ const result = await client.generate({
1257
1255
  });
1258
1256
  ```
1259
1257
 
1260
- Current limits:
1258
+ `clientTools` semantics (as of 0.11.0 — see `docs/whats-new-0.11.md` for the full matrix):
1261
1259
 
1262
- - `clientTools` are supported only for `generate()`
1263
- - `clientTools` are currently supported only for text requests without attachments/image options
1264
- - built-in local execution of `clientTools` is implemented for built-in API handlers: `openai`, `anthropic`, `gemini`
1260
+ - work in both `generate()` and `stream()` (streaming runs a full multi-round tool loop and emits additive `tool-call` / `tool-result` stream events)
1261
+ - combine with `attachments`/image input on `text`-operation requests: round 1 carries the attachments, follow-up rounds rely on message history; routing is capability-gated (`supportsClientToolExecution` AND `supportsImageInput`/`supportsFileUpload`), an incapable route pool fails fast with `unsupported_capability`
1262
+ - `operation: "image"` / `"file"` combined with `clientTools` is rejected up front with `unsupported_capability` (tool-loop semantics exist only for `text`)
1263
+ - built-in local execution on `api` routes covers the built-in handlers (`openai`, `anthropic`, `gemini`); `acp`/`cli`/`server` execute through their transport bridges (see the tool-semantics list above)
1264
+ - per-model capability hints (curated `MODEL_REFERENCE`) can narrow route capabilities per model — e.g. an embeddings model on a vision-capable provider no longer advertises image input in `listCandidateModels()`
1265
1265
 
1266
1266
  ### Context and MCP Semantics
1267
1267