Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Sdk?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/getstream-sdk)
---
name: sdk
description: How to build an SDK for the acceleration backend
---
* we use openAPI, so generate your SDK from the openAPI spec
* some endpoints are server side only. such as configuring agents, or listening to agent dispatch
## Resource methods, never raw requests
Every resource gets a clean, named API: `client.simulations.create(...)`, `client.simulations.update(id, ...)`,
`client.simulations.run(id)`, `client.simulations.runs.get(id)`. The generated client is the layer
underneath, not the public API. Users, examples and docs never write `client.post("/v1/agents/simulations", ...)`,
call generated operation functions (`CreateSimulationWithResponse`), or import generated modules. Go is the
one exception to the last: its generated package, `acceleration`, is also where the models are, so a Go
program imports it for types such as `acceleration.ModelOverwrites` and never calls its operations.
```js
// never
const simulation = await client.post("/v1/agents/simulations", { body });
// always
const simulation = await client.simulations.create(body);
```
* Group by resource, and nest sub-resources: `simulations.runs.list()`, `agent.sessions.create()`.
* Use the standard verbs: `create`, `get`, `list`, `update`, `delete`, plus actions named after the endpoint (`run`, `cancel`, `fork`).
* Take keyword arguments or the language's options struct, and return the typed model.
* A new endpoint isn't finished until it has a resource method in Go, and the docs use that method.
## Supported SDKs
Client side: JS (browser), Swift, Kotlin, Dart/Flutter
Backend: Go, Python, .NET, Ruby, Rust, PHP, JS (Node)
## SDK best practices
Do deep research on SDK best practices. Use OpenAI sol for this using the tokens available in .env
Based on this deep research create an sdk-mylanguage skill in this repo
## Security
These rules hold for every SDK, client and server side. Reject a change that breaks one,
whatever the language skill says. A change to credentials, tokens, signing or what a device
may reach also gets a review with the [security](../security/SKILL.md) skill.
### Dependencies
1. Audit every dependency before adding it: who maintains it, when it last released, its open
advisories, its licence, and how many packages it pulls in. Write the reason in the
language skill's Dependencies section.
2. Prefer the standard library. If no dependency is good enough, write the code instead, but
never hand-roll TLS, WebSocket framing, or a cryptographic primitive. Signing an HS256 JWT
with the standard library's HMAC is fine; implementing HMAC is not.
3. Keep the dependency list clean. Remove a dependency once nothing uses it, and keep test and
build tools out of runtime dependencies.
4. Hide dependencies from the SDK's public API: no dependency's type in a public signature, so
one can be swapped without breaking callers. The exceptions are standard interfaces
(`ILogger`, PSR-3, PSR-18, `slog`).
5. Make heavy or optional dependencies optional, as PHP's socket worker sits under `suggest`.
6. CI scans for known vulnerabilities on every PR and on a schedule: `govulncheck`,
`pip-audit`, `npm audit`, `dotnet list package --vulnerable`, `bundle-audit`,
`cargo audit`, `composer audit`. A high or critical advisory fails the build.
7. Pin what CI builds with (lockfiles, `go.sum`, `go mod verify`), but give a library a version
range its users can resolve. Never run an install script: no `postinstall`, and no
Composer plugins allowed.
### Credentials
1. The API secret exists only in server-side SDKs. A client-side SDK never takes one, never
mints a server token, and only reaches operations marked `x-client-accessible`. It works
with a user token that the app's backend minted.
2. Credentials travel in headers, never in a URL, query string or WebSocket subprotocol: URLs
end up in logs, proxies and browser history. A URL that has to carry a token, such as a
monitor link, is short-lived, documented as a secret, and never logged. The one other
exception is a browser's socket, whose WebSocket sends no headers: it carries the end user's
own token in the query, and nothing more. A server-side SDK's socket sends its credential as
headers, as its requests do, since its token speaks for the whole app.
3. Tokens are short-lived by default. A minted user token has an expiry unless the caller asks
for none.
4. A credential is never printed. A type that holds one masks it in every rendering the
language has: `String()`/`LogValue()` in Go, `__repr__` in Python, `Debug` in Rust,
`ToString()` in .NET, `inspect` in Ruby, `__debugInfo` in PHP, `toJSON` and `inspect` in JS.
Logging follows the "Logging (server-side SDKs)" section.
5. No credential is written to disk by the SDK. `.agent_sync` holds a hash and a time. A
client-side SDK keeps a user token in the platform's keystore (Keychain, Android
Keystore), or in memory in a browser, never in `localStorage` or plain preferences. The
exception is a guest, whom `guestUser` exists to remember across reloads: their token and
refresh secret belong to that one guest and expire. A browser keeps them in `localStorage`,
falling back to a `Secure` cookie only where localStorage is missing, blocked or full, never
in a cookie first: a cookie goes out with every request to the app's own site.
6. An error never carries a credential or a full request: no headers, no body that held a
secret. It carries the status, the operation and `request_id`.
7. Compare secrets and signatures in constant time (`hmac.Equal`, `hmac.compare_digest`,
`CryptographicOperations.FixedTimeEquals`, `OpenSSL.fixed_length_secure_compare`,
`hash_equals`, `crypto.timingSafeEqual`). An SDK that verifies a signed payload, such as a
webhook, also refuses one whose timestamp is outside its tolerance, so it cannot be replayed.
### Transport
1. HTTPS and WSS only, with certificate and hostname verification always on and no option to
turn it off. Plain `http`/`ws` is allowed only for a URL the caller named explicitly, such
as a local router.
2. Never send `Authorization` across origins: a redirect to another host drops it or fails.
3. Every request and socket has a timeout, and every read has a size limit: response body,
socket frame, downloaded file. A hostile or broken server must not exhaust memory.
4. Escape every value placed in a path (`/v1/agents/sessions/{id}`), so an id cannot reach
another endpoint.
### Untrusted input
1. Treat everything the router, a provider or a model sends as untrusted. Read it tolerantly,
but within bounds. An unknown frame is skipped; nothing is evaluated.
2. No unsafe deserialisation: YAML is safe-loaded with aliases off (`Psych.safe_load`,
`yaml.safe_load`), and never `pickle`, `Marshal`, `unserialize` or `BinaryFormatter`.
3. Folder sync reads only inside the agent folder: refuse `..`, absolute paths, and symlinks
that leave it, cap file sizes, and read only text.
4. Tool arguments come from a model, which a user can steer. Check them against the tool's
schema before the tool runs, keep tool results bounded, and document that a tool must check
permissions itself. `require_approval` exists for tools that change things.
5. A browser SDK posts and accepts `postMessage` only for an exact origin, never `*`. The
connector handoff comes only from the `return_url`'s origin or the dashboard's.
### Release
1. Publish from CI with trusted publishing (OIDC) and provenance where the registry supports
it, never with a token stored in a repo or on a laptop. Registry accounts require MFA
(`rubygems_mfa_required`).
2. A fork's pull request never sees a publishing secret.
3. Check what a package contains before publishing: no `.env`, no test credentials, no local
config. Install the built artifact into an empty project and import it.
4. Generated code is committed and CI regenerates it to check, so a hand edit or a tampered
generator shows up as a diff.
5. A vulnerability is reported through `SECURITY.md`, and a fixed version is released for
every supported major. A Go version found broken is retracted, never moved.
### Tests
Every SDK tests these, against its stand-in router:
1. A planted secret and token never appear in an error, a log record or a printed client.
2. A certificate the client does not trust is refused.
3. A redirect to another origin does not carry `Authorization`.
4. An oversized response or frame fails cleanly, without exhausting memory.
5. A client-side SDK cannot reach an operation that is not `x-client-accessible`.
## Where to place the SDK
sdks/mylanguage
## Folder sync structure
The structure of an agent folder is like this
- agent.yaml (use this to detect/validate the folder for syncing)
- instructions.md
- guardrail.md
- skills
- knowledge (markdown files and urls)
- simulations (`*.yaml`, each a list of simulations: `name`, `scenario`, `assertion`, and optionally `mode`, `variations`, `max_turns`, `caller_target`, `judge_target`, `caller_stt`, `caller_tts`, `caller_voice`, `tags`)
For a router a folder can also contain router.yaml
Every backend SDK has a sync method which syncs the folder to the go acceleration backend
In .agent_sync store the sync status:
- hash of the files last synced
- when the last sync happened
This setup prevents duplicate syncs when they nothing changed.
The stamp says what was last sent, not where. Trust a matching stamp only when the stored config's
`sync_hash` is that hash too, so a directory synced to a local router and then pointed at a hosted
one (or another app) is synced there, not skipped. JavaScript and Go do this. Python
(`plugins/stream`), .NET, Ruby, Rust and PHP need to check theirs.
## SDK updates
Each SDK has an `.sdk_update_log` file naming the spec, this skill and the notes it was last updated against, as git ids:
```text
spec <git blob id of acceleration/api/openapi.yaml>
skill <git blob id of .claude/skills/sdk/SKILL.md>
notes <git tree id of .claude/skills/sdk/notes>
```
An id is the content's own, so it survives a squash merge where a commit SHA from a branch would not,
as long as the branch's copy is what lands on `main`: if another PR changed the same files first, the
merged result is a new id. What changed since is `git diff <spec> HEAD:acceleration/api/openapi.yaml`, the
same with `skill` for the older notes further down this file, and `git diff <notes> HEAD:.claude/skills/sdk/notes`
for the note files added or changed since. A log with no `notes` line has every note file to read. If git
answers `bad object` for a logged id, that id never reached `main`: read every note file. That is how an
update finds the few fields it has to add. After updating an SDK, write the ids of what it now matches:
`git rev-parse HEAD:acceleration/api/openapi.yaml`, `git rev-parse HEAD:.claude/skills/sdk/SKILL.md` and
`git rev-parse HEAD:.claude/skills/sdk/notes`. For files not yet committed, use `git hash-object <file>`
for a blob, and for `notes` run `git add .claude/skills/sdk/notes` and then
`git write-tree --prefix=.claude/skills/sdk/notes/`.
Generated code that CI checks is the exception. Regenerate it for every SDK in the same PR, with the commands in
«Regenerate the HTTP layer» in `acceleration/README.md`. The note is for hand-written code only.
A note for the other SDKs is a new file in `notes/`, named `<YYYY-MM-DD>-<ticket or short slug>.md`, never
a paragraph added to this file: with one file per PR, two open PRs never conflict over their notes. A later
PR that settles part of a note for some SDKs edits that note's file. The notes further down this file are
the ones from before `notes/` existed; they stay where they are.
## Client side SDKs
* Expose nice stateflow in Kotlin, or your language equivalent so it's easy to customize
* Use the modern UI frameworks (compose or swiftUI)
What each ships:
* JS: one package, `@stream-io/stream-agents`, for Node and the browser, with chat and video as its `chat` and
`video` entry points over the optional peers `stream-chat` and `@stream-io/video-client`.
* Swift: one package, `core` (`StreamAgents`), with voice and chat in it. Its views are Stream Chat's AI
components (`StreamChatAI`).
* Kotlin: one module, `core` (`io.getstream.agents.android.core`), with voice and chat in it. Its views
are Stream Chat's AI components (`stream-chat-android-ai-compose`).
* Dart: one Flutter package, `stream_agents`, with core (state and API), chat (the conversation's Stream
Chat channel) and rtc (voice and video over Stream Video) kept apart inside it. Its views are Stream
Chat's AI components (`stream_chat_flutter_ai`), composed in `examples/voice_agents/flutter_demo`.
Swift, Kotlin and Dart generate only the operations the spec marks `x-client-accessible`: each generator audits
its list against the spec, and posture tests check what the generated client can reach. JS types every
operation, since it serves Node too, and the router refuses a browser the server-side ones. Stream is set up
once, as its note below says: the key, user and token from `setUser` are the one identity for the router,
Stream Chat and Stream Video. Generated code is committed. `.github/workflows/client-sdks.yml` regenerates the Kotlin code and fails on a diff.
It also runs Dart's `dart run tool/generate.dart --check` and Swift's `generate.py --check`, which does not
regenerate. JS's `npm run types -- --check` runs in `ci-sdks.yml`.
Here is an example of the syntax the JS SDK. Do something similar for other SDKs, but keep it aligned with the language best practices
```js
import { Client } from "@stream-io/stream-agents";
const api = new Client({ url: accelerate, apiKey });
await client.setUser(
{
id: "jlahey",
name: "Jim Lahey",
},
"{{ user_token }}",
);
const agent = api.agent(“docs”);
const options = {incognito: true/false, custom: {}, title: “”, description: “”, model_overwrites: {thinking: high}, project=”Health”}
const session = agent.sessions.create(options);
const oldSessions = agent.sessions.query(); # support search
const oldSessions = agent.sessions.search(); # support search
session.responses.create(“Is Stream better than Sendbird?”)
session.responses.items() // list of responseItems for actions on them/rewind
session.responses.rewind(responseItem) // go back to a response and continue from there
session.interrupt()
session.fork(options) // similar options to channel creation
// one method changes a session: title, description, custom, instructions, models, voice
session.update({title: "Pricing", llm: "openai/gpt-5"})
agent.sessions.update(sessionId, {title: "Pricing"}) // an ended session can still be renamed
```
### Updating a session
Changing a session is one method named `update`, spelled the way the language spells it:
`session.update` (JS, Python, Ruby, Rust, Dart, Kotlin, Swift, PHP), `session.Update` (Go),
`session.UpdateAsync` (.NET). It calls `PATCH /v1/agents/sessions/{id}` (`updateSession`)
and returns the session as it now is. Take the generated `UpdateSessionRequest` or the
language's keyword arguments; a field left out is left as it is.
* Editable: `title`, `description`, `custom`, `instructions`, `llm`, `stt`, `tts`, `sts`,
`subagent`, `voice`, `thinking`, `temperature`, `max_output_tokens`, `verbosity`.
* Not editable: `id`, the call, `incognito`. Fork for a session that differs in those.
* A session that ended accepts only `title`, `description` and `custom`, so also offer
`agent.sessions.update(id, ...)` for renaming one without a live handle.
* A device may call it too, but only for `title`, `description` and `custom`; anything else
is a 403. A client SDK (Swift, Kotlin, Dart) offers `update(title:description:custom:)`
and nothing more.
* Don't add separate `setInstructions` / `updateSettings` methods for new SDKs; the
`/instructions` and `/settings` endpoints are deprecated.
```js
Guest users
user = client.guestUser(options); // gets or creates a guest user (remembered in localStorage or device storage; a cookie only as a fallback)
client.claimGuestUser(guestUser, realUser); // only supported server side.
```
## Server side SDKs
* for server side we just provide 1 sdk per language
* starting an agent for an inbound call, text message, whatsapp message, slack message etc
* placing an outbound call
* syncing the folder config for an agent
Include Stream's server side SDK as a dependency.
Here's an example of python
Normal call
```
async def create_agent(**kwargs) -> Agent:
agent = Agent(
config="simple_voice_ai",
cost_tracking={env: "production"},
memory_filter={user_id: 123}, # memory visibility
)
return agent
async def join_call(agent: Agent, call_id: str, **kwargs) -> None:
async with agent.join(call_id):
await agent.responses.create("greet the user in one short sentence")
```
Inbound call
```
dispatch = acceleration.StreamDispatch()
@dispatch.wait_for_call() # websocket based
async def inbound_call(call: acceleration.CallContext):
agent = Agent(
config="restaurant_orders",
)
async with agent.join(call):
await call.wait_for_phone_participant()
await agent.responses.create(
"greet the user and let them know you're a friendly AI agent"
)
```
Outbound call
```
agent = Agent(
config="recruiter_voice",
)
async with agent.outbound_call(
from_=os.environ["OUTBOUND_FROM"],
to=os.environ["OUTBOUND_TO"],
call_id="hello",
):
await agent.responses.create(
"greet the user and let them know you're a friendly AI agent"
)
```
Text/ respond cycle
```
async def create_agent() -> Agent:
return Agent(config="chat_support")
@dispatch.wait_for_message()
async def inbound_message(message: acceleration.InboundMessage):
agent = await dispatch.get_or_create_agent(message, create_agent)
await agent.responses.create(message.text, images=message.images)
```
Sandbox
Call it the sandbox, never the VM: in method and type names, parameters, comments, logs, errors, READMEs and docs.
```
agent = Agent(config="chat_support", sandbox=Daytona())
```
Knowledge
```
page = await agent.knowledge.add_url(QUICKSTART)
```
Router for STT
```
router = client.router("clinic") # "clinic" is a router config; it holds the target
async with router.stt.realtime() as stt:
await stt.process_audio(chunk, CALLER)
```
Two rules for the router, in code, examples, READMEs and docs:
* The router comes from the client: `client.router("clinic")` (`stream.NewClient(backend).Router("clinic")` in Go, `client.Router("clinic")` in
.NET). Never construct it standalone (`Router("clinic")`, `new Router(...)`, `Router::new(api)`),
because the client is where the URL and credentials were settled, and a router built on its own
quietly rebuilds a backend from the environment.
* Which model answers (`target`, such as `en-low-latency`) lives in the router config
(`routers/<name>/router.yaml` or `configure_stt`/`define_router`), never in the `realtime()` call.
`realtime()` takes only per-call overrides like `diarize`, `keyterms` or `voice`. Wrong:
`router.stt.realtime(target="en-low-latency")`. Right: put `target: en-low-latency` under `stt:`
in the config and call `router.stt.realtime()`.
## Asking goes through responses.create
The Go SDK has no `session.Respond`: every question is `session.Responses.Create(ctx, text, inputs...)`,
which returns the response id and takes images and clips. The socket `respond` frame is left for the
router, not wrapped by an SDK. Every SDK has moved: the `respond`, `RespondAsync` and `send` wrappers are gone.
The request id is the SDK's, never the caller's. responses.create generates a fresh random `request_id`
(a UUID or 32 hex characters) for every text-only question, on every session, and sends it, so a retry
of the same request is answered once. A question with images sends none, because a photo sent with a request id
must be a data URI. A question with clips sends one (AI-2515). A session not kept in Stream Chat ignores it, so an
SDK never checks whether a conversation is kept. No SDK offers a `request_id` (or the old `command_id`) option on responses.create for an id of the caller's own,
and docs never mention it. The one id a caller passes on is the dispatch worker's: answering an inbound
message sends back that message's `request_id`, through the SDK's answer helper (`client.RequestID` in Go, an
input that exists for that alone).
`listSessions`, `searchSessions`, `listResponses` and `listResponseItems` page by cursor now (see the
`pagination` skill): `cursor` replaces `offset`, and each returns `{items, has_more, next_cursor}`
instead of an array. Every SDK has moved.
`createSession` takes an optional `id` (a UUID the caller chose) and answers 409 when a session already has it; generated ids are UUIDv7. Every SDK exposes it.
A session is changed with `update`, backed by `updateSession` (`PATCH /v1/agents/sessions/{id}`): title, description, custom, instructions, models and voice in one call. `setSessionSettings` (`PATCH .../settings`) is deprecated. Every server SDK has moved (`session.update`, `Update` in Go, `UpdateAsync` in .NET). `updateSession` is now `x-client-accessible`: a device may change its own session's title, description and custom, and is refused with a 403 for instructions, models or voice. Go is regenerated. Swift, Kotlin and Dart need `session.update(title:description:custom:)` (and `sessions.update(id, ...)`), and the server SDKs only need regenerating, since `UpdateSessionRequest` is now rendered from Go.
Credentials come from the environment. A client built with no arguments reads `STREAM_API_KEY` and `STREAM_API_SECRET` itself, so examples, READMEs and docs write `new Client()` (or the SDK's equivalent), never `new Client({ apiKey: process.env.STREAM_API_KEY, apiSecret: process.env.STREAM_API_SECRET })`. Pass them explicitly only when they come from somewhere other than those variables. Go, JavaScript, Python (`plugins/stream`), Ruby, PHP, .NET and Rust already fall back to them; any SDK that does not should, and snippets that pass them by hand should drop them.
`listSessions` and `searchSessions` are replaced by `querySessions` (`POST /v1/agents/sessions/query`), which takes `{filter, sort, limit, cursor}` in the body (see the `query` skill). The filter allows `agent`, `user_id`, `project_id` and `modality` (a bare value or `{"$eq": ...}`) and `text: {"$q": ...}`. It sorts by `updated_at`, or by `relevance` for a text search, which cannot be combined with `project_id`. `project` is now `project_id` on `createSession`, `forkSession` and `Session`. `Session` gains a required `modality` (`text`, `voice` or `video`). Every SDK has moved (Go: `Query.ProjectID`, `Query.Modality`, `SessionOptions.ProjectID`, `ForkOptions.ProjectID`, `Call.ProjectID`). The old `custom`, `created_after`/`created_before` and `offset` filters are gone with them.
Memory can be deleted. `truncateMemories` (`DELETE /v1/agents/users/{user_id}/memories`) deletes everything remembered about one user, from every session and agent; `deleteSessionMemories` (`DELETE /v1/agents/sessions/{id}/memories`) deletes what one session learned. Both answer 204 and are server-side only. Stopping a session (`stopSession`, what `close` calls) keeps its memories, so never wipe memory from `close`. Name them `memories.truncate(userId)`, `sessions.deleteMemories(id)` and `session.deleteMemories()`, spelled the way the language spells them. Every server SDK has moved (Go: `Client.Memories().Truncate`, `Sessions.DeleteMemories`, `Session.DeleteMemories`). Swift, Kotlin and Dart leave them out, being server-side only.
`closeSession` (`DELETE /v1/agents/sessions/{id}`) is split in two. `stopSession` (`POST /v1/agents/sessions/{id}/stop`) is what ending a call does: the agent leaves and everything the session recorded and remembered is kept. `deleteSession` (`DELETE /v1/agents/sessions/{id}`) now deletes the session: it stops it if it is running, deletes its turns and items, and deletes what it taught memory. Both answer 204 and are client-accessible. A conversation in writing is normally left running, so `close` should only stop a call. Every SDK has moved: `close` stops (including when the socket failed to open) and `delete` deletes.
An agent config can be changed in part. `patchAgentConfig` (`PATCH /v1/agents/configs/{id}`) takes an `AgentConfigPatch` and writes only the fields sent, so a guardrail or instructions can be set without restating everything else; `updateAgentConfig` (PUT) and `syncAgent` still replace instructions, guardrail, skills and knowledge. Server-side only. Name it `updateConfig` on the agent handle, spelled the way the language spells it: look the config up by the agent's name, then patch it. Every server SDK has moved (Go: `client.Agent.UpdateConfig`).
Simulations need resource methods (see "Resource methods, never raw requests"): `simulations.create/get/list/update/delete/run` and `simulations.runs.get/list/cancel`. JavaScript, Python, .NET, Ruby, Rust and PHP have them (`client.simulations`, `client.simulations.runs`). Go still only has the generated `CreateSimulationWithResponse` and needs them. Swift, Kotlin and Dart leave them out, being server-side only.
An agent folder can declare simulations in `simulations/*.yaml`. Each file is a list, so related simulations can share a file, and names must be unique across files. `syncAgent` (now declared in Go with Huma) takes them as `simulations: [SimulationDeclaration]`. When the field is sent, the router makes the config's simulations exactly that list: each is found by name and updated in place, so its runs stay attached, and one no longer declared is deleted. When the field is left out, the stored ones are left alone. So send `simulations` only when the folder has a `simulations/` directory, and send an empty list when that directory is empty. Refuse unknown keys, as with `agent.yaml`. The fingerprint appends `"\nsimulations:"` and then each simulation's JSON (field order as in the Go `agents.Simulation`), only when `simulations/` exists, so folders without one keep their current hash. Every server SDK has moved, with fingerprints checked against Go's (`agents.Folder.Simulations`, sent by `Agent.Sync`). `syncAgent` now validates its body, so a skill must carry `config_id` (every SDK already sends `""`).
`Policy` (`getAppPolicy`, `updateAppPolicy`, `getOrganizationPolicy`, `updateOrganizationPolicy`) gains `allowed_models` and `tags`. `allowed_models` is a list of `provider/model` names the router may route to in every modality: left out allows every model, an empty list allows none, and an app is held to the models both it and its organization allow. `tags` are recorded on every usage row over the request's own, with the organization's winning over the app's. Keep the difference between an absent and an empty `allowed_models` when (de)serialising, since they mean opposite things. Every SDK has the fields in its regenerated client; none wraps the policy endpoints yet.
An agent config has a `speed`: the voice's rate of delivery, 1 being its own, zero or absent leaving it there. It is on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest`, and an agent folder's `agent.yaml` may declare `speed:` (send it only when the file names a non-zero one). Only voices that can change speed are routed to when it is set (ElevenLabs flash v2.5 and multilingual v2 today, 0.7–1.2). Every SDK has the field, and every server SDK's folder loader accepts `speed` (Go: `agents.Settings.Speed`).
An agent config has `visible_tools` (on `AgentConfig`, `AgentConfigRequest` and `AgentConfigPatch`): tool names or `path.Match` patterns such as `athena_*` whose steps end users see on a persistent conversation's replies. Empty shows `search` and `web_search`. Every SDK has the field in its regenerated client.
A session tool (`SessionTool` on `createSession`) gains `executor` (`server`, the default, or `client`: a person's device runs it) and `display_title` (at most 80 characters, shown on the reply's `ai_tool_call` attachment), and `RespondRequest` gains `client_id`, the install a command came from, which a client tool called while answering it is addressed to. A client tool is still answered over the events socket, once the device has reported. Every SDK has the fields in its regenerated client. Swift, Kotlin, Dart, Ruby, Rust and PHP expose `executor` and `display_title` where they declare tools; .NET exposes only `display_title`, and Python neither, since its tools come from the core `FunctionRegistry`. No SDK sends `client_id`: it is only on the socket `respond` frame, which SDKs no longer wrap, and `createResponse` has no such field, so a client tool can't yet be addressed through `responses.create`.
`querySessions` takes two more filter fields, `state` (`live` or `ended`, as `Session.state` reports it) and `agent_id` (the id a session was created with), each a bare value or `{"$eq": ...}`, so a caller can list a user's live sessions without paging through every one that ended: `{"filter": {"user_id": "u1", "state": "live"}}`. Every SDK has moved (Go: `Query.State`, `Query.AgentID`). Kotlin leaves out `user_id`, which only a backend may set.
The harness is agent config, never session config. `createSession` no longer takes `subagent`, `tasks`, `sandbox`, `skills` or `skill_names`, and `subagent` is gone from `model_overwrites` and `updateSession`; the router ignores them if sent. `tools` and `tool_timeout_ms` stay, which is how a client runs its own sandbox (artemis-impl's `investigate_sdk`). `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` gain `harness` (an enum with one value, `default`; absent means `default`), next to the `subagent`, `sandbox` and `skills` they already had, and `agent.yaml` may declare `harness:`. Go has moved: `stream.Call` lost `Subagent`, `Tasks`, `Sandbox` and `Skills`, `stream.Config` lost `Subagent`, and `agents.Harness` (`Name`, `Subagents`, `VM`, `Skills`) is written by `Agent.Sync` onto the config rather than onto each session, so a session only gets it by running under that config. Every SDK has moved: the session-level options (and `use_skills`/`tasks` on the harness) are gone, and every server folder loader reads `harness:`.
A knowledge page can be read again on a schedule. `KnowledgeUrlRequest` (`addKnowledgeUrl`), `KnowledgeUrlDeclaration` (in `syncAgent`) and `KnowledgeUrl` gain `refresh_hours`, how many hours between reads; absent means never, which is what it was before. Adding a page again replaces it, so a declaration without it turns the schedule off. In `knowledge/urls.yaml` a page written as a mapping may say `refresh_hours: 24` (at least 1; refuse 0, a non-integer and unknown keys as before). The fingerprint appends `"\nrefresh_hours:" + N` after a page's description only when it has one, so directories without it keep their current hash. Every server SDK has moved (Go: `agents.KnowledgeURL.RefreshHours`). JavaScript has no add-url method, so only its loader reads it.
A dispatch worker can host tools for an agent: after every `ready` it sends `host_tools` (`agent_id`, `tools`, `timeout_ms`), runs each `tool_call` off the read loop and answers `tool_result` with `output` or `error`; `hosting_refused` ends the worker. The router offers them to a session whose `agent_id` or config name matches. Go, JavaScript (`dispatch.host`), Python (`stream.Dispatch.host`), Ruby, PHP, .NET (`Dispatch.Host`) and Rust all have it. Python and .NET also reconnect like Go; JavaScript, Ruby, PHP and Rust re-declare on each `ready` but do not reconnect.
`getAppSettings` (`GET /v1/settings/app`) reports what the router does for the calling app. Its `stream` block says whose Stream app the router acts in (`tenancy`: `deployment` or `app`), which app the app's conversations, transcripts, calls and phone lines are written into (`writes_into`: `this_app`, `deployment_app`, the router's own and shared, or `nowhere`), and whether that app holds the `agent` channel type and call type (`channel_type` and `call_type`: `present`, `missing`, `unsafe` for a channel type a client could forge a conversation's channel with, or `unknown` when Stream could not be asked), with `checked_at`. It is read-only, server-side only, and never carries an app id or a secret. Name it `settings.app()`, spelled the way the language spells it. Go has moved (`client.Settings().App`). JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the method added.
`Policy` gains `require_own_stream_app`: in app mode an app it applies to is never written into the router's own Stream app for want of one of its own, and what it wrote there before can only be read. True at either scope requires it. An app may set its own over `updateAppPolicy`; an organization's is the operator's (`router stream-apps require --org`), refused over `updateOrganizationPolicy` and kept as it was by every write there. Go has the field in its regenerated client. Python (`plugins/stream`), JavaScript, Swift, Kotlin, Dart, .NET, Ruby, Rust and PHP need their generated clients regenerated and the field exposed wherever they wrap the app policy.
The router holds a dispatch worker to the capacity it declared. A worker connects with `capacity`,
`active` (the calls and messages it is still handling, `0` on a first connection; hosted tool calls never
count) and `handles` (`call`, `message`, both, or empty for a worker that only hosts tools). Every `call`
and `message` frame carries a `work_id`, and the worker answers `{"type": "done", "work_id": ..., "error":
...}` once it is finished, failure and missing handler included, which is what gives it its room back.
There is no `accepted` or `rejected` any more. Go, Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust
and PHP all do this.
An agent can leave text to its server. `agent.yaml` may say `dispatch: {incoming_call: enabled, text:
enabled}` (each `enabled` or `disabled`), sent as `dispatch` (`AgentDispatch`) in `syncAgent`, and readable
and patchable on the config. With `text` enabled, what an end user writes over the session socket or in
Chat goes to a dispatch worker as a `message` frame instead of the model, carrying `session_id`, and
`request_id` when it was sent as one, possibly with no channel. `incoming_call` is stored only, since
every inbound call is already dispatched. Every server SDK reads `dispatch:`, exposes the session and
request ids on its inbound message, refuses such a message in its get-or-create helper, and has `answer`
(`Answer` in Go, `AnswerAsync` in .NET): responses.create on the message's session with its `request_id`,
as the server acting for the writer. Acting for somebody needs its own backend setting, because a user id
behind the proxy mints a user token, and the router hands a user's text back to the worker: Go
`Backend.ActingFor`, Python `Backend.acting_for`, JavaScript `Backend.actingFor`, Ruby `Backend#acting_for`,
Rust `Client::acting_for`, PHP `Backend::onBehalfOf` (its `actingFor` already meant a user token) and .NET
`VisionAgentsClient.ActingFor` (Go's is deprecated, AI-3396). They send the server credential plus `X-Stream-User-Id` in every mode.
`SttOptions` gains `eager_end_of_turn` (boolean, live only): the router turns it into Deepgram Flux's
`eager_eot_threshold` (0.6, never above `eot_threshold`), and every other model ignores it rather than
refusing it. It is on by default for `en-low-latency` and `multilingual-low-latency`. Every SDK with STT has it.
The router comes from the client and its target from the router config (see "Router for STT"). Every
SDK with a router has moved: `client.Router` (Go, .NET), `client.router` (Python, Ruby, Rust, PHP) and
`agents.router(config:)` (Swift, Kotlin, Dart). Constructing one directly is internal everywhere except
Python, where `Router(...)` stays for the `url`/`customer_id` case. JavaScript has no router yet; when it
gets one, start from `client.router(name)`.
Connector definitions can be listed, read and added. `listConnectors` (`GET /v1/agents/connectors`, with `q`, `limit` and `cursor`, answering a `ConnectorPage`), `getConnector` (`GET /v1/agents/connectors/{id}`) and `createConnector` (`POST /v1/agents/connectors`, a `CustomConnectorRequest` for a custom connector, an MCP endpoint or an http API (`.claude/skills/sdk/notes/2026-11-24-ai-3676.md`), whose id starts with `custom_`) are all server-side only. A `Connector` shows the schemes, inputs, scopes and `client.registration` (where the OAuth client may come from, a list of `ConnectorClientRegistrationMethod`), never endpoints or the operator's client variables. Name them `connectors.list/get/create`, spelled the way the language spells them, with `list` following the cursor like `Items.Unwind`. Go has the regenerated client (`ListConnectors`, `GetConnector`, `CreateConnector`) and no resource methods yet. JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the three methods added. Swift, Kotlin and Dart need nothing, since none of the three is client-accessible. The schemas were named `ConnectorDefinition` and `ConnectorDefinitionPage` until October 5; they are `Connector` and `ConnectorPage` now, while the store keeps `ConnectorDefinition` for one stored revision. JavaScript and Python have the renamed generated types; .NET, Ruby, Rust and PHP pick the rename up when they regenerate.
Plugins, `plugin_events` and `mcp_servers` are removed (AI-1757): catalog plugins, their logins, options, events and logos, and MCP servers named by URL, were replaced by connectors (a built-in connector, or a custom one for a server's URL). The notes that described them are gone; what is left is the refusal: agent.yaml refuses the keys (AI-1784, AI-2531), the router answers a non-empty list with a 400 (AI-2538), and the generated clients no longer carry their types (AI-2772).
An agent config has `sandbox_options` (on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest`): `image`, `setup` (shell commands), `timeout_ms` (at most 1800000), `cpu`, `memory_gb` and `disk_gb`, saying how the Daytona sandbox is built and how long one run may take. `agent.yaml` may declare `sandbox_options:` with the same keys except `timeout`, a duration such as `5m` sent as `timeout_ms`; refuse unknown keys, a timeout over 30m and sizes that are not whole numbers, and send it only when the file has the block. `task_settled` frames gain `files`, a list of `{name, mime_type, url, size}` for what the subagent's code handed back. Go (`agents.SandboxSettings`, `stream.Event.Files`) and Python (`SandboxSettings` in `plugins/stream`, `RemoteEvent.files`) have moved. JavaScript, .NET, Ruby, Rust and PHP now read `sandbox_options` in their folder loaders and send it on sync, and their generated clients are regenerated; they still need their task-settled events to carry `files`. Swift, Kotlin and Dart only need `files` on their event, since config is server-side.
The agent config field `subagent` is now `thinking_llm`, on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch`, `SyncAgentRequest`, `Session` and `Call` (whose `subagent_used` is now `thinking_llm_used`), and `agent.yaml` names it `thinking_llm:`; an old `subagent:` key is refused as unknown. Only a voice agent may name one: the router answers 400 for a text agent that does, and a text session runs its skills on its own `llm`. Go, Python (`plugins/stream`, `define_agent(thinking_llm=...)`) and JavaScript have moved. .NET, Ruby, Rust and PHP need their folder loaders, generated clients and sync requests renamed. Swift, Kotlin and Dart need their generated `Session` and `Call` models regenerated (Swift's generated code is stale apart from this).
`SessionFilter` gains back `config_id`, `custom` and `created_at`, the three the move to `querySessions` dropped: `config_id` is an `$eq` on the agent config that ran the session, `custom` is the pairs a session's custom object must all hold, and `created_at` is a `TimeRange` `{$gte, $lt}`, half open so two windows that meet share no session. The Go SDK's `Query` takes them as `ConfigID`, `Custom`, `CreatedAfter` and `CreatedBefore`, and the Go, Python, JavaScript and Swift generated clients are regenerated. JavaScript, .NET, Ruby, Rust and PHP need the same four fields on their session query and their generated clients regenerated.
Connector connections can be created, listed, read and deleted. `createConnection` (`POST /v1/agents/connections`, a `ConnectionRequest` with `connector_id`, `owner` `{type: app | user, user_id}`, `auth_scheme`, `inputs` and `label`, answering 201), `listConnections` (`GET /v1/agents/connections`, with a required `owner_type` plus `connector_id`, `limit` and `cursor`, answering a `ConnectionPage`), `getConnection` (`GET /v1/agents/connections/{id}`) and `deleteConnection` (`DELETE /v1/agents/connections/{id}`, with `force`, answering 204, or 409 while an agent config binds it as its fixed connection) are all server-side only. A user-owned connection is made, listed and reached only by the backend acting for that user (`X-Stream-User-Id`, the same acting-for setting as `answer`), and `owner.user_id` must equal it; another user's is a 404 like a missing one. Name them `connections.create/list/get/delete`, with `list` following the cursor like `Items.Unwind`. Go (`CreateConnection`, `ListConnections`, `GetConnection`, `DeleteConnection`), Python (`plugins/stream`) and JavaScript have the regenerated clients and no resource methods yet; they need the four methods added. .NET, Ruby, Rust and PHP need their generated clients regenerated and the four methods added. Swift, Kotlin and Dart need nothing, since none of the four is client-accessible. `ConnectionOwnerType` shares `user` with `AgentLogSource`, and oapi-codegen then prefixes both enums' constants, renaming the Go SDK's `User`, `Agent`, `System` and `Tool`. The spec names its constants with `x-enum-varnames` so nothing is renamed, and `sdks/go/acceleration/enums_test.go` pins the old names. A generator in another language that also derives constant names from values should be checked for the same collision when it is regenerated.
An agent config can bind connectors. `AgentConfigRequest`, `AgentConfig`, `AgentConfigPatch` and `SyncAgentRequest` gain `connectors`, a list of `AgentConnectorBinding` (`name`, `connector_id`, `connection` as an `AgentConnectorSelection` of `type` fixed or session with `connection_id` for fixed, `tools` as `ConnectorToolGrant`s of `name` and `schema_digest`, `required`, `timeout_ms`). Left out of an update or a patch, the stored bindings are kept; an empty list clears them. Every server-side SDK's folder sync reads `connectors:` from agent.yaml and sends it to the router with the agent config. The loaders are Go `sdks/go/agents/folder.go`, JavaScript `sdks/js/src/folder.ts`, Python `plugins/stream/vision_agents/plugins/stream/folder.py`, .NET `sdks/dotnet/src/GetStream.VisionAgents/Folder.cs`, Ruby `sdks/ruby/lib/getstream/vision_agents/folder.rb`, Rust `sdks/rust/src/folder.rs` and PHP `sdks/php/src/Folder/Declaration.php`. Swift, Kotlin and Dart need nothing, since none of these operations is client-accessible.
An agent config has `channels` (on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest`): an `AgentChannels` `{whatsapp, sms, imessage, identity}`, where each of the three is a `ChannelLineRequest` `{number}` and `identity` is `phone` (the default: each number becomes the end user `phone:+1555...`) or `link` (a number is answered only once somebody tied it to an end user with a code). The provider's credentials never go in `agent.yaml`: the app connects a line once with `connectChannel` (`POST /v1/agents/channels`, taking `kind`, `number`, `account_id`, `token`, `signing` and `challenge`, answering a `ChannelAccount` with the `webhook_url` to paste into Meta's or Linq's setup, `delivering` true when the router pointed a Telnyx number at it itself), lists them with `listChannelAccounts`, drops one with `disconnectChannel`, and mints a link code with `linkChannelNumber` (`POST /v1/agents/channels/links`). All four are server-side only, since they carry credentials. The router answers a delivery on `/v1/agents/channels/hooks/{token}` (`receiveChannelMessage`, plus `verifyChannelHook` for WhatsApp's GET check), both unauthenticated and both signed by the provider; a message earns a turn in the sender's own persistent conversation, so it is in Stream Chat like any other, with `custom.channel`, `custom.channel_number` and `custom.channel_from` saying where it came from. `agent.yaml` declares it as `channels:` with those keys; refuse unknown keys, refuse an `identity` that is not `phone` or `link`, and send it only when the file has the block. Go (`agents.ChannelsSettings`) and Python (`ChannelsSettings` in `plugins/stream`) have moved, and the Go, Python and JavaScript generated clients are regenerated. JavaScript, .NET, Ruby, Rust and PHP need their folder loaders to read `channels` and their generated clients regenerated. Swift, Kotlin and Dart need nothing, since config is server-side.
10DLC registration is under `/v1/phone`: `getBusinessProfile` and `saveBusinessProfile` (`GET`/`PUT /v1/phone/business-profile`, a `BusinessProfileRequest` with the legal name, entity and organization type, tax id, `registered_address`, website, industry and authorized contact); `listUseCases`, `createUseCase`, `getUseCase`, `updateUseCase` (a `PUT` replacing what the app wrote, with `numbers` assigning the app's numbers to it) and `deleteUseCase` on `/v1/phone/use-cases`; `submitUseCase` (`POST /v1/phone/use-cases/{id}/submit`, a 400 naming what is missing) and `listUseCaseReviews` (the `UseCaseReview` timeline, cursor paged); `listOptOuts`, `createOptOut` and `revokeOptOut` on `/v1/phone/opt-outs`; and `getPhoneSandbox` and `setSandboxRecipients` (`PUT /v1/phone/sandbox/recipients`). A `UseCase` moves through the `UseCaseStatus` values draft, submitted, changes_requested, rejected, vendor_pending, approved and vendor_rejected, and carries `channels` (`UseCaseChannels`, the RCS, WhatsApp, iMessage and voice fields, stored for review and not sent anywhere yet). All are server-side only. `placePhoneCall` now answers 403 for a call to somebody who opted out, or past the hosted sandbox. The `/v1/ops/use-cases` operations take the `OpsKey` scheme (`X-Ops-Key`) and are Stream's own staff tools: no SDK should expose them. Go and JavaScript have the regenerated clients and no resource methods yet. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated, and every server-side SDK a `phone.useCases`, `phone.businessProfile`, `phone.optOuts` and `phone.sandbox` spelled its own way. Swift, Kotlin and Dart need nothing, since none is client-accessible.
`SyncAgentResult` gains `warnings`, a list of strings: what a sync stored that will not work yet. A channel line the app has not connected is one now, rather than a 400, since a provider can take days to approve a number; a line another agent answers on is still refused. Config create and patch still refuse an unconnected line. Go (`agents` logs each at warn) and Python (`plugins/stream` logs each with `logger.warning`) have moved, and the Go, Python and JavaScript generated clients are regenerated. .NET, Ruby, Rust and PHP need theirs regenerated and their folder sync to log `warnings`. Swift, Kotlin and Dart need nothing, since sync is server-side.
The connection schemas `ConnectorConnection` and `ConnectorConnectionPage` are `Connection` and `ConnectionPage` since October 5, and the connector client's `policy` field is `registration`, a list of `ConnectorClientRegistrationMethod` (was `ConnectorClientOwner`), on `Connector.client` and `CustomConnectorRequest.client`. The connection JSON is unchanged; the connector client's `policy` on the wire is now `registration`. The operations and the other connection schemas follow: `createConnectorConnection`, `listConnectorConnections`, `getConnectorConnection` and `deleteConnectorConnection` are `createConnection`, `listConnections`, `getConnection` and `deleteConnection`, and `ConnectorConnectionRequest`, `ConnectorConnectionOwner`, `ConnectorConnectionOwnerType` and `ConnectorConnectionStatus` are `ConnectionRequest`, `ConnectionOwner`, `ConnectionOwnerType` and `ConnectionStatus`. Paths and JSON are unchanged. The owner enum's `x-enum-varnames` are now `ConnectionOwnerTypeApp` and `ConnectionOwnerTypeUser`, so the Go SDK keeps `User`, `Agent`, `System` and `Tool`. Go, JavaScript and Python have the regenerated clients; .NET, Ruby, Rust and PHP pick the renames up when they regenerate, and a resource method `connections.create/list/get/delete` calls the new operation names.
A connection's consent is started with `createAuthorization` (`POST /v1/agents/connections/{id}/authorizations`, an optional body `{return_url}` (the app's own page the consent goes back to: https, or http on loopback), answering 201 with an `Authorization`: `id`, `kind` (`AuthorizationKind`: `consent` for a pending connection, `reconnect` for one connected before), `launch_url`, `handoff_token` and `expires_at`, 10 minutes on). It is server-side only, with the same owner rule as `getConnection`, and a 400 when the router has no `ROUTER_PUBLIC_URL`. The rest of the flow is the browser's and is declared with `security: []`: `getConnectorLaunchPage` and `handOffConnectorLaunch` (`GET`/`POST /v1/agents/connectors/oauth/launch/{id}`), `finishConnectorConsent` (`GET /v1/agents/connectors/oauth/callback`, which redirects to the consent's `return_url`, or to the dashboard when it had none, with `connection_id` and `status` of `connected`, `denied`, `failed` or `account_mismatch`) and `getConnectorClientMetadata` (`GET /.well-known/oauth-client-metadata`). No SDK should wrap the four browser routes. Name the method `connections.authorize(id, {return_url})`; it returns the `Authorization` for the backend to hand `launch_url` and `handoff_token` to its own page, which opens the launch page in a popup and posts `{type: "va.connector.oauth.handoff", handoff_token}` to it from the `return_url`'s origin (the dashboard's when none) once the page posts `{type: "va.connector.oauth.ready"}`. A handoff token is traded once: a second handoff for the same authorization is a 400, so a page posts it once and starts a new authorization to retry. Go has the regenerated client (`CreateAuthorization`) and JavaScript the regenerated types (`createAuthorization` in `sdks/js/src/generated/api.ts`); neither has the resource method yet, and both need `connections.authorize(id)` added. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the method added. Swift, Kotlin and Dart need nothing, since the operation is not client-accessible.
Every failure the router answers is now an envelope: `{"error": {"message", "type", "code", "doc_url"}}` (`ErrorResponse` holding an `ErrorDetail`), where it was `{"error": "..."}` (the `Error` schema, now gone). `type` is an `ErrorType` and decides the status (`invalid_request` 400, `authentication` 401, `permission` 403, `not_found` 404, `conflict` 409, `rate_limited` 429, `internal` 500, `unavailable` 503 and a few more); `code` is a string to branch on (`not_configured`, `agent_config_not_found`, `missing_customer`, `validation_failed`, ...) that may grow, so it is not an enum; `doc_url` is `https://getstream.io/agents/docs/api/errors/#<code>`. A 500 says only "something went wrong": the `X-Request-Id` header is what to quote. Every operation now declares a `500` (`#/components/responses/InternalError`). The same envelope answers a refused socket handshake; frames on an open socket keep their `"error": "..."` string. Go, Python (`plugins/stream`) and JavaScript read `error.message` and have the regenerated clients. .NET, Ruby, Rust and PHP need their generated clients regenerated and their error reading moved to `error.message`. Swift, Kotlin and Dart need the same wherever they read an HTTP error body.
An app keeps its own OAuth client for a connector with `setConnectorOAuthClient` (`PUT /v1/agents/connectors/{id}/oauth-client`, a `ConnectorOAuthClientRequest` with `client_id`, a write-only `client_secret` and an optional `auth_method` of `ConnectorOAuthClientAuthMethod` `none`, `client_secret_basic` or `client_secret_post`, answering a `ConnectorOAuthClient` with 201 when it was stored and 200 when it replaced one) and `deleteConnectorOAuthClient` (`DELETE`, 204). Both are server-side only. No response carries the secret, and a connector whose `client.registration` does not list `customer` answers 400. Every consent and refresh of the app's connections to that connector reads the client again, so putting a rotated secret is the whole rotation. Name the methods `connectors.setOAuthClient(id, client)` and `connectors.deleteOAuthClient(id)`. Go has the regenerated client (`SetConnectorOAuthClient`, `DeleteConnectorOAuthClient`) and JavaScript the regenerated types; neither has the resource methods yet. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the two methods added. Swift, Kotlin and Dart need nothing, since neither operation is client-accessible.
A provider delivers a built-in connector's events to `receiveConnectorEvent` (`POST /v1/agents/connectors/events/{connector_id}`), declared with `security: []` and not client-accessible: Slack's `tokens_revoked` and `app_uninstalled` to the operator's Slack app, signed with its signing secret, which the router reads as `<client.env>_MCP_SIGNING_SECRET` (`SLACK_MCP_SIGNING_SECRET`). A revocation moves the connections of that account to `needs_reauthorization`, and `Connection.status` already says so. No SDK should wrap this route: only a provider calls it. Go and JavaScript have the regenerated client and types (`ReceiveConnectorEvent`, `receiveConnectorEvent`), and neither has nor needs a resource method. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and nothing more. Swift, Kotlin and Dart need nothing.
A connection gets its credentials, is checked and shows its tools with three server-side-only operations. `putConnectionCredentials` (`PUT /v1/agents/connections/{id}/credentials`, a `ConnectionCredentials` `{expected_revision, values}`, answering the `Connection`) stores what the connection's scheme takes in `values`: `api_key` and `header` for `api_key`, `token` for `bearer`, `client_id` and `client_secret` for `oauth2_client_credentials`, an issued grant (`access_token`, `refresh_token`, `expires_at`, `scope`) for `oauth2_code`, nothing for `none`. The values are write-only: no response carries them. A connection whose `revision` moved past `expected_revision` is a 409. `validateConnection` (`POST /v1/agents/connections/{id}/validate`, no body, answering a `ConnectionValidation` `{connection_id, status, error, tools_digest, checked_at}` with `ConnectionValidationStatus` `connected`, `pending`, `needs_reauthorization` or `failed`) asks the provider for its tools; `listConnectionTools` (`GET /v1/agents/connections/{id}/tools`, answering `ConnectionTools` `{connection_id, tools, digest, checked_at}`, each `ConnectionTool` `{name, description, input_schema, schema_digest, needs_scopes, read_only}`) reads back what the last validate found, in one piece rather than a page. A validate also compares the connection's `granted_scopes` with the `needs_scopes` of its tools (a `ConnectionTool` field, from the connector's manifest): its optional body `ConnectionValidationRequest` `{tools}` names the tools to check, every tool when left out, and a grant that lacks some answers `status` `needs_scopes` with `code` `connector_scope_required` and `missing_scopes`. Name them `connections.setCredentials(id, revision, values)`, `connections.validate(id, tools?)` and `connections.tools(id)`. Go has the regenerated client (`PutConnectionCredentials`, `ValidateConnection`, `ListConnectionTools`) and JavaScript the regenerated types; neither has the resource methods yet. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the three methods added. Swift, Kotlin and Dart need nothing, since none is client-accessible.
`CreateSessionRequest` gains `history`, at most 100 `HistoryMessage`s `{role, text, name, created_at}`, `role` a `HistoryRole` of `user` or `assistant`: the conversation so far, oldest first, for a backend that keeps its own thread (integration mode C). The model is handed it before the first response; the router records none of it, and with `incognito` keeps nothing at all. It is refused with `conversation_id`, past 60000 characters of text in all, and with a 403 from a device, so only a server-side SDK sends it. `HistoryRole` shares `user` with `AgentLogSource`, so the spec names its constants with `x-enum-varnames` (`HistoryRoleUser`, `HistoryRoleAssistant`), as `ConnectionOwnerType` does. Go (`client.SessionOptions.History`) and Python (`SessionOptions.history` in `plugins/stream`) have moved, and the JavaScript `SessionSpec` takes it from the regenerated types. .NET, Ruby, Rust and PHP need their generated clients regenerated and `history` on their session options. Swift, Kotlin and Dart need nothing, since a device may not send it.
A provider delivers the events of one customer's provider app to `receiveProviderAppEvent` (`POST /v1/connectors/events/{connector_id}/{provider_app_id}`), declared with `security: []` and not client-accessible: the Request URL of a customer's Slack app (`slack_bot`), signed with that app's own signing secret. A message goes to the channel bridge, which writes it into a thread channel in Stream Chat; the agent's reply goes back to Slack with `chat.postMessage`. No SDK should wrap this route: only a provider calls it. Go and JavaScript have the regenerated client and types (`ReceiveProviderAppEvent`, `receiveProviderAppEvent`), and neither has nor needs a resource method. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and nothing more. Swift, Kotlin and Dart need nothing.
The router creates and keeps a customer's own Slack app (T54). `setConnectorProviderApp` (`PUT /v1/agents/connectors/{id}/provider-app`, a `ConnectorProviderAppRequest` with `name` (1 to 35 characters), a write-only `config_refresh_token` (the refresh token of a Slack app configuration token, required the first time) and `allowed_ip_address_ranges` (at most 10), answering a `ConnectorProviderApp` `{connector_id, registration, provider_app_id, client_id, created_at, updated_at}` with 201 when it created the app and 200 when the app existed and its manifest was applied again) and `deleteConnectorProviderApp` (`DELETE`, 204) are server-side only; no response carries a token or a secret. `ConnectorClientRegistrationMethod` gains `managed`, and the built-in `slack_bot` connector lists it; the user-token `slack` connector stays `[operator]`. Name the methods `connectors.setProviderApp(id, app)` and `connectors.deleteProviderApp(id)`. `setOperatorProviderApp` and `deleteOperatorProviderApp` (`/v1/ops/customers/{customer_id}/connectors/{id}/provider-app`) take the `OpsKey` scheme and are Stream staff's: no SDK should expose them. Go has the regenerated client (`SetConnectorProviderApp`, `DeleteConnectorProviderApp`) and JavaScript the regenerated types; neither has the resource methods yet. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the two methods added. Swift, Kotlin and Dart need nothing, since neither operation is client-accessible.
`CreateSessionRequest` gains `connector_bindings`, at most 64 `SessionConnectorBinding`s `{name, connection_id}`: the connection to use for each of the agent config's connector bindings whose `connection.type` is `session`, by alias (AI-851). Each must be the verified caller's own connection; a fixed alias or one the config does not declare is a 400. A session also emits `connector_unavailable` `{name, connector_id, reason}` on its events socket for each optional binding it opened without, sent to every watcher when it attaches; `reason` is a stable code (`no_selection`, `shared_session`, `caller_unverified`, `connection_unavailable`, `provider_mismatch`, `needs_reauthorization`, `not_connected`, `open_failed`, `tool_unavailable`, `selection_dropped`). A fork chooses the parent's connections again on its own. Go (`client.SessionOptions.ConnectorBindings`, a map of alias to connection id) and Python (`SessionOptions.connector_bindings` in `plugins/stream`) have moved, and the Go, Python and JavaScript generated clients are regenerated. .NET, Ruby, Rust and PHP need their generated clients regenerated and `connector_bindings` on their session options. Swift, Kotlin and Dart need the field on session creation, since the operation is client-accessible, and should show `connector_unavailable`.
A connector's raw provider events go on to the app's own URLs, its event destinations (T46, integration modes B and C). `createConnectorEventDestination` (`POST /v1/agents/connectors/{id}/event-destinations`, a `ConnectorEventDestinationRequest` `{url, forward}`, `forward` a `ConnectorEventForward` of `unhandled` or `all`, answering 201 with a `ConnectorEventDestinationSecret` `{destination, secret}`), `listConnectorEventDestinations` (`GET`, cursor paged, a `ConnectorEventDestinationPage` of `ConnectorEventDestination` `{id, connector_id, url, forward, previous_secret_until, created_at, updated_at}`), `deleteConnectorEventDestination` (`DELETE .../event-destinations/{destination_id}`, 204) and `rotateConnectorEventDestinationSecret` (`POST .../event-destinations/{destination_id}/rotate-secret`, 200 with a `ConnectorEventDestinationSecret`) are server-side only. The secret is a Standard Webhooks `whsec_` secret, returned on create and rotation only; a private or non-https URL is a 400 and a fourth destination of one connector a 409. Each forward is the provider's raw body with its Content-Type and signature headers, signed on top with `webhook-id`, `webhook-timestamp` and `webhook-signature`. Name the methods `connectors.eventDestinations.create(id, destination)`, `.list(id)`, `.delete(id, destinationId)` and `.rotateSecret(id, destinationId)`. Go has the regenerated client (`CreateConnectorEventDestination`, `ListConnectorEventDestinations`, `DeleteConnectorEventDestination`, `RotateConnectorEventDestinationSecret`) and JavaScript the regenerated types; neither has the resource methods yet, and a server-side SDK may add a Standard Webhooks verifier for the receiving end. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the methods added. Swift, Kotlin and Dart need nothing, since none is client-accessible.
`respondSession` and `createResponse` carry on a persistent text session that has ended: the session comes back under the same id, with the same conversation, and answers. A client should not treat an ended text session as closed to new messages; only a voice session's end means no more turns. Nothing to regenerate.
`getCallTokens` (`GET /v1/agents/calls/{id}/tokens`, server-side only) answers a `CallTokens`: `input_tokens`, `cached_input_tokens`, `output_tokens`, `cost_micros`, `requests`, `input_parts` and `models`, a list of `ModelTokens` (`modality`, `provider`, `model` and the same counts) busiest first. `input_parts` is an `InputParts` (`instructions`, `messages`, `tool_definitions`, `tool_use`, `images`, `video`): an estimate of what the input tokens were spent on, scaled to sum to `input_tokens`. Unlike a call's `usage`, it is answered while the call runs. Go, Python (`plugins/stream`) and JavaScript have the regenerated clients and no resource method yet. .NET, Ruby, Rust and PHP need theirs regenerated; a `calls.tokens(id)` is optional. Swift, Kotlin and Dart need nothing, since the operation is not client-accessible.
`listSessionTools` (`GET /v1/agents/sessions/{id}/tools`, server-side only) answers an `OfferedTools`: `tools`, a list of `OfferedTool` (`name`, `description`, `parameters` and `tokens`, roughly what offering it costs on every request), and `tokens`, their sum. It is what the conversation model is offered, as it is sent: from the session while the router holds it, and from what was recorded when it last opened once it does not. A session that ended before tools were kept is a 404. Go, Python (`plugins/stream`) and JavaScript have the regenerated clients and no resource method yet. .NET, Ruby, Rust and PHP need theirs regenerated; a `sessions.tools(id)` is optional. Swift, Kotlin and Dart need nothing, since the operation is not client-accessible.
`CallTokens` gains `cost_sources`, a list of `CostSource` (`source`, `cost_micros`), costliest first: a token model's cost split into the parts of its prompt (`instructions`, `messages`, `tool_definitions`, `tool_use`, `images`, `video`), `output`, and `input` for prompt tokens recorded without a breakdown; any other model's cost under its modality (`stt`, `tts`, `search`, ...). `models` now lists every model the call used, those billed by audio or characters with zero tokens, so `cost_micros` and `requests` are the call's whole. Go, Python and JavaScript have the regenerated clients; .NET, Ruby, Rust and PHP need theirs regenerated.
`AgentConfig`, `AgentConfigRequest` and `AgentConfigPatch` gain `episode_cards`, a boolean, default false: whether each phone call under the agent writes an episode card into the caller's omni-channel (T41). Left out on an update (PUT), the stored setting stays. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the field on their agent config models. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
A persistent text session's message (`conversation_updated` and the conversation history) can carry a `connector_authorization` attachment (AI-898): `{type, name, connector_id, connection_id, authorization_id, title, launch_url, handoff_token, expires_at, status}`. It asks the end user to connect an agent config's connector binding of `connection.type` `session` that the session has no usable connection for (none chosen, or one in `needs_reauthorization`). Only a page on the origin of the session's `return_url` (AI-1384), or on the `DASHBOARD_BASE_URL` origin (Volt) for a session created without one, can complete it: it opens `launch_url` in a popup and posts it `{type: "va.connector.oauth.handoff", handoff_token}` once the page posts `va.connector.oauth.ready`, exactly as for a `createAuthorization` answer. The launch page takes that message only from `window.opener` on that origin, and the callback sends the browser back to the session's `return_url`, or else to the dashboard. Once the user finishes that login the message is sent again with `status` `connected` and no `handoff_token`, and the agent carries on by itself with no user message before it. The model is offered the binding as `<alias>__list_tools` and `<alias>__call_tool` until then. Nothing to regenerate beyond the description. A web app that creates the session with one of its own pages as `return_url` can complete the handoff. Swift, Kotlin and Dart have no web page to open the popup from, so they should not render this attachment as a working button until follow-up work gives them a launch flow of their own. The server-side SDKs need nothing.
`Connector` gains `setup`, a `ConnectorSetup` `{url, steps}` with each step a `ConnectorSetupStep` `{title, description}`: what a person does at the provider before the first consent, such as registering an OAuth client, as `Plugin.setup_steps` says it for a plugin. Absent when the manifest says nothing. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and nothing more. Swift, Kotlin and Dart need nothing, since the connector operations are server-side only.
`AgentConnectorBinding` gains `events`, at most 32 `ConnectorBindingEvent`s `{event, arguments, instructions}`: the MCP events a fixed binding's connection is subscribed to (T60, AI-899). They are subscribed when the connection is next validated, and each one that arrives opens a text conversation from the config. A session binding that declares events is a 400. A connection's MCP server delivers them to `receiveConnectionEvent` (`POST /v1/connectors/mcp-events/{token}`), declared with `security: []` and not client-accessible, each delivery signed with its subscription's own Standard Webhooks secret. No SDK should wrap that route: only a server calls it. Go, Python (`plugins/stream`, which also picks up `episode_cards`) and JavaScript have the regenerated clients and types. .NET, Ruby, Rust and PHP need their generated clients regenerated and `events` on their binding models. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
The router keeps a connection's use on record (T29, T47, AI-856). `listConnectionInvocations` (`GET /v1/agents/connections/{id}/invocations`, cursor paged, a `ConnectionInvocationPage` of `ConnectionInvocation` `{id, connection_id, connector_id, config_id, binding, tool, session_id, started_at, latency_ms, error_type}`, `error_type` an `InvocationErrorType` of `customer_auth`, `external_server`, `client_timeout`, `outcome_unknown` or `denied`, absent for a call that answered), `listConnectorAudit` (`GET /v1/agents/connector-audit`, cursor paged, optional `connection_id`, a `ConnectorAuditPage` of `ConnectorAuditEvent` `{id, connection_id, connector_id, owner_type, action, reason, revision, request_id, session_id, attempt_id, created_at}`, `action` a `ConnectorAuditAction` of `grant_created`, `grant_refreshed` or `grant_revoked`) and `deleteUserConnections` (`DELETE /v1/agents/users/{user_id}/connections`, 204) are server-side only. `Connection` gains `used_by`, a list of `ConnectionUse` `{config_id, config_name, binding}`. Name the methods `connections.invocations(id)`, `connections.audit(connectionId?)` and `users.deleteConnections(userId)`. Go has the regenerated client (`ListConnectionInvocations`, `ListConnectorAudit`, `DeleteUserConnections`) and JavaScript the regenerated types; neither has the resource methods yet. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the methods added. Swift, Kotlin and Dart need nothing, since none is client-accessible.
`episode_cards` also has each session on a thread channel or a phone call under the agent start with the person's other episode cards (T56 and T42, AI-885): a summary, or the last lines of the episode's channel while there is none. Only the field's description changed. Go and JavaScript have the regenerated client and types; Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the new description when they regenerate. Nothing else to change.
`setSessionSettings` and `updateSession` document a new 400, code `carded_session_to_native`: a session that started with the person's episode cards (AI-885) cannot be moved onto a speech-to-speech model. Only the operations' descriptions changed. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the description when they regenerate. Swift, Kotlin and Dart need nothing beyond showing the error, since `updateSession` is client-accessible and its 400 already carries a message.
The session socket `GET /v1/agents/socket` is now declared in the spec as `openSocketSession`, client-accessible. Before, it was served but not declared. A start frame from an end user's device that carries `session.history` is now refused, as `createSession` refuses it: an `error` frame with `error` (the same message), `code` (`forbidden`) and `error_type` (`permission`), and then the socket closes with 1008. A backend's start frame is unchanged. Go excludes `openSocketSession` from its generated client, as it excludes the other sockets. JavaScript has the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated, and must exclude the operation if their generator cannot express an upgrade. A server-side SDK may send `history` on the socket. Swift, Kotlin and Dart must not send `history` on the socket.
`AgentConnectorBinding` gains `policy`, a `ConnectorBindingPolicy` `{pre_speech, on_interrupt, cancellable}` (T30, AI-857), every field optional and read back as written. `on_interrupt` is a `ConnectorOnInterrupt` of `cancel` (the default, as before) or `wait` (the call finishes after an interruption, and its result goes into the conversation); `cancellable`, default true, false leaving a cancelled call running at the provider. The session socket's `tool_started` frame gains `pre_speech`, only when the tool's binding sets one; every other `tool_started` is unchanged. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`, whose generated client is behind the spec on base already), .NET, Ruby, Rust and PHP need their generated clients regenerated and `policy` on their binding models. Swift, Kotlin and Dart need nothing for `policy`, since agent configs are server-side only; a client that shows `tool_started` may show `pre_speech`.
The session socket (`watchSession`) sends a new frame, `connector_scope_required` (AI-854): a connector tool call the provider refused for want of access (insufficient_scope, or a claims challenge) on the caller's own connection, and the step-up consent the router began for it. Fields: `name` (the binding's alias), `connector_id`, `connection_id`, `scopes` (what the provider asked for, empty for a claims challenge), `authorization_id`, `launch_url`, `handoff_token`, `expires_at`. A client opens `launch_url` in a popup and posts it `handoff_token`, as for `createAuthorization`. One open step-up per connection: calls refused for the same access send no second frame. The old grant keeps working until the step-up succeeds; then the same call works in the same session. Only the operation's description changed in the spec. Go has `stream.Event.ConnectorScopeRequired()` reading it; JavaScript has the regenerated types. Swift, Kotlin and Dart are done: a `connectorScopeRequired` kind and accessor on `AgentEvent`, whose doc says an app cannot finish the handoff yet, since the launch page takes `handoff_token` only from the dashboard's origin, or the session's `return_url`'s (AI-1384), which a native app has no page on. Python, .NET, Ruby, Rust and PHP still need a typed reader for the frame.
The router keeps an audit log of who changed the app's configuration. `queryAudit` (`POST /v1/audit/query`, cursor paged, an `AuditQuery` `{filter, limit, cursor}` whose `AuditFilter` takes `resource_type`, `resource_id`, `agent_id`, `source` and `action`, answering an `AuditPage` of `AuditEntry` `{id, resource_type, resource_id, resource_name, agent_id, action, source, actor_id, actor_name, request_id, changes, created_at}`, each `AuditChange` `{field, before, after}`) and `getAgentChanges` (`GET /v1/agents/configs/{id}/changes`, answering an `AgentChanges` `{items, last_change, synced_at}`) are server-side only. `AuditResourceType` is `agent_config`, `skill`, `knowledge`, `knowledge_url`, `router_config`, `plugin` or `policy` -- configuration only, never a session or a run; `AuditAction` is `created`, `updated`, `deleted` or `synced`; `AuditSource` is `dashboard`, `cli`, `sdk` or `api`, read from the `X-Stream-Client` header, with `X-Stream-Actor-Id` and `X-Stream-Actor-Name` naming the person behind a client that signs its users in. Every SDK should send `X-Stream-Client` on every request, which is the whole of what one that syncs on startup has to do; Go does it in `Backend.Credentials`. `SyncAgentRequest` also gains `check_changes` and `base_change`: a sync asking to be checked is refused with a 409 `unsynced_changes` rather than writing over an edit made since the last sync, and a client shows the changes and syncs again with `base_change` once the person has decided. Name the methods `audit.query(filter)` and `agents.changes(id)`. Go has the regenerated client (`QueryAudit`, `GetAgentChanges`) and sends the client header; JavaScript has the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated, the client header on every request, and the two methods added. Swift, Kotlin and Dart need nothing, since neither operation is client-accessible.
Hosting tools is agent-centric: an agent handle (`client.agent(name)`) carries its own `tools`, and `dispatch.host(agent, options)` hosts them under the handle's name, in place of `host(agentId, tools, options)`. The router matches a hosted tool on a session's agent id or its agent name, so the name is enough. Every server-side SDK has moved: JavaScript (`AgentHandle.tools`), Go (`stream.HostedAgent`, which `client.Agent` satisfies), Python (`client.Agent.functions`), .NET, Ruby, Rust (`AgentRef.tools`) and PHP (`AgentHandle::$tools`). The optional timeout is named `toolTimeout` (`toolTimeoutMs`, `tool_timeout`), since it bounds one tool call, not the worker. Swift, Kotlin and Dart need nothing, since a device does not host tools.
`AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` gain `progressive_tools`, a boolean that is off by default. When it is on, the agent's plugin, MCP server and connector tools are offered by the first line of each description, with the argument descriptions stripped, and the first call to a tool returns its full description and input schema instead of running it. Left out on an update or a sync, the stored setting stays. `agent.yaml` takes it as `progressive_tools: true`; send it on the sync only when the file sets it. Go (`Settings.ProgressiveTools` in `sdks/go/agents`) and Python (`plugins/stream`, `Settings.progressive_tools`) read it and have the regenerated clients; JavaScript has the regenerated types. .NET, Ruby, Rust and PHP need their generated clients regenerated and the key read from `agent.yaml`. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
`setConnectorProviderApp` and `setOperatorProviderApp` now point the message hook of the Stream app the provider app is pinned to, when that is an app the customer registered (T48, AI-887): `ROUTER_PUBLIC_URL/v1/chat/hooks/stream/{stream app id}`. A router without `ROUTER_PUBLIC_URL` points none. When Stream refuses, the provider app is kept and the answer is a 503; `setOperatorProviderApp` documents the new 503. Only the descriptions and that one status changed. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the change when they regenerate. Swift, Kotlin and Dart need nothing, since neither operation is client-accessible.
`ConnectorOAuthClientRequest` (`setConnectorOAuthClient`, `PUT /v1/agents/connectors/{id}/oauth-client`) gains two optional fields (AI-906): `provider_app_id`, the provider's id for the customer's own app (RFC 3986 unreserved characters), and `signing_secret`, write-only, the secret the provider signs that app's events with. With both, the app's events posted to `/v1/connectors/events/{connector}/{provider_app_id}` are verified with that secret. `signing_secret` needs `provider_app_id` and a connector whose `channel.verifier.secret` is `provider_app`, else a 400. Another customer naming the same app is a 409. `ConnectorOAuthClient` gains `provider_app_id`, absent when none was put; no answer carries either secret. A PUT replaces the record whole, so a PUT without `signing_secret` removes it. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the two fields on their request model, with `signing_secret` never logged or printed. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`ConnectorOAuthClientRequest.client_id` is no longer required (AI-863): a connector whose connections are not consented through `oauth2_code`, such as the new built-in `linq` (iMessage through the customer's own Linq account, bearer API key), takes a provider app alone, `provider_app_id` and `signing_secret` without `client_id`, `client_secret` or `auth_method`. Every other put still needs `client_id`, else a 400. `ConnectorOAuthClient.client_id` is then `""`. Go's generated `ConnectorOAuthClientRequest.ClientId` is now a `*string`, which breaks a caller that set it as a string; JavaScript has the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and `client_id` optional on their request model. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`instructions` is now server-side only (AI-937), on every path a session takes it: `createSession`, the session socket's start frame (`openSocketSession`), `forkSession`, and the events socket's (`watchSession`) `instructions` command. `updateSession` already refused it. From an end user's device, `createSession` and `forkSession` answer a 403, code `forbidden`, type `permission`, message `a session's instructions are changed server-side, never by a device: …`. The session socket answers an `error` frame with the same `error`, `code` and `error_type`, then closes with 1008. The events socket keeps the connection and changes nothing: it sends an `error` frame `{context: "command", error: <the same message>}`. A backend is unchanged on all four. Only descriptions changed in the spec: Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the descriptions when they regenerate. With a server credential they may keep sending `instructions`. Python with a user token must not: `sessions.py` sends it on create, on fork and in `set_instructions`. Swift, Kotlin and Dart must stop sending `instructions` from a device, or document the field and method as backend-only. Kotlin: `SessionOptions.instructions` and `ForkOptions.instructions` (`Options.kt`, sent by `Sessions.kt`), and `AgentSession.setInstructions` (`Command.Instructions`). Swift: `SessionOptions.instructions` (`VisionAgents.swift`), `ForkOptions.instructions` (`Models.swift`), and `AgentSession.setInstructions`. Dart: `SessionOptions.instructions` and `ForkOptions.instructions` (`models.dart`, sent by `convert.dart`), and `AgentSession.setInstructions`. JavaScript in a browser (a token) must not pass `instructions` to `Session.fork`, to an `Agent`, or to `session.setInstructions`. Instructions belong in the agent config, or are set by the backend through `updateSession`.
`exportConnectionToken` (`POST /v1/agents/connections/{id}/token`, AI-874) is new and server-side only: it answers a `ConnectionToken` `{connection_id, header, value, expires_at}`, the connection's current access credential for the app's backend to call the provider itself, `value` being the whole field value (`Bearer <token>` for an OAuth access token, the key for an API key). It never carries a refresh token, and the answer is `Cache-Control: no-store`. An `oauth2_code` grant issued to Stream's client or one the router created is a 403, as is a scheme other than `oauth2_code` and `api_key`; a connection with no credential is a 409. `ConnectorAuditAction` gains `token_export`, one row per export. Name the method `connections.exportToken(id)`, and never log `value`. Go has the regenerated client (`ExportConnectionToken`) and JavaScript the regenerated types; neither has the resource method yet. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the method added. Swift, Kotlin and Dart need nothing, since the operation is not client-accessible.
A new operation, `answerProviderAppHandshake` (`GET /v1/connectors/events/{connector_id}/{provider_app_id}`, AI-879), is the GET Meta checks a customer's WhatsApp webhook URL with: `hub.mode`, `hub.verify_token` (the provider app's id) and `hub.challenge`, echoed as text/plain. It is declared with `security: []` and is not client-accessible; only a provider calls it, so no SDK should wrap it. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick it up when they regenerate and should exclude it from any wrapper. Swift, Kotlin and Dart need nothing.
The router forwards direct calls to a connection's provider (T44, AI-873): `ANY /v1/agents/connections/{id}/proxy/{path}`, declared as five operations `proxyConnectionGet`, `…Post`, `…Put`, `…Patch` and `…Delete`, all server-side only. The request goes to the connector's `api_base` with `{path}` appended (it may hold slashes), with the connection's credential in place of the router's own headers and query parameters, and the provider's answer comes back as it came; a provider's 429 also holds the connection's further calls here until its `Retry-After` passes (429 `rate_limited`). It is meant for a provider's own SDK pointed at the URL as its base URL, so no SDK should wrap it beyond the generated method. The generated method escapes a slash in `{path}` to `%2F`, so it reaches a single-segment path only (`chat.postMessage`, not `repos/octo/hello/issues`); `POST`, `PUT` and `PATCH` take an optional body of any media type. `ConnectorAuditAction` gains `proxy_call`, and `ConnectorAuditEvent` gains `status_code`, `latency_ms` and `target` (the host), set only on a `proxy_call` row. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the three audit fields on their model. Swift, Kotlin and Dart need nothing, since none is client-accessible.
Every SDK reads the error envelope into a structured error, and every generated client is regenerated from the spec as of October 8. A router failure carries the status, `type` (a string, so a type added later still reads), `code`, `message`, `doc_url` and the `X-Request-Id` header as its request id, through one function per SDK that also takes a refused socket handshake. A body that is not the envelope (a proxy's HTML, an empty body, the old `{"error": "..."}`) becomes the message, with no type or code. The types: Go `*stream.RouterError` (`errors.As`; `Error()` unchanged), JavaScript `RouterError` (`type`, `code`, `docUrl`, `requestId`), Python `RouterError` (`status`, `type`, `code`, `doc_url`, `request_id`; `RemotePipelineError` holds it as its cause), Swift `AgentsError.http(HTTPFailure)` (was `http(status:message:)`), Kotlin `AgentsException.Http` (`type`, `code`, `docUrl`, `requestId`), Dart `RouterException` (`type` a `RouterErrorType`, `code`, `docUrl`, `requestId`), .NET `RouterException` (`Type`, `Code`, `DocUrl`, `RequestId`), Ruby `RouterError` (`type`, `code`, `doc_url`, `request_id`), Rust `Error::Router(Box<RouterFailure>)` (`kind`, `code`, `doc_url`, `request_id`) and PHP `RouterException` (`type`, `errorCode`, since `Exception::$code` is taken, `docUrl`, `requestId`). A refused socket carries the envelope in Go, Rust, PHP, Ruby and Kotlin, only the status and request id in Swift, Python and .NET, and nothing in JavaScript and Dart, whose WebSocket APIs show no refused response. Open: Rust's generator now exposes the `/v1/ops` staff operations and the browser and webhook routes as `Client` methods, and should exclude them; Python's generator emits `openSocketSession` as a plain GET.
`ConnectorToolGrant.schema_digest` is no longer required (AI-816): a binding with `connection.type` `session` may grant a tool by `name` alone, and the first session that opens a person's connection pins the digest the provider lists then; a reconnect pins again. A name-only grant on a `fixed` binding is a 400. A config is read back without `schema_digest` for such a grant. Go's generated `ConnectorToolGrant.SchemaDigest` is now a `*string`, which breaks a caller that set it as a string; JavaScript has the regenerated types. Python (`plugins/stream`, whose model still has `schema_digest: str` required), .NET, Ruby, Rust and PHP need their generated clients regenerated, `schema_digest` optional on their grant model, and an `agent.yaml` grant read without one. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
`Connection` gains two read-only fields (AI-816): `definition_status`, a new enum `ConnectionDefinitionStatus` (`current`, `outdated`, `broken`), always present, and `definition_broken_reason`, present only when `definition_status` is `broken`. `broken` means a later revision of the connector marked the revision the connection reads as not working: the router gives it no credential until a consent connects it again, and every consent now runs on the connector's latest revision and moves the connection there once it connects. Show `definition_broken_reason` beside a reconnect button. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated model. .NET, Ruby, Rust and PHP need their generated `Connection` regenerated. Swift, Kotlin and Dart need nothing, since no connection operation is client-accessible.
`ConnectorBindingPolicy.on_interrupt` left out no longer means `cancel`: a call the caller talks over goes on, and its result is told to them when it comes, unless they withdraw what they asked for, which stops it. `cancel` written out still cancels the call at the interruption, and `wait` is unchanged. Only the descriptions of `on_interrupt` and `cancellable` changed in the spec. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the descriptions when they regenerate, and should no longer document `cancel` as the default. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
`ConnectorAuditEvent` gains `credential`, a new `ConnectorAuditCredential` (AI-990), on a grant row whose scheme names its tokens (`oauth2_code` today): `access_fingerprint`, `refresh_fingerprint`, `previous_access_fingerprint`, `previous_refresh_fingerprint`, `rotated` (always present) and `access_expires_at`, `refresh_expires_at`. A fingerprint is the first 4 bytes of the token's SHA-256 as 8 lowercase hex characters, never a token or any part of one; `rotated` says the refresh token the connection had was replaced. Absent on a `proxy_call`, a `token_export` and a delete. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated model. .NET, Ruby, Rust and PHP need their generated audit model regenerated. Swift, Kotlin and Dart need nothing, since the audit is server-side only.
A create or a rename to a name that is already taken is a 409, code `name_taken`, type `conflict`, with a message saying so (`an agent with this name already exists`, `this agent already has a skill with this name`, `a router with this name already exists`, `a voice with this name already exists`), where it was a 400 `invalid_request` quoting the database. Agent configs, router configs and voices are named per customer, skills per agent config. `createAgentConfig`, `updateAgentConfig`, `patchAgentConfig`, `createSkill`, `updateSkill`, `createRouterConfig`, `updateRouterConfig`, `createVoice` and `updateVoice` document the 409, and `ErrorDetail.code` lists `name_taken`. Any other database failure on those writes is now a 500. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated operations and `ErrorDetail`. .NET, Ruby, Rust and PHP pick up the 409 when they regenerate; an SDK that syncs `agent.yaml` may say which name clashed. Swift, Kotlin and Dart need only the new `ErrorDetail.code` description, since none of these operations is client-accessible.
A session binding (`connection.type: session`) that `CreateSessionRequest.connector_bindings` names no connection for now opens on the caller's own connection to its connector when exactly one of theirs is `connected` (AI-994); with none connected, or more than one, it is left out with `no_selection` as before. Only the doc text of `connector_bindings` and `AgentConnectorSelectionType` changed, no field. The Go and JavaScript generated clients are regenerated; Python (`plugins/stream`), .NET, Ruby, Rust, PHP, Swift, Kotlin and Dart carry the old description until their next regeneration. No SDK needs a code change: an app that sent no `connector_bindings` keeps sending none.
Connector observability (AI-990): `getConnectorOAuthClient` (`GET /v1/agents/connectors/{id}/oauth-client`) is new and server-side only. It answers a `StoredConnectorOAuthClient` `{connector_id, registration, client_id, auth_method, provider_app_id, has_client_secret, has_signing_secret, created_at, updated_at}` for the record of whichever registration the app has (`customer`, `managed`, `operator`), never a secret; none is a 404. `Connection` gains `client`, a read-only `ConnectionClient` `{registration, client_id}`: the OAuth client the connection's last consent used, including one the router registered on the fly (`dcr`); absent for a static scheme and before a consent. `ConnectionInvocation` gains `arguments`, a list of `InvocationArgument` `{name, type, length}`: each top-level argument's name, JSON type (`object`, `array`, `string`, `number`, `boolean`, `null`) and, for a string or an array, its length, never a value; absent for an incognito session's call. `ConnectorAuditCredential` now also comes on a `bearer`, `api_key` or `oauth2_client_credentials` grant row (access fingerprint only), and on a `grant_revoked` row it names the tokens that ended. Name the method `connectors.oauthClient(id)`. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated models and operation. .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing, since none of this is client-accessible.
The built-in `github` connector takes a personal access token (AI-990): revision 3 lists `bearer` beside `oauth2_code`, so `createConnection` with `auth_scheme: bearer`, then `PUT /v1/agents/connections/{id}/credentials` with `values.token`. A connection that names no scheme still gets `oauth2_code`: `ConnectionRequest.auth_scheme` left out is the connector's only scheme, or else its only one that is not a static token or key (`bearer`, `api_key`). A validate whose bearer or api_key credential the provider rejected answers `needs_reauthorization` with the new `code` `connector_credential_rejected` and an `error` saying to replace it with a PUT, not to reconnect. The session socket's `connector_unavailable` gains the reason `credential_rejected`, for such a connection chosen for a session; the model is told to have it replaced and no login is shown. Only descriptions changed in the spec. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the descriptions when they regenerate, and should treat `connector_credential_rejected` and `credential_rejected` as "put new credentials", not "reconnect". Swift, Kotlin and Dart read no `connector_unavailable` reason today; one that shows it should say `credential_rejected` means the token must be replaced by the app.
A `bearer` or `api_key` connection on a connector revision marked broken is fixed by saving its token or key again (AI-1002): `PUT /v1/agents/connections/{id}/credentials` on such a connection now moves it to the connector's latest revision, as a consent moves an OAuth one, and the tools pinned for its old grant are pinned again. A validate of one still on the broken revision answers `needs_reauthorization` with `code` `connector_credential_rejected`, and a session that chose it gets `connector_unavailable` with reason `credential_rejected`; no login is offered. Only descriptions changed in the spec. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated descriptions. .NET, Ruby, Rust and PHP pick up the descriptions when they regenerate, and should read both codes as "save the credentials again". Swift, Kotlin and Dart read no `connector_unavailable` reason today; one that shows it should say `credential_rejected` means the app must save the token again.
`ConnectorEventForward` says more about `unhandled` (AI-1001): a Slack reply that does not mention the bot, in a thread the agent is not in yet, is forwarded as unhandled when it arrives, and the agent may still answer it once the mention that starts the thread arrives within 10 minutes; the forward is not taken back. Only the description changed in the spec. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated models. .NET, Ruby, Rust and PHP pick up the description when they regenerate. Swift, Kotlin and Dart need nothing, since event destinations are server-side only.
Two renames in agent configs (`AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch`, `SyncAgentRequest`) and in `agent.yaml`. `thinking_llm` is `subagent`, and on `Session` and `AgentCall` `thinking_llm_used` is `subagent_used`. `progressive_tools` is `tools: {progressive}`, a new `AgentTools` object for tool settings to come; left out, the stored setting stays. The old keys are refused as unknown in `agent.yaml`. Go (`sdks/go/agents`: `Settings.Subagent`, `Settings.Tools`) and Python (`plugins/stream`: `define_agent(subagent=)`, `ToolSettings`) are done. JavaScript has the regenerated types and reads `subagent`, but its folder reader has no `tools`. Swift has the regenerated client and needs nothing else. .NET, Ruby, Rust and PHP need their generated clients regenerated and the two keys read from `agent.yaml`. Kotlin and Dart need their generated `Session` regenerated, which renames `thinkingLlm` to `subagent`; no hand-written code reads it.
`greeting` is an object, `Greeting` `{text, mode}`, on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch`, `SyncAgentRequest` and `CreateSessionRequest` (and so the session socket's start frame), where it was a string. `mode` is a new enum `GreetingMode`: `exact` (the default) says `text` word for word, `variation` has the model say its own variation of it on every call. A patch or a sync replaces the greeting whole, and an empty `text` removes it. `speed` is gone from all four config bodies and from `agent.yaml`; a voice speaks at its own pace. `agent.yaml` takes `greeting: {text, mode}`. Go is done: `Settings.Greeting` is a `*GreetingSettings` in `sdks/go/agents`, `Settings.Speed` is gone, and `stream.Config` gains `GreetingMode` beside `Greeting`. JavaScript has the regenerated types, and Python (`plugins/stream`) and Swift the regenerated clients, but their hand-written code still sends `greeting` as a string and reads `speed`: JavaScript `agent.ts` (`greeting`, `speed`), Python `folder.py` (`Settings.speed`, `Settings.greeting`) and `accelerated.py` (`greeting`). .NET, Ruby, Rust and PHP need their generated clients regenerated and the new `greeting` read from `agent.yaml`. Kotlin and Dart need their session options to send the object if they expose a greeting.
The `lcm` modality is renamed `decision_model`: the `Modality` enum value `lcm` is now `decision_model`, a guardrail.md says `type: decision_model` (the router still reads `type: lcm`), and `/v1/lcm/providers` is `/v1/decision_model/providers`. `/v1/classify` and its bodies are unchanged. Go has the regenerated client (`ModalityLcm` is `ModalityDecisionModel`), and JavaScript has the regenerated types. Python (`plugins/stream`), Swift, .NET, Ruby, Rust and PHP need their generated clients regenerated, and anything hand-written that names `lcm` renamed. Kotlin and Dart need nothing unless they expose `Modality`.
Customers can route to a model they serve themselves: `listCustomModels`, `createCustomModel`, `getCustomModel`, `updateCustomModel` and `deleteCustomModel` (`/v1/agents/models`, server-side only, the list paged by cursor). A `CustomModelRequest` is `{name, base_url, model, api_key, context_window, input_modalities, per_million_input_tokens, per_million_output_tokens, trains_on_data, retention}`; `api_key` is write-only (left out of an update keeps the stored one, empty removes it), and a `CustomModel` answers `has_api_key` and `target` (`custom/<name>`) instead. A router config, session or `allowed_models` names it as `custom/<name>`. New error code `model_not_found`. Go has the regenerated client and `stream.Client.DefineModel` / `DeleteModel` (upsert and delete by name). JavaScript has the regenerated types, and Python (`plugins/stream`) the regenerated client; both need a `defineModel` / `define_model` wrapper. .NET, Ruby, Rust and PHP need their generated clients regenerated and the same wrapper. Swift, Kotlin and Dart need nothing, since none of this is client-accessible.
A session's instructions are its agent config's, and a session's channel and call are named after it. `CreateSessionRequest` loses `instructions` and `conversation_id`, `ForkSessionRequest` and `UpdateSessionRequest` lose `instructions`, the session socket's start frame loses both, the events socket loses its `instructions` command, and `PUT /v1/agents/sessions/{id}/instructions` is gone. The router ignores the fields if sent. A text session's channel is `agent:<session id>`. A voice session with no `call_id` joins the call `agent:<session id>`, which joining creates; `call_id` stays for a call that already exists (a phone call, dispatch). A fork of a voice session with no `call_id` joins `agent:<fork id>`. A conversation is resumed by its session id: watching an ended text session's events socket, or answering it (`respondSession`, `createResponse`), reopens it with its history. `tags` on a session are merged with the agent config's, the session's winning where both name a key. Go is done: `SessionOptions.Instructions`, `SessionOptions.ConversationID`, `ForkOptions.Instructions`, `Session.SetInstructions`, `Pipeline.SetInstructions`, `stream.Call.Instructions` and `stream.Call.ConversationID` are gone, `Sessions.Resume(ctx, id)` is new in `client` and `agents`, `client.SessionOptions.Tags` is new, a code-defined agent's `Options.Instructions` reach the backend with `Sync`, and the TUI resumes by session id (`--session`). JavaScript has the regenerated types, and Python (`plugins/stream`) and Swift the regenerated clients, but their hand-written code still sends the removed fields: JavaScript `agent.ts` (`conversation_id`, `instructions`) and `sessions.ts`, Python `sessions.py` (`instructions` on create, fork and update, `set_instructions`, and no `tags` on `SessionOptions`) and `sts.py`/`llm.py` (`instructions` in the start frame and the command). .NET, Ruby, Rust and PHP need their generated clients regenerated, the fields and `setInstructions` removed, and a `resume` by session id. Kotlin, Swift and Dart must drop `SessionOptions.instructions`, `ForkOptions.instructions`, any `conversationId` option and `AgentSession.setInstructions`.
Voice is started and stopped on a session, on the call `agent:<session id>`, and nobody names a call any more. This replaces the note above where it says `call_id` stays for a call that already exists. `startSessionVoice` (`POST /v1/agents/sessions/{id}/voice`) and `stopSessionVoice` (`DELETE` on the same path) are new and client-accessible; both answer the `Session`, whose `call_id` is the session id while voice is on and empty while it is off. A session keeps its history and Chat channel across both, and typed and spoken turns are one conversation. `CreateSessionRequest` loses `call_id`, `call_type` and `text` (every session starts in writing) and gains `start_voice`; the session socket's start frame starts voice without being asked. `ForkSessionRequest` loses `call_id`, and a fork is always held in writing. Phone: `AttachNumberRequest` loses `call_id` and `call_type`, and each caller lands in a call of their own; the dispatch `call` frame gains `session_id`, which a worker opens with `start_voice` (and `phone`). `PlaceCallRequest` swaps `call_id`/`call_type` for an optional `session_id`, and `PlacedCall` answers `session_id` instead of `call_id`/`call_type`. `TransferCallRequest` swaps `call_id`/`call_type` for `session_id`. Go is done: `client.SessionOptions.StartVoice`, `client.Session.Voice` (`Start`, `Stop`, `Started`), `stream.Call.SessionID` and `stream.Call.Voice` replacing `ID` and `Type`, `stream.InboundCall.SessionID`, `stream.OutboundCall.SessionID` replacing `CallID` and `CallType`, `Phone.Attach(ctx, number)`, `agents.SessionOptions.Voice` replacing `Call`, `agents.Agent.Join(ctx, ...SessionOptions)`, the new `agents.Agent.Answer(ctx, InboundCall)`, and `WaitForCall` now answers through a one-call dispatch connection. Every SDK has moved: each takes `start_voice` on create, starts and stops voice on the session, resumes a session by id, reads `session_id` off an inbound call where it has phone helpers, and the client SDKs join the RTC call `agent:<session id>`. Per-session instructions are gone everywhere; they reach the backend through config sync. A session id the caller chooses (`id` on create, `session_id` on a placed call) may now be any string of up to 64 letters, digits, `-` and `_` not starting `support-` or `thread-`: no SDK may type or check it as a UUID. The session now carries `summary`, `review_score`, `review_notes` and `usage` (backend only, once it has ended), and `GET /v1/agents/sessions/{id}` reads ended sessions: regenerating picks the fields up, and any SDK helper or doc that reads the call record for usage should read the session instead.
`command_id` is `request_id` on the wire: `CreateResponseRequest`, `RespondRequest`, the receipt (`CommandReceipt.request_id`), the session socket's `respond`, `interrupt`, `tool_result` and `tool_approval` frames, the `tool_call` and `tool_cancel` events, the message snapshot, and the dispatch `message` frame. The `/commands/{request_id}` paths keep their URLs. Stream Chat message custom data the router stores (`support_runtime`) still says `command_id`. A session not kept in Stream Chat now ignores a `request_id` instead of refusing it. Every SDK generates one per text-only question inside responses.create and exposes no option for it (see "Asking goes through responses.create"). Go has moved: `client.Command` is `client.RequestID`, `stream.InboundMessage.CommandID` is `RequestID`, and the `kept` check is gone. JavaScript, Python, Swift, Kotlin, Dart, .NET, Ruby, Rust and PHP have moved too, along with the voice change above: every SDK is up to date with this spec.
`deleteConnector` (`DELETE /v1/agents/connectors/{id}?force=`) is new and server-side only (AI-1046): it deletes one of the app's own custom connectors, every revision, with the app's OAuth client for it, and answers 204. A built-in, or an id the app has no custom connector under, is a 404. A connector a live connection was made from, or an agent config binds, is a 409 `conflict` whose message names the connections and the bindings, unless `force=true`, which deletes its connections as a forced connection delete does and leaves the bindings in place. `Connector` gains a read-only `redirect_uri` (AI-1047) and still never shows an endpoint (AI-837: an MCP URL can carry a secret in its path): the router's consent callback, `ROUTER_PUBLIC_URL` + `/v1/agents/connectors/oauth/callback`, on a connector that lists `oauth2_code`, absent when `ROUTER_PUBLIC_URL` is not set. Name the method `connectors.delete(id, force)`. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated `Connector` model and operation (only those files: the rest of its generated client is behind the spec on the base already). .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing, since connectors are server-side only.
Stream is set up once, in every client SDK: the Stream api key, the user and the user's token from `setUser` are the one identity for the router, Stream Chat and Stream Video. `session.chat()` and `session.video()` build, connect and share one `StreamChat` and one `StreamVideoClient` per key and user (`src/stream.ts`), handed a token function so the hour-long token refreshes; `client.disconnect()` closes them, and closing a session does not. An app that already has a `StreamChat` or a `StreamVideoClient` hands it over with `client.use({ chat, video })`: it is used rather than a second one, never disconnected by the SDK, and one connected as somebody other than the `setUser` user is a `ConfigurationError`. A client given `customerId` reaches the router by customer id even when `apiKey` is passed too, the key then being Stream's alone, so a local page connects chat and video as well. Chat and video are opted into with `import "@stream-io/stream-agents/chat"` and `import "@stream-io/stream-agents/video"`, new entry points that import the optional peers statically and register them, so a bundler resolves them only for an app that asked; the dynamic import of the peers is gone, since a bundled page could never resolve its bare specifier. `stream-chat` and `@stream-io/video-client` are now dev dependencies of the package, which stays free of runtime ones. No spec or router change. Swift is done: `VoiceSession.join()` and `VoiceCallView(voice:)` drop `CallCredentials` and its provider and build one `StreamVideo` from the agents' user, token and key; chat is a new iOS-only package (`sdks/swift/chat`, `VisionAgentsChat`) whose `session.chat()` builds or reuses one `ChatClient` and answers the channel's controller; `agents.use(_:)` takes the app's own `ChatClient` or `StreamVideo`, `agents.disconnect()` closes only the built ones, and `VisionAgents(url:customerID:apiKey:)` takes the key for Stream beside a customer id, as JS does. Kotlin is done: `VoiceSession.join(camera)` and `VoiceCallView(voice)` drop `CallCredentials` and its provider and join on one shared `StreamVideo`; chat is a new module (`sdks/kotlin/chat`, `io.getstream:vision-agents-chat`) whose `session.chat(context)` builds or reuses one `ChatClient` and answers its `ChannelClient`; `agents.use(ChatClient)` and `agents.use(StreamVideo)` hand over the app's own, a process-wide one the app built without handing it over is adopted if connected as the same user and refused otherwise, `agents.disconnect()` closes only the built ones, `rtc` no longer depends on Stream Chat, and `VisionAgents(url, customerId, apiKey)` takes the key for Stream beside a customer id. Dart is done: `VoiceSession.join(camera:)` and `VoiceCallView(voice:)` drop `CallCredentials` and its provider and join on one shared `StreamVideo`; chat is a new pure-Dart package (`sdks/dart/chat`, `stream_agents_chat`) whose `session.chat()` builds or reuses one `StreamChatClient` and answers the conversation's `Channel`; `agents.useChat(client)` and `agents.useVideo(client)` hand over the app's own (Dart has no overloading), `agents.disconnect()` closes only the built ones, `Backend.shared` and `give` hold them per key and user, and the request key travels in the `api_key` query, not `X-Api-Key`, which Stream's proxy doesn't read. Go and the other server-side SDKs need nothing, since they hold no chat or video client.
Swift is one package now, and asks before a tool runs. `sdks/swift/core` (`VisionAgentsCore`) is the only Swift artifact: `ui`, `rtc` and `chat` are gone, `VoiceSession` and `session.chat()` live in core, which depends on `StreamChat` (5.13+) and `StreamVideo`, and the views are Stream Chat's AI components (`StreamChatAI`), composed in the Swift demos. A tool may ask first: `AgentTool.approval` (`title`, `message`, `reasonArgument`, `allowTitle`, `declineTitle`) is sent as `SessionTool.approval`; a call of such a tool is not run when its `tool_call` arrives but waits in `AgentSession.approvals` until `decide(toolCallID, allowed:, summary:)` sends `tool_approval {tool_call_id, allowed, summary, request_id, turn_id}`, then runs the tool (allowed) or answers `tool_result` with an error (declined); `tool_cancel` drops it. `LiveReasoning` reassembles a reply's whole thinking from the `reasoning` windows `{id, offset, text, length}` of its live updates, counting Unicode scalars. No spec or router change. JavaScript, Kotlin and Dart are done: `approval` on a tool (JavaScript's `Tool` also gained `executor` and `displayTitle`), the held calls as `session.approvals`, and `decide`; and `LiveReasoning`, in JavaScript's main entry point, Kotlin's core (read from a message by the chat module's `LiveReasoning.read`) and Dart's chat package. Go sends `approval` with a session tool (`tools.NeedsApproval`) and `tool_approval` (`Session.AnswerApproval`); in writing it holds no call, which runs as it comes, and on a voice call the router asks. Python (`plugins/stream`) still needs to send `approval` with a session tool, hold its calls until the person answers, and send `tool_approval`. Kotlin and Dart keep their core, ui and rtc packages unless asked to follow Swift onto Stream's AI components. Answering a call a reopened app shows from the conversation, which its socket was never asked, is done in JavaScript (`decide` with `call`), Kotlin (`decide(ShownToolCall, ...)`), Swift (`decide(_: ShownToolCall, allowed:summary:)`, which the approval cards of `swift_assistant` and `swift_demo` use) and Dart (`decideShown(ShownToolCall, ...)`, a name of its own since Dart has no overloading): an allowed call of the session's tools runs there, and a call answered or run there is neither asked about nor run again when the router sends it again. The same answer reaches a call the router holds itself, which never comes as a `tool_call` frame: a connector's under `require_approval`, and the agent's scheduling tools when they set up or change a repeating task (#2533). Go, whose `AnswerApproval` already sends an answer by id and which holds no call in writing, needs nothing.
Kotlin is one module now, as Swift is one package. `sdks/kotlin/core` (`stream-agents-android-core`, package `io.getstream.agents.android.core`) is the only Kotlin artifact: `ui`, `rtc` and `chat` are gone, `VoiceSession` and `session.chat(context)` live in core, which is an Android library depending on Stream Chat (7.15.0+, from `https://stream-io-repo.com`) and Stream Video, and the views are Stream Chat's AI components (`stream-chat-android-ai-compose`). `ChatFailed` and `CallFailed` are `AgentsException.ChatFailed` and `AgentsException.CallFailed`. No wire change; the other SDKs have nothing to do.
Dart has no views of its own now, as Swift and Kotlin have none. `sdks/dart/ui` (`vision_agents_ui`) is gone; `core`, `chat` and `rtc` stay three packages, since a pure-Dart core is what keeps them apart. A conversation is shown with Stream Chat's AI components (`stream_chat_flutter_ai`: `AIConversationView`, `AIMessagePartsView`, `ChatComposer`, `AIVoiceGlowView`), composed in `examples/voice_agents/flutter_demo`, the Flutter half of swift_demo. No wire change; the other SDKs have nothing to do.
`setConnectorOAuthClient` (`PUT /v1/agents/connectors/{id}/oauth-client`) now points the pinned Stream app's message hook for a provider app of a connector whose channel is verified with the app's own secret, such as `slack_bot`, as the provider app PUTs do, and may answer 503 when Stream refuses (the client is kept; put it again). Only the description and the 503 changed in the spec. Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the description when they regenerate. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
A channel connection, one whose connector reads messages (`slack_bot`, `linq`, `telnyx`, `whatsapp`), belongs to one live agent config (AI-1049, AI-1048). `createAgentConfig`, `updateAgentConfig`, `patchAgentConfig` and `syncAgent` answer a 409, type `conflict`, new code `channel_connection_taken`, when the write newly binds such a connection as `fixed` and another live config binds it already; the message names that config (name and id) and says to remove its binding first. A save that keeps a binding the config already had is not refused. A config whose `tags` has `draft_of` (the dashboard's test copy) is not refused, answers no channel message and subscribes to no MCP event. An MCP event is subscribed to once per connection, by the oldest live config that declares it. Only descriptions changed in the spec (`ErrorDetail.code`, `AgentConfigRequest.tags`). Go and JavaScript have the regenerated client and types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP pick up the descriptions when they regenerate; an SDK that syncs `agent.yaml` may show the 409's message as it is. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
`Connection` gains `last_validation`, a read-only `ConnectionLastValidation` `{status, code, error, checked_at}` (AI-1052): what the connection's last `POST /v1/agents/connections/{id}/validate` found, on `getConnection` and `listConnections`; absent until the first validate, and again once new credentials are stored (a token saved, a consent, a refresh). `status` is a `ConnectionValidationStatus`; `code` is the validate's code (`connector_credential_rejected`, `connector_scope_required`) or else the provider's HTTP status when its last answer was an error (`400`, `503`); `error` has every value the credential is sent as cut out and is cut at 1 KiB. A validate whose provider answers a `bearer` or `api_key` connection with any 4xx but 429 now moves it to `needs_reauthorization` with code `connector_credential_rejected`, as a 401 does; a 5xx, a 429 or no answer keeps it `connected`. OAuth connections and tool calls keep the 401-only rule. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated `Connection` and `ConnectionLastValidation` models (only those files: the rest of its generated client is behind the spec on the base already). .NET, Ruby, Rust and PHP need their generated `Connection` regenerated. Swift, Kotlin and Dart need nothing, since no connection operation is client-accessible.
The connection proxy (`proxyConnection*`, `/v1/agents/connections/{id}/proxy/{path}`) caps an app's direct calls to one connector per minute (AI-958): `ROUTER_CONNECTORS_PROXY_CALLS_PER_MINUTE`, 60 by default; a call over it is a 429 `rate_limited` with `Retry-After`, and is not sent. A `{path}` holding `%2F`, `%5C` (any case) or a dot segment, written or escaped, is a 400 before anything is sent, so a generated client that escapes a slash in `path` reaches single-segment paths only. The built-in `slack_bot` takes direct calls from revision 5 (`api_base: https://slack.com/api`). Only descriptions changed in the spec. Go and JavaScript have the regenerated client and types, and Python (`plugins/stream`) the regenerated `proxy_connection_get` and `proxy_connection_delete` (only those files). .NET, Ruby, Rust and PHP pick up the descriptions when they regenerate, and should treat the proxy's 429 as "wait Retry-After" whether the provider or the router answered it. Swift, Kotlin and Dart need nothing, since the proxy is server-side only.
`Connector` has a read-only `channel` bool (AI-1053): true when its manifest reads inbound messages that agents answer, so a delete dialog can warn that the replies stop. Go and JS are regenerated; other SDKs need the field on their `Connector` model. A connection delete now also names the dropped token by fingerprint in its `grant_revoked` audit row (`credential.access_fingerprint`).
A session id may now start with `support-` or `thread-`: `createSession`, `placePhoneCall` and the session socket take any id of up to 64 letters, digits, `-` and `_` (an id a thread channel has is a 409, as an id another session has). Only the description of `CreateSessionRequest.id` changed in the spec. Go, JavaScript, Python (`plugins/stream`) and Swift have the regenerated client and types. Kotlin, .NET and Rust pick up the description when they regenerate; an SDK that checks a session id itself must stop refusing the two prefixes.
The client SDKs have an integration suite for their two promises: a device cannot mint a token or reach a server-side operation, and an app has one Stream Chat and one Stream Video connection per user however many sessions it opens, with no second presence or push device. JavaScript (`sdks/js/tests/live/integration.test.ts`, `npm run test:integration`), Swift (`PostureTests`), Kotlin (`StreamClientsTest`, `PostureTest`, `KeyedRouterPostureTest`) and Dart (`stream_clients_test.dart`, `posture_test.dart`, `keyed_router_posture_test.dart`) are done; the live posture checks need a router in `api_key` mode, set up as in the JS README. No spec or router change.
`CreateResponseRequest` gains `max_output_tokens` (integer, at least 1) and `reasoning_effort` (a string, one of the efforts the session's model accepts; any other is a 400 before the turn starts). Both apply to that answer and the replies that finish it after its tools, written over the session's own, and a question carrying them is still text only, so it keeps its request id. Go is done: `client.MaxOutputTokens` and `client.ReasoningEffort` are new `Input`s to `Responses.Create`. JavaScript (`maxOutputTokens` and `reasoningEffort` in `CreateResponseOptions`), Kotlin, Swift and Dart (`maxOutputTokens` and `reasoningEffort` arguments to `responses.create`, from regenerated request models) are done, each sending a field only when it is set. Python (`plugins/stream`), .NET, Ruby, Rust and PHP still need both as options on `responses.create`, regenerating their clients where the request body is generated.
`AgentConnectorBinding` gains `tool_patterns` (AI-1104): names or `path.Match` patterns, mutually exclusive with a non-empty `tools`, on session and fixed bindings. An empty list is a 400 (`minItems` 1). A match is pinned per connection on first use. At most 128 patterns, and a session offers at most the first 128 matches by name. Go, JavaScript and Python (`plugins/stream`, `agent_connector_binding.py`) have the regenerated field. .NET, Ruby, Rust and PHP need their generated `AgentConnectorBinding` regenerated. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
`agent.yaml` gains `connectors:` (AI-1104), read at folder sync and sent as `SyncAgentRequest.connectors`. A string `linear` is `{name: linear, connector_id: linear, connection: {type: session}, tool_patterns: ["*"]}`. An object is `{name, connector (the connector id, default the name), tools (sent as tool_patterns, as written; left out or null is ["*"]; [] is refused), connection (an id, or the single label, of the app's connections to that connector — `GET /v1/agents/connections?owner_type=app&connector_id=…`, every page; an id wins, otherwise exactly one label, otherwise an error that names the entry — and then `connection: {type: fixed, connection_id}`; left out is session), required}`. A key the entry does not know is refused. A non-empty `plugins`, `plugin_events` or `mcp_servers` in agent.yaml is refused at folder read (Go, JavaScript), so no alias is checked against them. Go (`sdks/go/agents`) and JavaScript are done; JavaScript refuses a non-empty `plugins` or `mcp_servers` at folder read, so it checks no alias against them, and its fingerprint takes the connectors as declared, so an unchanged directory lists no connections. Ruby, PHP, Rust and .NET need `connectors:` in their folder sync. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
A device with the app's key and no user yet asks for a guest anonymously: `createGuestUser` alone is sent with `Stream-Auth-Type: anonymous` (`stream-auth-type`, beside an `api_key` header, through Stream's proxy), the key and no token. A 401 to it is not an expired token but a router admitting no anonymous callers, so it is a configuration error saying to mint the guest on the backend with the server SDK's `guestUser` and hand it to `setUser` (`withGuest` in Dart). Stream's hosted proxy answers it 401 today, `anonymous access is not available on the acceleration api`, until it is opened for `POST /v1/agents/guests`. JavaScript, Swift, Kotlin and Dart are done; Dart's `Backend` now takes an api key with no token, and any other request from it throws. Server-side SDKs need nothing: they mint guests with the secret. No spec or router change.
`agent.yaml` gains `connectors:` (AI-1104), read at folder sync and sent as `SyncAgentRequest.connectors`. A string `linear` is `{name: linear, connector_id: linear, connection: {type: session}, tool_patterns: ["*"]}`. An object is `{name, connector (the connector id, default the name), tools (sent as tool_patterns, as written; left out or null is ["*"]; [] is refused), connection (an id, or the single label, of the app's connections to that connector — `GET /v1/agents/connections?owner_type=app&connector_id=…`, every page; an id wins, otherwise exactly one label, otherwise an error that names the entry — and then `connection: {type: fixed, connection_id}`; left out is session), required}`. A key the entry does not know is refused. A non-empty `plugins`, `plugin_events` or `mcp_servers` in agent.yaml is refused at folder read (Go, JavaScript), so no alias is checked against them. Go (`sdks/go/agents`) and JavaScript are done. Ruby, PHP, Rust and .NET need `connectors:` in their folder sync. Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
Go router configs now carry STS through `RouterOptions.STS`, `DefineRouter` and `SyncRouters`, and open it with `Router.STS().Realtime`. Other SDKs that define or sync router configs need matching STS support.
Registration of an app's own Stream app is gone: `updateAppStreamCredentials` (`PUT /v1/settings/app/stream/credentials`) and `checkAppStreamCredentials` (`POST .../check`) are removed, and `getAppSettings` no longer answers `revision`, `state`, `state_reason`, `primary_key`, `allow_guests` or `keys[]`; `stream_app_id` stays, set in app mode when the work is written into the app's own Stream app. In app mode the router acts in a customer's app with the server token the gateway forwards, so nothing is registered. Go (`sdks/go`) is done: `Settings().RegisterStream`, `DisconnectStream` and `CheckStream` are deleted. JavaScript, Python (`plugins/stream`), Swift, .NET, Ruby, Rust and PHP need their generated clients regenerated and the three methods dropped, and the Volt dashboard's generated types still carry the two operations.
JavaScript reads `channels:` from `agent.yaml` (`sdks/js/src/folder.ts`) with the Go shape: `channels: {whatsapp, sms, imessage: {number}, identity}`, an unknown key at either level refused. A non-empty `plugins` or `mcp_servers` is refused at folder read, with the pointer to `connectors`, as Go does (AI-2533). `plugin_events` is refused as an unknown key (`folder.ts` "which is not something an agent has"), even when empty, unlike Go, which refuses it with the pointer only when non-empty. Nothing is sent for them, and no connector alias is checked against them. The sync sends `channels` whenever the key is a mapping (`{}` included), a line only with a number, `identity` only when set. Its fingerprint is still its own (SHA-256 over the canonical sync body), so it covers the channels but is not byte-compatible with Go's md5 over the files. Ruby, PHP, Rust and .NET still need `channels:` in their folder sync.
A skill may now be a folder (`skills/<name>/SKILL.md` plus any nested files beside it). `SkillRequest` gains `files` (each file's text by slash path relative to the folder, at most 64 files and 1 MB in all) and `Skill` answers `file_paths`. A file that is not `.md`, `.mdx` or `.txt` is a script: `syncAgent`, `createSkill`, `updateSkill`, `updateAgentConfig` and `patchAgentConfig` refuse with a 400 a skill with scripts on a config without a sandbox, and a session from such a config fails to start. The model reads a skill's files one at a time (`load_skill` with `path` in text, `read_skill_file` for the subagent), and the scripts are written into the sandbox under `skills/<name>/`. Go (`sdks/go/agents`) is done: `Skill.Files`, folder skills in `Load` (non-UTF-8 files refused, a name that is both `x.md` and `x/` refused), and the fingerprint takes `\nfile:<path>\n<content>` per file, sorted by path, after the skill's deadline, only when a skill has files, so a directory without folder skills keeps its hash. Hidden files and folders (`.DS_Store`) and `__pycache__` are left out of a skill. Python (`plugins/stream`, `folder.py`), .NET, Ruby, Rust and PHP are done too, each pinning the folder-skill golden hash `e47f7807b97bbcbdee683c6c481d1d36` beside the old one. JavaScript (`folder.ts`) reads folder skills and sends their files; its fingerprint is a SHA-256 of the sync request, not this hash, so it has no golden test. Swift, Kotlin and Dart need nothing, since skills are server-side only.
`POST /v1/detection` (`detect`) is new, server-side only: one JPEG or PNG in, boxes out as fractions of the image (`DetectionResult{id, status, provider, model, detections[{label, confidence, box{x_min, y_min, x_max, y_max}, embedding}], cost_micros, error, error_code}`), routed by `options.target` (`detection-fast` by default, `detection-open` for words Moondream looks for, `detection-faces` for faces with embeddings) or `options.providers`, with `classes`, `min_confidence`, `embeddings` and per-provider `overwrites`. A detection that reached a provider and failed is a 200 with `status: failed`. Go is done: `client.Detect(ctx, image, options)`. JavaScript has the regenerated types and Python (`plugins/stream`) the regenerated `detect` operation and models, used by `stream.DetectionProcessor`. .NET, Ruby, Rust and PHP need a detect call and their generated clients regenerated. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`GET /v1/stats/agents` (`getAgentStats`) is new, server-side only: over `from` and `to`, `AgentStats{peak_concurrent_sessions, peak_at, tool_calls, tools[]}`, each `ToolStats{tool, calls, failed, avg_tokens, avg_ms, p99_ms}`, most called first. Go has the regenerated client and JavaScript the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing.
`POST /v1/agents/calls/reviews/analysis` (`analyzeReviews`) is new, server-side only: over `{from, to, target?}` it reads the latest 100 calls whose post-call review scored 3 or lower and answers `ReviewAnalysis{calls_read, summary, causes[{title, explanation, fix, call_ids}]}`, costing one model call. `listCalls` gains `max_review_score` (1 to 5). Go has the regenerated client and JavaScript the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing.
Ruby reads `connectors:` from `agent.yaml` (`sdks/ruby/lib/getstream/vision_agents/folder.rb`, `agent.rb`) with the Go shape, the same refusals and the connection lookup through `GET /v1/agents/connections` (every page), and refuses a non-empty `plugins` at folder read with the pointer to `connectors`. The fingerprint is unchanged: it hashes the file as written. The older shared notes above that list Ruby alongside PHP, Rust and .NET for `connectors:` no longer apply to Ruby.
Rust reads `connectors:` from `agent.yaml` (`sdks/rust/src/folder.rs`, `connector_bindings` in `agent.rs`), as Go does. The `agent.yaml gains connectors:` note above (AI-1104) no longer applies to Rust. A non-empty `plugins` or `plugin_events` is refused at folder read (AI-2529). Its fingerprint hashes the file as written, unchanged.
PHP reads `connectors:` from `agent.yaml` (`sdks/php/src/Folder/Connector.php`, sent by `Agent::sync`) with the Go shape and wording. A non-empty `plugins` is refused at folder read with the pointer to `connectors`. Still open for PHP: `mcp_servers:` and `channels:` (unknown keys are refused), `plugins` entries as mappings, and the three generated models `bin/generate.php --check` reports stale. The `connectors:` notes above no longer apply to PHP.
.NET reads `connectors:` from `agent.yaml` (`sdks/dotnet/src/GetStream.VisionAgents/Folder.cs`, `Agent.cs`) with the Go shape, and sends it as `SyncAgentRequest.connectors` at `SyncAsync`: a label is resolved through `GET /v1/agents/connections` (`owner_type=app`, every page), and a non-empty `plugins` is refused at folder read with the pointer to `connectors`. The fingerprint hashes `agent.yaml` as written, so it is unchanged. The notes above that .NET needs `connectors:` no longer apply.
`Policy` gains an optional `quota` (AI-1238), a new `Quota` `{messages_per_user_per_day, tokens_per_user_per_day}`, both optional integers from 0 (no cap) to 10,000,000 messages and 10^12 tokens. An app sets it with `updateAppPolicy` and reads it with `getAppPolicy`; left out, the deployment's default applies. `updateOrganizationPolicy` refuses a `quota` with a 400. A counted answer also carries `X-Quota-Limit`, `X-Quota-Remaining` and `X-Quota-Reset` headers. Go has the regenerated client and JavaScript the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated for `quota` in the policy body. Swift, Kotlin and Dart need nothing, since the policy operations are server-side only.
Leaving a call over the session socket now waits for the router to hang up: after sending `{"type": "close"}`, the SDK keeps reading until the router closes the socket (it does once the session has ended), for at most 5 seconds, and only then closes its side. Closing the connection straight after writing the frame lost it behind the hosted proxy, leaving the session running on the router with nobody on it, which also held a draining router open for its whole drain. Go (`Pipeline.Leave`, `sdks/go/stream/accelerated.go`) is done. JavaScript, Python (`plugins/stream`), Swift, Kotlin, Dart, .NET, Ruby, Rust and PHP need the same wait wherever they send `close` and then close the socket. No spec or router change.
Turns and call events are now kept in Redis for an hour, and turn stats are counted as each turn finishes. Only descriptions changed in the spec: `getCallEvents` and `getCallTimeline` say they cover the last hour, and `getTurnStats` says its percentiles are within 5%. No shapes changed. Go has the regenerated client and JavaScript the regenerated types. Python (`plugins/stream`), Swift, .NET, Ruby, Rust and PHP need their generated clients regenerated for the new doc comments. Kotlin and Dart need nothing.
`ConnectionInvocation` (`GET /v1/agents/connections/{id}/invocations`, `listConnectionInvocations`) gains two optional fields: `provider_status` (integer, the provider's HTTP status for a failed call, absent when none answered) and `error_message` (string, why the call failed, at most 1 KiB, absent for a call that answered). Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated model. .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`SandboxOptions` gains `network` (boolean), `allowed_domains` (at most 64 domains) and `network_allow_list` (at most 64 CIDR ranges), saying what code in the sandbox may reach. A sandbox now blocks every outbound connection unless `network` is true or an allow list is set; an allow list narrows what `network` opens, so with one set only the listed domains or ranges are reachable. The router refuses a domain with a comma, slash or space and a range that is not CIDR. `agent.yaml` takes the three under `sandbox_options:`; refuse a `network` that is not a boolean. Every server SDK has moved: Go (`agents.SandboxSettings.Network`, `.AllowedDomains`, `.NetworkAllowList`), Python (`SandboxSettings` in `plugins/stream`), JavaScript (`Declaration.sandboxOptions`), Rust (`Settings.sandbox_options`), Ruby, PHP (`Declaration::$sandboxOptions`) and .NET (`Declaration.SandboxOptions`), each with its generated client regenerated. Swift, Kotlin and Dart need nothing, since config is server-side.
`ConnectionValidationStatus` gains `needs_reapproval` (AI-1304), and `ConnectionValidation` an optional `changed_tools` (string array, sorted): `validateConnection` answers it, with `code: connector_tool_schema_changed`, when the provider lists a tool at another schema than the one a session pinned it at for the connection's current grant. A client that decodes the status as a closed enum fails on the new value until regenerated. Go has the regenerated client, JavaScript the regenerated types, and Python (`plugins/stream`), .NET, Ruby, Rust and PHP the regenerated models (only the `ConnectionValidation` and status hunks; the inherited `quota` and invocation drift on base is left alone). Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`approveConnectionTools` (`POST /v1/agents/connections/{id}/tools/approve`, AI-1305) is new: body `ConnectionToolsApproval` (`tools`, 1 to 128 of `ConnectionToolApproval` `{name, schema_digest}`), answer `ApprovedConnectionTools` (`connection_id`, `tools` of `ApprovedConnectionTool` `{name, schema_digest, previous_schema_digest?}`), 400 for a tool `GET .../tools` does not list or one named twice, 409 for another digest or a pin that moved. `ConnectorAuditAction` gains `tool_reapproved`, and `ConnectorAuditEvent` an optional `tools` (`ApprovedConnectionTool` array): a client that decodes the action as a closed enum fails on the new value until regenerated. Go has the regenerated client, JavaScript the regenerated types, and Python (`plugins/stream`), .NET, Ruby, Rust and PHP the regenerated models (only this change's hunks; the inherited drift on base is left alone). No SDK wraps it by hand, as none wraps `validateConnection`. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`listConnections` (`GET /v1/agents/connections`) takes `owner_type` as optional now (AI-1293): left out, it lists the app's own, as `owner_type=app` does; `user` still needs `X-Stream-User-Id`. Go has the regenerated client (`ListConnectionsParams.OwnerType` is a pointer; `agents` still sends `app`), JavaScript the regenerated types and Python (`plugins/stream`) the regenerated `list_connections`. .NET, Ruby, Rust and PHP need their generated clients regenerated for the new docs; each already sends `owner_type=app`, so none needs a code change. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`listConnections` (`GET /v1/agents/connections`) with `owner_type=user` and no `X-Stream-User-Id` now lists every user's connections from a server-side caller (AI-1342), where it was a 400; with the header it still lists that user's. Only descriptions changed in the spec (`owner_type`, `next_cursor`, the operation). Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated `list_connections` and `ConnectionPage`. .NET, Ruby, Rust and PHP need their generated clients regenerated for the new docs; none needs a code change, since each lists `owner_type=app`. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`ErrorDetail.code` gains `no_oauth_client` (AI-1357): a 400 from `createAuthorization` (`POST /v1/agents/connections/{id}/authorizations`) when the connector finds no OAuth client and lists `customer` or `managed` in `client.registration`; the message names the oauth-client and provider-app PUTs it can take. Only the `code` description changed in the spec. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated `ErrorDetail`. .NET, Ruby, Rust, PHP, Swift, Kotlin and Dart need their generated `ErrorDetail` regenerated for the new docs; none needs a code change.
A `connection:` in an agent.yaml `connectors:` entry that the app does not have (no id matches, no label matches) no longer fails the folder sync (AI-1368). The entry is left out of `SyncAgentRequest.connectors`, a warning names the agent, the connector and the connection (`agent.yaml connector left out: the app has no such connection`), and the rest of the agent syncs. Still refused: a label that matches several connections, a failed listing, and a missing connection on an entry with `required: true`, whose error now ends `add the connection, or drop required`. A sync that left an entry out sends and stamps a different hash (the directory's fingerprint folded with what was left out), because the router does nothing for a hash it already stored: the next sync, once the connection exists, sends the directory's own hash and adds the binding. No spec change. Go (`sdks/go/agents`) is done. JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP need the same in their folder sync.
`SyncAgentRequest` takes an optional `left_out_connectors` (AI-1371): up to 64 `LeftOutConnector` `{name, connector_id, connection}`, the agent.yaml connectors a folder sync left out of `connectors` because the app has no connection by that id or label. `AgentConfig` serves the stored list read-only as `left_out_connectors`, absent when empty. Sent without `connectors` it is a 400; sent with `connectors` it replaces the stored list, and no `left_out_connectors` beside `connectors` clears it; a sync that sends neither leaves the stored list alone. Go (`sdks/go/agents`, `Agent.Sync`) sends it, skipping an entry over the caps (alias 63, connector id 64, label 120 characters; it still warns), and folds a `left_out_connectors` marker into the hash of a sync that left something out, so an agent an earlier SDK synced with the same missing connection stores the list. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated models (only this change's hunks; the inherited drift on base is left alone). JavaScript, Python, .NET, Ruby, Rust and PHP need to send it from their folder sync once they leave connectors out as Go does, and .NET, Ruby, Rust and PHP need their generated models regenerated. The CLI is AI-1373. Swift, Kotlin and Dart need nothing, since sync and config are server-side.
`ConnectionValidationStatus` `failed` now names consent refusals (AI-1379): the provider refused a consent with an error other than `access_denied`, so `ConnectionLastValidation` (`last_validation` on the connection) carries `status: failed`, `code: connector_consent_refused` and the provider's reason in `error`, and `checked_at` is when the refusal happened. Only descriptions changed in the spec (the status, `ConnectionLastValidation.code` and `.checked_at`, and `Connection.last_validation`); no shape changed. Go, JavaScript, Python (`plugins/stream`) and Kotlin were regenerated in #980; .NET, Ruby, Rust and PHP in this PR (only the `ConnectionValidationStatus`, `ConnectionLastValidation` and `Connection.last_validation` hunks; the inherited drift on base is left alone; Ruby's table holds property names only, so it has no hunk). Swift and Dart need nothing, since they have no such type.
`CreateSessionRequest` takes an optional `instructions` (AI-1385): what the agent is told to be for this session alone, replacing its config's instructions; empty or left out, the config's stand. Server-side only, like `history`: a device sending it on `POST /v1/agents/sessions` is a 403 (`errDeviceInstructions`), and so is a device's session socket start frame. A fork of a running session keeps them; a reopened session rebuilt from its row and a fork of a stored parent or naming a config run on the config's instructions again (no column holds them). The `ModelOverwrites` description now says instructions are set with this field rather than not at all. Go (`client.SessionOptions.Instructions`) sends it, JavaScript's `SessionSpec` takes it from the regenerated types, and Python's `stream.Accelerated` sends the Agent's instructions when it has no `config`. Every generated client was regenerated (only this change's hunks; the inherited drift on base is left alone). Python (`plugins/stream` `SessionOptions`), .NET, Ruby, Rust and PHP need to expose `instructions` on session create. Swift, Kotlin and Dart need nothing, since a device may not send it.
`createAuthorization` takes an optional body, `AuthorizationRequest` `{return_url}` (AI-1383): the app's own page a connector consent goes back to, with `connection_id` and `status` added to its query and its own query kept; the launch page then takes the handoff only from that URL's origin. Absent or empty, the consent goes back to the dashboard as before, so a call without a body is unchanged. Validated by the router (https, or http on a loopback host; no userinfo, no fragment, a key=value query, at most 2048 bytes; else a 400 `invalid_request` starting `return_url:`). `Authorization.launch_url` and `.handoff_token` and the launch page and callback descriptions changed. Every generated client was regenerated (only this change's hunks; the inherited drift on base is left alone): Go's `CreateAuthorization` and Rust's `create_authorization` now take the body (`AuthorizationRequest{}` / `None` for none). No SDK has a hand-written consent method yet; one that adds it takes `return_url`. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`CreateSessionRequest` takes an optional `return_url` (AI-1384), on `createSession` and the session socket's `start` frame: the app's own page the logins (`connector_authorization` attachment) and step-ups (`connector_scope_required` frame) the chat asks for go back to, exactly as `createAuthorization`'s `return_url`, with the same rules and the same 400 `invalid_request` starting `return_url:`. A page of its origin opens `launch_url` and posts `handoff_token`. Absent or empty, those consents go back to the dashboard as before. The router keeps it with the session, so a chat carried on after it ended and a fork go back to it too; `Session` does not answer it. It is client-accessible, like the rest of the request. Every generated client was regenerated (only this change's hunks). Go's `SessionOptions` has `ReturnURL` and Python's `SessionOptions` has `return_url`. JavaScript takes it through the generated `CreateSessionRequest`; .NET, Ruby, Rust and PHP have it on their generated request and need it on their session options if they wrap them. Swift, Kotlin and Dart have the generated field and should not expose it until they have a launch flow, since a native app has no page to open the popup from.
`CreateSessionRequest.call` and `StartSessionVoiceRequest.call` (`SessionCall {type, id}`, AI-1398): a session joins an existing Stream call instead of `agent:<session id>`. Go (`client.SessionOptions.Call`, `Session.Voice.Start(ctx, client.OnCall(...))`, `stream.Call.CallType`/`CallID`) and Python's `stream.Accelerated` are done. JavaScript, Python (`plugins/stream` `SessionOptions`, `Voice.start`), .NET, Ruby, Rust (`Session::start_voice` sends `None`), PHP need to expose it on session create and voice start; their models are regenerated. Swift, Kotlin and Dart need nothing, since a device may not send it.
`return_url` (`AuthorizationRequest`, `CreateSessionRequest`) may now be a native app's own private-use scheme in reverse domain form (RFC 8252 section 7.1), such as `com.example.app:/connected`. Its consent's launch page reads `handoff_token` from its fragment, so an app opens `launch_url#handoff_token=<handoff_token>` in its web authentication sheet and the callback hands the sheet back to the scheme. That is the launch flow Swift, Kotlin and Dart were waiting for: they may now expose `return_url` on their session options and open a `connector_authorization` attachment's `launch_url` that way. Only docs changed in the spec. Go has the regenerated client and JavaScript the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated for the new docs; none needs a code change.
A question with `request_id` may now carry `images` (data URIs, at most 8) on `createResponse` and the session socket's `respond`, where it was a 400 "a request id carries text only": the router uploads them to the conversation's channel and writes them on the person's message. Only the `request_id` description changed in the spec. Go has the regenerated client, JavaScript the regenerated types, and Swift and Kotlin their regenerated generated code; Swift (`Responses.body`) now sends a request id with images too. Kotlin (`Responses.kt`) and Dart (`sessions.dart`) still leave the request id out when images are attached, so a signed-in device there still gets "personal conversations require a command ID"; they need to send it always, as Swift does. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated for the new doc; none needs a code change.
A tool may answer with pictures (no spec change: `tool_result.output` was already a string or a parts array). Go (`tools.Output` with `Text` and `Images`, returned from a tool's `Run`; `Registry.Call` returns a `tools.Output`), Swift (`ToolOutput`, from an `AgentTool` whose `run` returns one) and Kotlin (`ToolOutput`, from a tool declared with `AgentTool.withPictures`) send them as `[{type: text}, {type: image_url, image_url: {url, detail?}}]`. JavaScript (`tools.call` renders to a string), Python (`plugins/stream`), Dart, .NET, Ruby, Rust and PHP still send words only and need the same. A tool hosted on a dispatch worker answers in words only, since the router's dispatch `tool_result` takes a string; Go reports one that returned pictures as failed.
A phone on a call can answer the router's `get_video_frames` capture request from its own camera (no spec change: it is a `tool_call` the router already sends, answered with `tool_result` parts). Swift does it in `VoiceSession` (`CameraFrames`, through `Call.setVideoFilter`, answered by the call's `AgentSession` without declaring a tool). Kotlin does it in `VoiceSession` too (`CameraFrames`, through `call.videoFilter`, running whatever filter was there first and putting itself back when Stream Video's moderation blur replaces it). Dart needs the same once it can send a tool's pictures; the server SDKs need nothing.
`ProviderHealth.available` is now also false for a speech-to-text model for one health window after a fatal error (AI-1417). Only the doc changed in the spec. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated model. .NET, Rust and PHP need their generated clients regenerated for the new doc; none needs a code change. Ruby, Swift, Kotlin and Dart need nothing, since they have no such doc.
`Provider` (`GET /v1/{modality}/providers`) gains an optional `supports` (AI-1419): the options the model can be asked for (`keyterms`, `diarize`, `similarity`, `semantic_turns`, ...), left out when it takes none. Go has the regenerated client (`Provider.Supports *[]string`), JavaScript the regenerated types and Python (`plugins/stream`) the regenerated `Provider` (only this change's hunk; the inherited drift on base is left alone). .NET, Ruby, Rust and PHP need their generated `Provider` regenerated; none needs a code change. Swift, Kotlin and Dart need nothing, since they have no `Provider` type (the operation is server-side only).
The `voice` request fields (`CreateSessionRequest`, `AgentConfigRequest`, `UpdateSessionRequest`, `SessionSettingsRequest`, and `AgentConfig`, `AgentConfigPatch`, `SyncAgentRequest`, which had no doc) now say what `TtsOptions.voice` says (AI-1414): a provider's own voice id, or one of your voices by id or by name, with `custom:` to mean only yours, so a typo is refused instead of passed to the provider's library; a native (sts) session or agent takes the vendor's own voice name instead. `SpeechRequest.inline` and the `recordSpeech` description now say what an inline recording is for and its limits (16000 characters, no callback, 90 seconds, a 202 even when it failed). Only docs changed in the spec. Every generated client was regenerated (only this change's hunks; the inherited drift on base is left alone); Ruby and Dart carry none of these docs. Go's `stream.Accelerated.Voice` and Python's `stream.TTS`, `Accelerated` and `define_agent` docstrings have the new wording; so do the hand-written voice docs in JavaScript (`agent.ts`), Dart (`models.dart`), .NET (`Agent.cs`, `Folder.cs`), Kotlin (`Options.kt`, #1099) and Swift (`VisionAgents.swift`) (AI-1451). Python's `router.tts.recording(..., inline=True)` now sends `inline` (Go's `InlineRecording` and .NET's `RecordingAsync(inline:)` already did). Rust (`router.rs` sends `inline: None`), PHP and Ruby need to offer it on their speech recording.
Scheduled tasks are new (the nine `/v1/agents/scheduled-tasks` operations: `createScheduledTask`, `listScheduledTasks`, `getScheduledTask`, `updateScheduledTask`, `pauseScheduledTask`, `resumeScheduledTask`, `runScheduledTask`, `deleteScheduledTask`, `listScheduledTaskRuns`). `createScheduledTask` and `runScheduledTask` are server-side only; the other seven are `x-client-accessible` for the task's owner. `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` gain `scheduling` (`AgentScheduling`: `enabled`, `max_tasks_per_user`, `default_timezone`), and `CreateSessionRequest` an optional `timezone` (an IANA zone, remembered as the user's). Go has the regenerated client, `agents.SessionOptions.Timezone` (and `client.SessionOptions.Timezone`, `stream.Call.Timezone`) and `agents.SchedulingSettings` in folder sync; Python (`plugins/stream`) has the regenerated client and `SchedulingSettings` in its folder sync; JavaScript has the regenerated types and a `scheduling` key in `parseDeclaration`, sent on sync. .NET, Ruby, Rust and PHP need their generated clients regenerated for the new operations and models; none has a hand-written wrapper, matching campaigns. Swift, Kotlin and Dart generate only client-accessible operations from their own lists and do not take the seven yet: each needs its filter or audit list extended when a device surface for a user's own tasks is designed.
Scheduled tasks gain delivery channels: `CreateScheduledTaskRequest` and `UpdateScheduledTaskRequest` take `deliver_to` (an ordered list of `conversation`, `sms`, `whatsapp`, `imessage`, `phone`) and `quiet_hours` (`ScheduledTaskQuietHours`: `start`, `end` as "22:00"); `ScheduledTask` reads both back; `ScheduledTaskRun.delivered_to` now also names `sms`, `whatsapp`, `imessage` or `phone`. Go, Python (`plugins/stream`) and JavaScript have the regenerated clients; nothing hand-written changed, since delivery is chosen per task, not declared in the folder. .NET, Ruby, Rust and PHP need their generated clients regenerated for the new fields and model; Swift, Kotlin and Dart pick the fields up when their client-accessible filters next regenerate.
`createRun` (`POST /v1/agents/runs`, AI-1471): server-side only. Runs an agent config as an incognito headless text session on one `input` (any JSON value, handed to the agent as JSON data), with optional per-run `instructions` added to the config's, `tags` and `timeout_ms` (1000 to 600000, two minutes by default), and answers once the session settles with `Run` `{final_text, session_id, model_route, usage}` (`usage` is a `CallUsage` summed over the run's model calls). Failures: 404 `agent_config_not_found`, 400 `invalid_config`, 429 `budget_exceeded`, 503 `model_failed`, 504 `timeout`. `ErrorType` gains `timeout` (504) and `ErrorDetail.code` gains `invalid_config`, `budget_exceeded` and `model_failed`. Go has the regenerated client (`CreateRun`) and JavaScript the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and a hand-written run method if they wrap one; Kotlin needs its generated `ErrorType` regenerated for `timeout`; Dart's `RouterErrorType` can add it. Swift, Kotlin and Dart need nothing else, since the operation is server-side only.
`AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` take an optional `role` (`AgentRole`, one value: `agent_moderator`), and `listAgentConfigs` takes a `role` query parameter that answers the app's one live config in that role, test copies left out (AI-1472). A second live config in the same role is a 409 `role_taken`; left out on an update, a patch or a sync, the stored role stays. Go has the regenerated client and sends `role` from agent.yaml (`agents.Settings.Role`); JavaScript has the regenerated types and Python (`plugins/stream`) the regenerated models. JavaScript, Python, .NET, Ruby, Rust and PHP need to read `role:` from agent.yaml and send it in their folder sync, and .NET, Ruby, Rust and PHP need their generated models regenerated. Swift, Kotlin and Dart need nothing, since configs are server-side only.
`createRun` is capped per app (AI-1478): at most `ROUTER_RUNS_CONCURRENT_PER_APP` runs in flight, 20 by default, counted in Redis across routers. A run over it is a 429 `concurrency_limited` with `Retry-After`, which a caller retries after that wait. A spent budget moves from 429 to 403 `budget_exceeded`, which a caller must not retry until the budget resets. `ErrorDetail.code` gains `concurrency_limited`. Only descriptions changed in the spec. Go has the regenerated client and JavaScript the regenerated types. .NET, Ruby, Rust, PHP and Python pick up the descriptions when they regenerate, and a hand-written run method should retry a 429 after `Retry-After` and treat a 403 `budget_exceeded` as final. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`LiveReasoning` keeps each reply's thinking apart (no spec or router change). The router names a reply's reasoning steps `r1`, `r2`, ... per reply message, so every reply has an `r1`; keyed by step id alone, a later reply's round was dropped when shorter than an earlier reply's `r1`, run on after it when longer, and the earlier reply's thinking showed in its place. A step is now looked up by its reply's message id and its own id, which `read` takes from the message: Swift `reasoning[message: message.id, step: step.id]`, JavaScript `reasoning.get(message.id, step.id)`, Kotlin `reasoning[message.id, step.id]` (and `add(text, offset, messageId, stepId)`), Dart `reasoning[(message: message.id, step: step.id)]`. No other SDK has a `LiveReasoning`.
A connector call that needs the caller's login now waits for it on its own `ai_tool_call` step, instead of answering `authorization_required` and carrying on with a follow-up. No operation is new, and only the `watchSession` and `ToolApprovalCommand` docs changed in the spec. The step is `awaiting_authorization`, addressed to the caller (`target_user_id`), with an `authorization` `{type: "oauth", provider, provider_name, title, message, url, handoff_token, expires_at, status}`. Once they sign in it is `running` with `status` `connected` and no `handoff_token`, and the call runs in the same reply. A `tool_approval` with only `tool_call_id` and `allowed: false` declines it, which every SDK with a session socket should offer, and a refused, failed or expired consent ends it too, with `status` `declined`, `failed` or `expired` and the step `cancelled`. The `connector_authorization` attachment is still written. Swift has `SessionOptions.returnURL` (sent as `return_url`) and `AgentSession.declineLogin(_:)`, and StreamChatAI has `AIToolAuthorization`, `AIToolAuthorizer` and `AIToolAuthorizationView` (stream-chat-swift #4352, on `develop`). Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated docs. Go sends `tool_approval` with `Session.AnswerApproval` (and `stream.Pipeline.AnswerApproval`). Python sends no `tool_approval` at all, so a backend declines with the frame itself. Kotlin and Dart have `SessionOptions.returnUrl` and `AgentSession.declineLogin`, and need the sign-in in their AI components (Custom Tabs, `flutter_web_auth`), opening `url#handoff_token=<handoff_token>`. JavaScript needs `declineLogin` on its session. Python's `authorization_required` event is gone (AI-2532): only a plugin's `tool_ran` result made it, so it never showed a connector login; Python does not yet read a step `awaiting_authorization` in `conversation_updated`, and until it does `examples/text_agents/mcp_plugins` shows no link for a connector. .NET, Rust and PHP need their generated `ToolApprovalCommand` docs regenerated, and Ruby and the rest need nothing.
`ModelCallTiming` (the call timeline's `model_calls`) gains an optional `error_code` (AI-1466): why a model call did not run to its end, left out when `success` is true. `cancelled` is a call its caller closed first (a superseded flow decision, a losing hedge, a barge-in): no failure, and its tokens are still billed. Any other code is a failure. The session socket's `model_call` frame carries the same `error_code`, and its `success` is now false for a cancelled call (it was true). Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated model (only this change's hunk); Python's latency log prints `CANCELLED` for one. Kotlin's generated code was regenerated too, which also brings in the `ErrorType.timeout` and `ErrorDetail.code` docs AI-1471 left for it. .NET, Ruby, Rust and PHP need their generated `ModelCallTiming` regenerated and should show a cancelled call as cancelled rather than failed; none needs another code change. Swift, Kotlin and Dart need nothing else, since they have no `ModelCallTiming` type.
`Connector` (`GET /v1/agents/connectors` and `/{id}`) gains an optional read-only `sandbox` (`ConnectorSandbox` `{env, hosts}`, AI-1573): the env var code in an agent's sandbox reads a placeholder from, and the hosts the sandbox's egress puts the connection's credential in its place for. Only `github` has one (revision 6: `GITHUB_TOKEN`, `api.github.com` and `uploads.github.com`); it is left out for every other connector. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated `Connector` and `ConnectorSandbox` (only this change's hunks). .NET, Ruby, Rust and PHP need their generated `Connector` regenerated; none needs a code change. Swift, Kotlin and Dart need nothing, since the catalog is server-side only.
`AgentConnectorBinding` (configs and `POST /v1/agents/sync`) gains an optional `sandbox` boolean (AI-1574): code in the session's sandbox may call the connector's API with the binding's connection, through the env var the connector's `sandbox` block names. A 400 refuses it for a connector without that block, for a config that sets no `sandbox`, and for two sandbox bindings whose connectors name the same env var. Left out is false, and a binding without it reads back as before. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated `AgentConnectorBinding` (only this change's hunks). .NET, Ruby, Rust and PHP need their generated `AgentConnectorBinding` regenerated, and every folder sync but Go's (done, AI-1578 below) still needs to read `sandbox:` on a binding from agent.yaml. Swift, Kotlin and Dart need nothing, since configs are server-side only.
A server-side caller acting for a user may send `X-Stream-User-Email` beside `X-Stream-User-Id` (AI-1543): the email that user signs in with, which the router keeps per user and checks a `nessy` consent against (a connector whose manifest sets `owner_email`). Read from a server-side caller only. No operation or schema changed, only the `createAuthorization` and `AuditEntry.actor_name` descriptions; Go, Python and JavaScript have the regenerated text. .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing: neither operation is client-accessible, and a device may not send the header.
`AgentConfig`, `AgentConfigRequest` and `AgentConfigPatch` take an optional `review` (`AgentReview`, one field: `instructions`), the guide the model reviewing a finished call judges it by in place of Stream's default (AI-1655). Left out on an update or a patch it stays, an empty string removes it, and a sync never touches it (agent.yaml has no review guide). Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated models. .NET, Ruby, Rust and PHP need their generated models regenerated; none needs a code change. Swift, Kotlin and Dart need nothing, since configs are server-side only.
The session socket sends a new `speaking` frame (`turn_id`, `synthesis_id`, `text`, `at`), when an utterance starts being heard, and `spoke` gains `synthesis_id` and `characters` (no schema change: only the session socket's description in the spec). JavaScript reads it through `SessionEvent` (`text` filled, the rest on `frame`) and has the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated for the new description. Swift, Kotlin (`AgentEvent.Kind` has `Spoke` but no `Speaking`) and Dart need a `speaking` event kind if they type event kinds, and should keep unknown kinds non-fatal.
`speaking`, `spoke` and `interrupted` carry `message_start` and `message_end` (no schema change: only the session socket's description in the spec): where the utterance is in the text of the reply's Chat message, in Unicode code points, which is not the text the voice was sent (directions, digits it is told the count of, sentences held back, the space between sentences). A streaming voice's grows: `speaking` has it as far as sent, `spoke` all of it. Both are left out when the router has no record of the utterance. A sentence voice's reply is now one Chat message, never two under one `turn_id`. JavaScript has the regenerated types. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated for the new description; none needs a code change. A client that reveals a message as it is heard (Swift, Kotlin, Dart, and JavaScript's `session.speech`) should reveal each utterance across its place, falling back on the voice's characters when the offsets are absent.
`CreateRunRequest` (`POST /v1/agents/runs`) gains optional `images` (`[]ImageSource` `{url, detail}`, at most 8), handed to the agent with the input in the order sent; more than 8 or one that is no HTTP(S) URL or image data URI is a 400 `invalid_request`, an agent that cannot see them a 400 `invalid_config`, and one the router cannot fetch, or that is not a JPEG, PNG, WebP or GIF of at most 5 MB, a 400 `image_unavailable` (a new `ErrorDetail.code`). Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the regenerated `CreateRunRequest` and `ErrorDetail`, and Kotlin the new code in its generated `ErrorDetail` doc (applied by hand, since Docker was down: rerun `generate.py` to confirm). .NET, Ruby, Rust and PHP need their generated clients regenerated, and a hand-written run method should take images; none needs another change. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
An agent.yaml `connectors:` entry takes `sandbox: true` (AI-1578), sent as `sandbox: true` on that `AgentConnectorBinding` in `SyncAgentRequest.connectors`. Left out or `false`, no `sandbox` key is sent, so the body is the one sent before; a value that is not a boolean is refused when the folder is read. No spec change: the binding's `sandbox` came with AI-1574. Go (`sdks/go/agents`, `ConnectorSettings.Sandbox`), Python (`plugins/stream`, `ConnectorSettings.sandbox`) and JavaScript (`ConnectorDeclaration.sandbox`) are done (AI-1961). .NET, Ruby, Rust and PHP need the same key in their folder sync, and the Stream CLI (GetStream/cli, `internal/agentrc`), which checks agent.yaml keys against its own list, needs it too. Swift, Kotlin and Dart need nothing, since configs are server-side only.
The agent's spoken messages in the Chat channel carry the same `turn_id` as `speaking`, `spoke` and `interrupted` (custom field `turn_id`; no `synthesis_id`, since one message can be several of a sentence voice's syntheses). JavaScript adds `session.speech` (`src/speech.ts`): a store fed from the frames the session reads, beside `events()`, with `subscribe`, `get` and `heard(turnId, now)` -> `{ chars, done }`, for revealing a message as it is heard. On a call, a turn whose text has begun (`said`, `response_delta`, `responded` with text) reads `{ chars: 0, done: false }` until its `speaking`, and is let go of (undefined, for good) after `SPEECH_GRACE_MS` (5 s) without one, on an empty `responded`, or on a `turn` with `audio_out_ms` 0; a Chat message of the agent's still `generating` for an unknown turn starts the same hold; `left` and stopping voice end holding. `speaking` has `delay_ms` (start it that much after arrival) and `interrupted` has `synthesis_id` and `heard_ms` (cut there). Characters are Unicode code points everywhere. Swift, Kotlin and Dart need the same store as a state flow (or their equivalent) on the session, fed from the socket without taking events from the app's own reader; server-side SDKs need nothing.
Operations tagged `Staff` (`/v1/ops/*`, `/v1/manage/*`, T2 A) are Stream's own, reached with the ops key (`X-Ops-Key`) or the new manage key (`X-Manage-Key`, `ROUTER_AUTH_MANAGE_KEY`) and never by a customer's app. They stay in `openapi.yaml`, which Stream's staff tools are typed from, and the public SDKs leave them out: Go (`exclude-tags` in `sdks/go/api/oapi-codegen.yaml`), JavaScript (`sdks/js/scripts/redocly.yaml`) and Python (`plugins/stream/generate.py`) are done, and their generated clients no longer have the eight `/v1/ops/*` operations (`listUseCasesForReview`, `getUseCaseForReview`, `reviewUseCase`, `getTelephonySuspension`, `suspendTelephony`, `liftTelephonySuspension`, `setOperatorProviderApp`, `deleteOperatorProviderApp`) or the new probe `getManageStatus` (`GET /v1/manage/status`). .NET, Ruby, Rust and PHP still carry the `/v1/ops/*` ones and need their generators to skip the tag too; their models may stay. `AuditResourceType` gains `price_list` and `AuditSource` gains `manage`, which every generated client with those enums needs regenerated for. Swift, Kotlin and Dart carry none of these operations and need nothing.
The usage service (`cmd/usage`, AI-1826) is new, with its own spec, `acceleration/internal/usage/server/openapi.yaml` (`go run ./cmd/usage openapi`): `ingestUsageEvents` (`POST /v1/events`), `readUsageWindows` (`POST /v1/windows`), `readStandings` (`POST /v1/standings`) and `getUsageHealth`, every one tagged `Staff`. Producers and routers call it inside the cluster with its ingest token; no customer does. No SDK needs anything: the router's `api/openapi.yaml` did not change, and nothing is generated from the usage service's spec. The Go producer client is `internal/usage.Client`, inside the router's module.
The usage service's spec gains its management API (AI-1841), every operation tagged `Staff` and reached with `X-Manage-Key` (`ManageKey` scheme): `listTiers`, `getTier`, `listTierOverrides`, `setTier`, `deleteTier`, `getAccount`, `setAccountLimits`, `addCredit`, `listCredits`, `suspendAccount`, `restoreAccount` and `listUsage`, under `/v1/manage`. `readStandings` answers the account and tier fields (`usage.Standing`). No SDK needs anything: the router's `api/openapi.yaml` did not change, and only the operator's staff tools are typed from the usage service's spec.
In the usage service's spec, `setAccountLimits`, `suspendAccount` and `restoreAccount` gain an `Idempotency-Key` header and a 409 `idempotency_key_reused` (AI-1841), as `addCredit` has; the spec does not mark the header required, so that its absence is the service's coded 400 rather than a schema 422, but every call needs one: a caller typed from it sends one key per change and the same key on a retry. No SDK needs anything: the router's spec did not change.
`getSpend` (`GET /v1/stats/spend`) gains optional `api_key`, `user_id`, `team` and `category` (repeatable) query parameters (AI-1826); a filter naming more than one team, or a category that is not 1 to 64 characters of `A-Z a-z 0-9 _ . : -`, is a 400 `invalid_usage_categories`, a new `ErrorDetail.code` that any request whose token or `X-Stream-Usage-Categories` header names invalid categories may also get. `AuditResourceType` gains `end_user`. A server-side SDK talking to a router in `api_key` mode may send `X-Stream-Usage-Categories` (comma-separated, `team:<name>` for the team, a team at most 59 characters) when its token carries no `usage_categories` or `team` claim; behind Stream's proxy the header is replaced by the proxy's own, so there the categories come from the token alone. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the regenerated `get_spend`, `AuditResourceType` and `ErrorDetail`, and Kotlin the new code in its generated `ErrorDetail` doc. .NET, Ruby, Rust and PHP need their generated clients regenerated; none needs a code change. Swift and Dart need nothing beyond the `ErrorDetail` doc if they generate it, since `getSpend` is server-side only.
`ErrorType` gains `payment_required` (402), with codes `insufficient_credits`, `system_limit_reached` (the organization's spend hard limit, whatever its credit) and `spend_limit_reached`; `account_suspended` is a 403 `permission` (AI-1884). A spent budget was a 500, and a 403 `budget_exceeded` on `createRun`; `budget_exceeded` is gone. Every operation a customer calls declares the 402 (`#/components/responses/PaymentRequired`). The stream and session sockets' `error` frames carry the same `code` and `error_type` for these, and close with 1008. Go has the regenerated client and `stream.RouterError.PaymentRequired()`; JavaScript the regenerated types; Python (`plugins/stream`) and Kotlin their regenerated `ErrorType` and `ErrorDetail`. Every SDK should surface 402 as its own error, as Go now does, so an app can send its user to top up rather than retry; a model that costs nothing is still served. JavaScript, Python, .NET, Ruby, Rust, PHP, Swift, Kotlin and Dart need that error (Dart's `RouterErrorType` can add `payment_required`), and .NET, Ruby, Rust and PHP their generated clients regenerated.
The phone operations (`buyPhoneNumber`, `placePhoneCall`, `transferPhoneCall`) and `startCampaign` answer the same 402 and 403 `account_suspended`; `Campaign` gains `paused_reason` (optional string); `ScheduledTaskRun.error` gains the four money codes; the inline `SpeechRequest` and transcription answer a money refusal as 402/403 rather than a 202 failure; and the shared 403 response's description now names `account_suspended` (AI-1884). Apart from `paused_reason`, only descriptions changed in the spec. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) its regenerated models and docs. .NET, Ruby, Rust and PHP need their generated clients regenerated; one that shows a campaign can show `paused_reason`. Swift, Kotlin and Dart need nothing, since campaigns are server-side only.
`Policy.budget` is gone (AI-1918): `Budget` and `BudgetInterval` leave the spec, a policy that sends `budget` answers 400 `budget_moved`, and spend limits are rows of their own, on the organization, an app, a key, an end user, a usage category or a team. `ErrorDetail.code` gains `user_limit_reached` (a 429 `rate_limited` with `Retry-After`: a spend limit on the one end user the request is for, which stops that user alone) and `budget_moved`; `spend_limit_reached` now covers every other subject's limit. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) its regenerated `Policy` and `ErrorDetail`, and Kotlin the new codes in its generated `ErrorDetail` doc. Every SDK that set a budget through a policy drops it; .NET, Ruby, Rust and PHP need their generated clients regenerated. An SDK that surfaces 402 as its own error should surface `user_limit_reached` as the rate limit it is, waiting for `Retry-After`. Swift and Dart need nothing beyond the `ErrorDetail` doc if they generate it.
Spend limits are `/v1/spend/limits` (AI-1918), server-side: `listLimits`, `createLimit`, `getLimit`, `updateLimit`, `deleteLimit`, `getLimitUsage` and `resetLimitUsage`, for the organization, any app, key, user, team (`subject: team` or `app_team` with `team`) or usage category of the caller's organization. New schemas `Limit`, `LimitInput`, `LimitChange`, `LimitPage`, `LimitTarget`, `SubjectUsage`, `LimitWindow`, `LimitInForce`, `LimitResetInput`, `SpendHardLimitUsage` and `SpendHardLimitWindow`, and enums `LimitSubject`, `LimitLevel` and `LimitInterval`; new codes `limit_above_parent`, `limit_exists`, `limit_not_found`, `use_team` and `no_limit`, and `AuditResourceType` gains `limit`. The `manage*` twins under `/v1/manage/spend/limits` are tagged `Staff` and in no SDK. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the generated operations and models. Every server SDK needs a `limits` resource (create, update, delete, read usage, reset; grants come next) with `team=` as a first-class argument; .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing, since every operation is server-side only.
Grants join the limits (AI-1918): `createLimitGrant` (`POST /v1/spend/limits/grants`), `listLimitGrants` (`GET`, filtered by subject, ids, team and `state`) and `revokeLimitGrant` (`POST /v1/spend/limits/grants/{grant_id}/revoke`), with schemas `LimitGrant`, `LimitGrantInput`, `LimitGrantRevocation`, `LimitGrantPage` and the enum `LimitGrantState`; `SubjectUsage` gains `grants` and `LimitWindow` gains `on_grant`; new codes `invalid_expiry`, `too_many_grants` and `grant_not_found`. Staff's `manage*` twins are tagged `Staff`. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the generated operations and models. Every server SDK's `limits` resource needs `grants.create`, `grants.list` and `grants.revoke`, taking `team=` as it does for limits; .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing.
`ErrorDetail.code` gains `spend_check_unavailable` (AI-1884): a 503 `unavailable` with `Retry-After: 5`, answered for work that costs money while the router cannot share what the organization is spending with the other routers; it is no refusal of the organization's money, and a model that costs nothing is still served. Every operation that declares the 402 now declares the 503 (`#/components/responses/Unavailable`), and operations that already answered a 503 of their own now point at that shared response. Go has the regenerated client and `stream.RouterError.SpendCheckUnavailable()`; JavaScript the regenerated types; Python (`plugins/stream`) its regenerated operations, which now parse the 503's `ErrorResponse`; and Kotlin the new code in its generated `ErrorDetail` doc. Every SDK should treat this code as retryable after `Retry-After`, not as a payment error. .NET, Ruby, Rust, PHP and Swift need their generated clients regenerated.
Every backend SDK surfaces `X-Stream-Cost-Micros`, `X-Stream-Cost-Estimated`, `X-Stream-Balance-Micros` and `X-Stream-Balance-Warning` the way the Go client does: a usage callback, a balance-warning callback fired once per crossing, and a WARN log when neither is set. Client-side SDKs (browser JS, Swift, Kotlin, Dart) never receive them. Destinations for `account.balance_low` and `account.balance_exhausted` are connector event destinations on the built-in source `stream`. (AI-1884.) The four headers are in the spec as `components/headers`, on the 2xx of every operation that declares the 402, and the balance two on the shared 402; the cost is the sum of the usage the request recorded, absent when it recorded none or answered before its work ran (`createResponse`, `respondSession`), and the warning is `low` at or below the organization's threshold and `exhausted` at or below 0. `Policy` gains `balance_warning_micros` (an organization's only; an app's is a 400) and `ClassifyUsage` gains `cost_micros`. On the stream socket a backend's settled `transcript`, `synthesis_complete` and `complete` carry `cost_micros`, and a `balance` frame (`balance_micros`, `warning`) says the balance went down into low or exhausted while the socket was open. `createConnectorEventDestination` takes `{id}` = `stream` with no provider app; each event is `{type, timestamp, data: {organization_id, app_id, balance_micros, threshold_micros, tier}}` with `webhook-id` `balance:<organization>:<kind>:<granted_micros>`. Go has `client.WithUsage`, `client.WithBalanceWarning` and `client.WithLogger`, and `CostMicros` and `Balance` on `stream.Transcript`, `stream.Audio` and `stream.Answer`; JavaScript the regenerated types; Python (`plugins/stream`) its regenerated `Policy`, `ClassifyUsage` and docs; Swift its regenerated client, whose response headers it never reads. JavaScript (Node), Python, .NET, Ruby, Rust and PHP need the two callbacks and the WARN, and the socket fields where they hold the stream socket; .NET, Ruby, Rust and PHP their generated clients regenerated. Kotlin and Dart need nothing.
End users' daily quotas (AI-1918): `listUserPolicies` (`GET /v1/policies/users`, `limit` and `cursor`), `getUserPolicy`, `updateUserPolicy` (`PUT`, body `UserPolicyInput {quota}`; a quota left out, null or setting neither number removes the user's own) and `deleteUserPolicy` (`DELETE`, 204) under `/v1/policies/users/{user_id}`, all server-side. New schemas `UserPolicy` (`user_id`, `quota`, `effective`, `messages`, `tokens`, `resets_at`), `EffectiveQuota`, `UserPolicyInput`, `UserPolicyEntry`, `UserPolicyPage`, and enums `QuotaLevel` (`user`, `app`, `organization`, `default`) and `PolicyScope`; `Quota` is now also accepted on `updateOrganizationPolicy`, and an app's or organization's quota counts the app's backend acting for the user as well as the user's devices. Staff's `getCustomerPolicy` and `updateCustomerPolicy` (`/v1/manage/organizations/{organization_id}/policies/{scope}/{id}`) are tagged `Staff` and in no SDK. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the generated operations and models. Every server SDK needs a `policies.users` resource (`list`, `get`, `update`, `delete`) taking the user id as it is, URL-encoding it in the path (a Stream user id may hold a space or an `@`); .NET, Ruby, Rust and PHP need their generated clients regenerated. Swift, Kotlin and Dart need nothing, since every operation is server-side only.
JavaScript's `session.speech` reveals each utterance across its place in the message when `speaking`, `spoke` and `interrupted` carry `message_start` and `message_end`, and counts the voice's characters as before when they do not (`src/speech.ts`). Swift, Kotlin and Dart need the same in their speech store when they add one.
The generated code of .NET, Ruby, Rust and PHP now matches `acceleration/api/openapi.yaml` at `b16b0e64c` (blob `ddc92993`, the `spec` line of their `.sdk_update_log`) (AI-1225). So the notes above that ask only for their generated code to be regenerated are done. The hand-written items in those notes are still open for these four SDKs (folder-sync keys such as `role:` and `sandbox:`, run `images`, and the rest), so their `skill` line stays where it was.
`ErrorDetail.code` has a new value, `memory_unavailable` (AI-1752): a 503 from `deleteSession`, `truncateMemories` and `deleteSessionMemories` when the memory store fails, the session kept so the same call can be made again later. No schema changed beyond the `ErrorDetail.code` description, each operation's 503 and `deleteSession`'s description. Go, JavaScript, Python (`plugins/stream`), Kotlin and Swift have the regenerated code. .NET, Ruby, Rust and PHP need their generated clients regenerated; none needs a code change. Dart needs nothing.
An `agent.yaml` that names `plugins:` or `plugin_events:` is refused when the folder is read, with an error that names the key and points to `connectors:` (AI-1784). An empty or null list is still read and sends nothing, as before. The SDK sends neither `plugins` nor `plugin_events` in `SyncAgentRequest`, and the deprecation warning is gone. No spec change: the generated fields stay until the router drops them. Go, Python, .NET (AI-2527), Ruby (AI-2528), Rust (AI-2529), PHP (AI-2530) and JavaScript (AI-2533, `sdks/js/src/folder.ts`) refuse a non-empty `plugins:` at folder read, with the pointer to `connectors:`; JavaScript never read `plugin_events`, so it still refuses that key as unknown. Swift, Kotlin and Dart need nothing, since configs are server-side only.
`AgentConnectorBinding` (configs and `POST /v1/agents/sync`) gains an optional `require_approval` (AI-1640): names or path.Match patterns of the binding's tools whose every call the router holds until the session's user allows it. The call's `ai_tool_call` step is `awaiting_approval`, addressed to the user (`target_user_id`), with `approval.title` such as "Allow crm to run echo?". The answer is the session socket's `tool_approval` with `tool_call_id`, the `request_id` of the reply's command and `allowed`; `turn_id` is now optional in `ToolApprovalCommand`. Only the session's user or their backend may answer. Declined, or not answered in 10 minutes, the call is not sent and the model is told so; a session with nobody to ask (incognito, shared, opened by an MCP event) refuses the call at once. A 400 refuses an entry that matches no granted tool or pattern, one path.Match cannot read, and `require_approval` with `sandbox: true`. Go has the regenerated client (`ToolApprovalCommand.TurnId` is now a `*string`) and `Session.AnswerApproval(toolCallID, requestID, allowed, summary)` (and `stream.Pipeline.AnswerApproval`), which sends that frame. JavaScript has the regenerated types and Python (`plugins/stream`) the regenerated models. .NET, Ruby, Rust and PHP need their generated `AgentConnectorBinding` and `ToolApprovalCommand` regenerated, and every folder sync but Go's (done, AI-1847 below) still needs to read `require_approval:` on a connector from agent.yaml. JavaScript (`session.ts` `decide()`), Swift (`AgentSession.swift` `decide()`), Kotlin (`AgentSession.kt` `decide()`) and Dart (`agent_session.dart` `decide()`) answer only an approval of their own client tools, and Swift's `declineLogin` sends `allowed: false` without `request_id`: none can allow a held connector call. Each needs a method, as Go's, that answers an `awaiting_approval` step by its `tool_call_id` and the reply's `request_id`, with `turn_id` left out. Python, .NET, Ruby, Rust and PHP need the same where they hold a session socket.
The usage service's spec gains `forgetUser` (`POST /v1/manage/users/forget`, AI-1826), tagged `Staff` and reached with `X-Manage-Key`: it replaces an app's end user id in the service's events and windows, or with `dry_run` counts them, and answers `ForgottenUser` (`events`, `windows`, `organizations`). Only `router usage forget-user` calls it, through `internal/usage.Client.ForgetUser`. No SDK needs anything: the router's `api/openapi.yaml` did not change.
`ConnectionDefinitionStatus`'s description changed (AI-1878): `outdated` now means a later revision changes what the connection reads, and a revision changing only `sensitive`, `outbound` or `read_only_tools` leaves it `current`. No value or field changed. Go, JavaScript, Python (`plugins/stream`), PHP and Rust are regenerated; .NET and Ruby need their generated `ConnectionDefinitionStatus` doc regenerated.
`require_approval:` on an agent.yaml connector entry (AI-1847) is sent as that binding's `require_approval` by folder sync. A config that binds a sensitive connector (Nessy) now accepts a binding beside it whose write tools `require_approval` holds; the 400 that refuses one names each binding's tools to hold. No spec change. Go (`sdks/go/agents`: `ConnectorSettings.RequireApproval`), Python (`plugins/stream`: `ConnectorSettings.require_approval`) and JavaScript (`ConnectorDeclaration.requireApproval`) are done (AI-1961). .NET, Ruby, Rust and PHP folder sync need the same key. Swift, Kotlin and Dart need nothing, since configs are server-side only.
Kotlin has `SessionOptions.returnUrl`, sent as `CreateSessionRequest.return_url` and left off when null or empty, as Swift's `returnURL` is. No spec change. Dart still needs it on its session options, and Kotlin and Dart still need Swift's `AgentSession.declineLogin` for a sign-in's Not now.
The session socket (`watchSession`) can be resumed (no schema change: three query parameters and the socket's description in the spec). A watcher that opens it with `resumable=true` is sent `resumed` (`cursor`, `complete`, and `command`, the receipt of the `request_id` it named) as its first frame, and every frame after it except `hearing` carries a `cursor`. Reopened with the same credentials and `cursor=<last cursor>` (and `request_id=<last question's request id>`), it is sent the frames after that cursor that the session still keeps (its last 256, while it is held: a persistent text session until 5 minutes after its last watcher left), then the live ones; `complete` false means some are gone (the router restarted, the conversation was reopened, or more than 256 were missed), and the client reads them back from the conversation. A session the router stops on its way down closes a resumable socket with 1012 rather than 1000, and its reply in flight is `interrupted` (never run again), not `cancelled`; a client asks that question again once, under a new request id. A 1000 close means the session ended and is not reconnected; a 4xx refusal on reconnect is final. A socket that does not opt in is sent exactly what it was before, close code included. Go (`sdks/go/stream`: `Pipeline.Awaiting`, `Event.Resumed`; `agents` dispatch conversations retry an interrupted question once) is done, for text sessions only: a call's socket is neither resumable nor reconnected. JavaScript (`session.ts`, `socket.ts`), Python (`plugins/stream` `sessions.py` and `accelerated.py`, whose `respond_remote` already sends a `request_id`), Swift (`SessionSocket.swift`, which treats even a 1000 close as a failure), Kotlin (`SessionSocket.kt`), Dart (`socket.dart`), .NET (`Session.cs`), Ruby (`session.rb`), Rust (`session.rs`) and PHP (`Worker/Watch.php`) still open the socket without `resumable` and end their events when it drops; each needs the same reconnect for text sessions: opt in, keep the last `cursor`, reconnect with backoff on any close but 1000 and stop on a 4xx, keep the events stream open across it, and surface `resumed`. Kotlin and Dart turn any close but 1000 into an error, so they must not see 1012 until they opt in, which they cannot by accident. Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated `watch_session` regenerated for the new parameters; Python and JavaScript have it.
`AgentTools` (configs and `POST /v1/agents/sync`) gains an optional `output_retention` and `Policy` (`/v1/policies/app`, `/v1/policies/organization`) an optional `tool_output_retention`: how long a session keeps what its tools were given and gave back, `none` or a duration such as `12h` or `30d` (`1h` to `3650d`). The shortest of the organization's, the app's and the config's applies. A redacted tool item's `payload` has `redacted: true`, no `arguments`, no `text`, and `error: "redacted"` in place of an error's wording (only `AgentResponseItem.payload`'s description changed). Go has the regenerated client and sends `output_retention:` under `tools:` from agent.yaml (`agents.ToolSettings.OutputRetention`); JavaScript has the regenerated types and Python (`plugins/stream`) the regenerated models. JavaScript, Python, .NET, Ruby, Rust and PHP need to read `output_retention:` under `tools:` in their folder sync, and .NET, Ruby, Rust and PHP need their generated models regenerated. Kotlin has its generated `AgentResponseItem` regenerated for the payload description; Swift needs the same when it next regenerates, and Dart nothing. Swift, Kotlin and Dart need nothing else, since configs and policies are server-side only.
`AgentTools` (configs and `POST /v1/agents/sync`) gains an optional `output_retention` and `Policy` (`/v1/policies/app`, `/v1/policies/organization`) an optional `tool_output_retention`: how long a session keeps what its tools were given and gave back, `none` or a duration such as `12h` or `30d` (`1h` to `3650d`). The shortest of the organization's, the app's and the config's applies. A redacted tool item's `payload` has `redacted: true`, no `arguments`, no `text`, and `error: "redacted"` in place of an error's wording (only `AgentResponseItem.payload`'s description changed). Go has the regenerated client and sends `output_retention:` under `tools:` from agent.yaml (`agents.ToolSettings.OutputRetention`); JavaScript has the regenerated types and Python (`plugins/stream`) the regenerated models. .NET, Ruby, Rust and PHP have their generated models regenerated. JavaScript, Python, .NET, Ruby, Rust and PHP need to read `output_retention:` under `tools:` in their folder sync. Kotlin has its generated `AgentResponseItem` regenerated for the payload description; Swift needs the same when it next regenerates, and Dart nothing. Swift, Kotlin and Dart need nothing else, since configs and policies are server-side only.
`Policy` (app and organization), `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch`, `SyncAgentRequest` and `CreateSessionRequest` gain an optional `resume_history` (`ResumeHistory` `{include_tools, max_messages, max_characters}`): how a conversation a session carries on is handed back to the model. `include_tools` replays each reply's recorded tool calls and results; `max_messages` (1 to 100) and `max_characters` (1,000 to 400,000) replace the 100-turn and 60,000-character caps. The most specific level wins field by field (session, config, app policy, organization policy), and the request field is server-side only (a device sending it gets a 403). Left out, nothing changes. `answer` response items now carry `turn_id` in their `payload`. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the regenerated models and Swift the regenerated `CreateSessionRequest`. .NET, Ruby, Rust and PHP have their regenerated models too; every folder sync (Go included) still needs to read `resume_history:` from agent.yaml if it should be declarable there. Kotlin and Dart need nothing, since policies, configs and the field are server-side only.
The account, credit, teams and prices reads (AI-1985): `getAccount` (`GET /v1/account`, `Account`), `listCredits` (`GET /v1/account/credits`, `CreditPage`), `listTeams` (`GET /v1/teams`, `[]Team`) and `getPrices` (`GET /v1/prices`, tag `Prices`, `Prices`) are new; `getSpend` takes `scope` (`SpendScope`: `app` or `organization`) and `group_by` values `who:app`, `who:api_key`, `who:user`, `who:team` and `who:category`; `getLimitUsage` takes repeated `app_id`, `api_key`, `user_id`, `team` and `category` (up to 100 subjects) and answers `[]SubjectUsage` rather than one `SubjectUsage`, which breaks a caller decoding one. `manageListTeams` and `manageGetLimitUsage` are `Staff` and in no SDK. Go has the regenerated client (`GetLimitUsageParams` ids are now `*[]string`) and JavaScript the regenerated types; Python (`plugins/stream`), .NET, Ruby, Rust and PHP have their regenerated models and operations, and Kotlin its regenerated `ErrorDetail` (the new `billing_not_enabled` code). None has a hand-written method for them yet: the Python SDK's `usage` reads follow in their own task, and every other server-side SDK needs the same (an account, credits, teams and prices read, spend by who asked across the organization, and a usage read of many subjects). Swift, Kotlin and Dart need `getPrices` only if a device should show prices; the rest is server-side only.
Detach (`DELETE /v1/phone/numbers/{e164}/attach`) is in the Go SDK and the Python plugin; the other SDKs still need it.
An error in an agent.yaml connector entry names its line in the file (AI-1767): a key nobody knows is refused as `line <n>: "<key>" is not something a connector says; name, connector, tools, connection, required, sandbox, require_approval are`, and a value of the wrong type keeps yaml's own `line <n>:` from the top of the file. No spec change. Go (`sdks/go/agents`: `ConnectorSettings.UnmarshalYAML`) is done. Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP folder sync should check that their connector-entry errors name the line in the file, not in the entry. Swift, Kotlin and Dart need nothing, since configs are server-side only.
The usage events list (AI-1985): `listUsageEvents` (`GET /v1/usage/events`, `UsageEventPage` of `UsageEvent`) is new, with `scope` (`SpendScope`, whose description now covers it), `app_id`, `from`, `to`, `meter`, `api_key`, `user_id`, `team`, `category`, `limit` (1 to 200, 50 by default) and `cursor`. Go has the regenerated client and JavaScript the regenerated types; Python (`plugins/stream`), .NET, Ruby, Rust and PHP have their regenerated models and operations. None has a hand-written method for it yet: every server-side SDK needs a usage events read that follows `next_cursor`. Swift, Kotlin and Dart need nothing, since it is server-side only.
Unrevoking a spend-limit grant (AI-1985): `unrevokeLimitGrant` (`POST /v1/spend/limits/grants/{grant_id}/unrevoke`, body `LimitGrantUnrevocation {reason}`, answers `LimitGrant`) is new, server-side only; 400 `invalid_expiry` for an expired grant, 409 `too_many_grants` past 20 live. `manageUnrevokeLimitGrant` is `Staff` and in no SDK. Go has the regenerated client, JavaScript the regenerated types and Python (`plugins/stream`) the regenerated operation and model; .NET, Ruby, Rust and PHP have their generated code regenerated. Every server-side SDK with a grants resource needs an `unrevoke` beside `revoke`. Swift, Kotlin and Dart need nothing, since it is server-side only. The usage service's `addCredit` gains `reverses_id` and `CreditEntry` `reverses_id` and `reversed_by_id`; no SDK is generated from that spec.
Swift closes its gaps with the other client SDKs (no spec change): `SessionOptions` gains `custom`, `modelOverwrites` (a public `ModelOverwrites`), `memory` and `timezone`; `ForkOptions` gains `configID`, `description`, `custom`, `modelOverwrites` and `incognito`, and its `agent` is now the name, as everywhere else, rather than a config id; `AgentSession` gains `fork(_:)`, `events()` (an `AsyncStream` per caller, 256 deep, finished when it falls behind), `say(_:interrupt:)` and `interrupt(requestID:)`; `Responses.unwind(responseID:)` pages every item. It is now ahead of the others on four things. `SessionOptions.memory` sends `memory.user_id` as the user `setUser` named, so a phone's session recalls and stores memories. `SessionQuery` takes `createdSince`, `createdBefore`, `custom` and `sort`. `SessionOptions.timezone` sends `timezone`. And `agents.scheduledTasks` wraps the seven scheduled-task operations a device may call (`listScheduledTasks`, `getScheduledTask`, `updateScheduledTask`, `pauseScheduledTask`, `resumeScheduledTask`, `deleteScheduledTask`, `listScheduledTaskRuns`). Kotlin needs `memory`, the query fields, `timezone`, `say` with an interrupt and the scheduled tasks. Dart needs `memory`, the query fields, `timezone`, `interrupt` with a request id and the scheduled tasks. JavaScript needs the query fields typed on `SessionQuery` and the scheduled tasks. The server SDKs have no scheduled-task resource either (list, get, update, pause, resume, delete, runs, and the server-side create and run). A client SDK sends only its own user's id as `memory.user_id`, never one the app passes in, as Swift does. `sdks/swift/generate.py` now drops a nullable field from `required`, since the generator ignores `nullable`; a generator with the same habit would fail to decode a scheduled task that has not run yet (`last_run_at: null`).
`Session.call_outcome` (`SessionCallOutcome`: `outcome`, `answered_at`, `duration_seconds`; enum `CallOutcome`) says how a placed call ended, and `Contact.outcome` (`CallOutcome`) how a campaign contact's call ended. Go has them through the generated client; other SDKs have it in their regenerated models. No SDK has a hand-written read of either yet.
`createSession` answers 409 `call_unanswered` (a new `ErrorDetail.code`) for a phone session whose placed call already ended busy, `no_answer`, `failed` or `canceled`; the message names which. No schema changed beyond the `ErrorDetail.code` description and `createSession`'s 409. Go surfaces it from `Agent.StartCall` as a `*stream.RouterError` (no code change) and has the regenerated client; JavaScript, Python (`plugins/stream`), Kotlin, .NET and Rust have their regenerated code. Every other SDK's start-a-call should surface it as a refusal the caller can branch on by code, not wait on a session; Swift needs its generated code regenerated when it next regenerates.
Kotlin has the scheduled tasks (no spec change): `agents.scheduledTasks` wraps the seven client-accessible operations as `list(ScheduledTaskQuery)`, `get`, `update`, `pause`, `resume`, `delete` and `runs`, with the models generated from the spec (`sdks/kotlin/generate.py` now allowlists them). A schedule's and a snooze's `in` is `after` (`ScheduledTask.Schedule.after`, `ScheduledTask.Next.After`), `in` being a Kotlin keyword. The Kotlin generator keeps a required nullable field nullable, so a task that has not run yet (`last_run_at: null`) reads. Dart and JavaScript still need the scheduled tasks.
Kotlin closes four of those (no spec change): `SessionOptions.memory` (`SessionOptions.Memory`, `filter` and `appId`) sends `memory.user_id` as the user `setUser` named, never one the app passes in; `SessionQuery` takes `createdSince` and `createdBefore` (`kotlin.time.Instant`, as `filter.created_at` `$gte`/`$lt`), `custom` (`filter.custom`) and `sort` (`SessionQuery.Sort`, sent as one `{"field": ...}` with no direction, since descending is the only one); and `AgentSession.say(text, interrupt = true)` sends an `interrupt` frame and then the `say`, since the router's `say` has no flag; and `SessionOptions.timezone` sends `timezone`. Kotlin has the scheduled tasks too (`agents.scheduledTasks`).
`SessionMemory.user_id` has a new description (no shape change): an end user's device may only name its own user id, and an anonymous caller none; a backend may name any of its users. A device naming another user now gets 403. Every SDK with `SessionMemory` has the new description in its generated model. Swift and Kotlin already send only the signed-in user's id, so no client SDK changes behaviour; Dart must do the same when it adds `memory`.
Every price names its region and whether it is BYOK (AI-2187): `PriceItem`, and with it `Price`, `PriceEntry`, `UpcomingPriceEntry`, `PriceChangeEntry`, `PricePreviewItem` and `PriceEntryInput`, gains `region` (required: a letter and up to 31 of a-z, 0-9 and hyphens, such as `us` or `eu`) and `byok`, and `getPrices` takes an optional `region`. A price change entry without a region is a 400 `validation_failed`. SKUs end in the region, then `byok` (`llm-anthropic-claude-haiku-5-5-us-byok`), so an SDK that matches a SKU by its old form no longer finds it. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the regenerated models and operation, and .NET, Ruby, Rust and PHP their regenerated generated code. Any server SDK that adds a hand-written prices read should pass `region` through and show `byok`; none has one yet. Swift, Kotlin and Dart need nothing: their generated code is unchanged.
`DataPolicy` gains an optional `region` (AI-2187): a letter and up to 31 of a-z, 0-9 and hyphens, `us` or `eu` for now, on `SttOptions`, `TtsOptions` and `StsOptions` (a request's or a router config's), where a direct call names the region its own work is done in. Only a model instance in that region serves the request; none there is a 400 naming the region. A policy has no region: `Policy.data_policy` is `PolicyDataPolicy` (`allow_training` and `retention`, no other field), and a policy sending `region` is a 400. `Provider` (`listProviders`) gains a required `region`, and lists a model once per region it runs in. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the regenerated models, and .NET, Ruby, Rust and PHP their regenerated generated code. A server SDK that wraps the router options should pass `data_policy.region` through, one that wraps the policies should use `PolicyDataPolicy`, and one that lists providers should show `region` and not treat two rows of one `provider/model` as a duplicate; none does any of them yet. Swift, Kotlin and Dart need nothing: they generate none of these schemas.
An agent has a region (AI-2187): `agent.yaml`'s `region`, `us` or `eu` for now, on `SyncAgentRequest`, `AgentConfigRequest` and `AgentConfigPatch`, and always on `AgentConfig`. Left out of a sync, an update or a patch, a new agent is in `us` and a stored one keeps its region, so a loader sends it only when the file names it. Every model the agent's sessions run, its knowledge base and its sandbox are there, and a sync or a config save is a 400 naming each model with no instance in the region, a knowledge base already kept in another region, and a sandbox in a region where none runs. Go (`agents.Settings.Region`), JavaScript (`Declaration.region`) and Python (`Settings.region` in `plugins/stream`) read and send it, and every generated client is regenerated. .NET, Ruby, Rust and PHP need their folder loaders to read `region` and send it: until then they refuse an `agent.yaml` naming it, as they refuse every key they do not know. A test double answering an agent config must include `region`, since a generated model that requires it refuses one without. Swift, Kotlin and Dart need nothing, since config is server-side.
Go region resolution can be repeated (no spec change): a backend with both `Region` and its derived `URL` is accepted, including a trailing slash, while a conflicting URL or invalid region is refused. Public resource calls and `SetUser` reuse resolved backends. Python already accepts its region's own URL too; the other SDKs need the same check where they resolve a stored backend again. Go does not read `STREAM_ACCELERATION_AUTHENTICATE`: for staging, unset a local `STREAM_ACCELERATION_CUSTOMER_ID` or set `Backend.Authenticate` explicitly. Regional production URLs always authenticate.
A socket may declare its auth type in the query (no spec shape change: the `AuthType` scheme's and the dispatch socket's descriptions). In `proxy` mode without declared kinds, where a caller that says nothing is a backend, the router reads `stream-auth-type` from the query when the `Stream-Auth-Type` header is absent, as `jwt` or `anonymous` only and never `server`, so a socket can be the device that created its session and is asked to run that device's tools. Dart sends `stream-auth-type=jwt` on a socket opened by customer id, and on a keyed socket `authorization=<token>&stream-auth-type=jwt` beside `token`, which Stream's proxy needs (as JavaScript sends it) and the router ignores. Swift and Kotlin set the header on the handshake and need nothing. JavaScript (customer-id mode sends no auth type on requests or sockets, so it stays a backend on both sides and works) and the other SDKs may want the same query parameter later, for a browser or client socket opened by customer id against such a router.
Customers keep their own provider keys (BYOK, AI-2187): `listProviderKeys` (`GET /v1/agents/provider-keys`, a `ProviderKeyPage` by cursor), `putProviderKey` (`PUT /v1/agents/provider-keys`, a `ProviderKeyRequest` of `provider`, an optional `region`, `us` when left out, and a write-only `api_key`, answered with a `ProviderKey`) and `deleteProviderKey` (`DELETE /v1/agents/provider-keys/{provider}?region=`, 204), all server-side only. A `ProviderKey` is `provider`, `region`, `key_hint` (the last four characters, empty for a key under 16) and its times; the key itself is never returned. A provider whose work is never routed on a customer's key is a 400 `provider_takes_no_key`, and deleting a key that is not kept a 404 `provider_key_not_found`; both codes are in `ErrorDetail.code`'s description. `AuditResourceType` gains `provider_key`. Go has the regenerated client, JavaScript the regenerated types, Python (`plugins/stream`) the regenerated models and operations, .NET, Ruby, Rust and PHP their regenerated generated code, and Kotlin its regenerated `ErrorDetail` (its description only). No server SDK wraps the three operations by hand yet: one that does should never log or echo `api_key`, and should leave `region` out rather than send `us` for the default. Swift and Dart need nothing: they generate neither schema, and the operations are not client-accessible.
A phone number can be answered by an agent config with no worker (AI-1320): `setPhoneNumberAgent` (`PUT /v1/phone/numbers/{e164}/agent`, body `SetNumberAgentRequest {config_id, agent}`, answers `PhoneNumber`) and `removePhoneNumberAgent` (`DELETE /v1/phone/numbers/{e164}/agent`, 204) are new; `PhoneNumber` and `AttachedNumber` gain `agent_config_id`; `DELETE /v1/agents/configs/{id}` can answer 409 while a number is answered by the config. Go has the regenerated client, `Phone.SetAgent(ctx, number, agent)`, `Phone.RemoveAgent` and a `WaitForCall` that fails at once on a number an agent answers. JavaScript has the regenerated types and Python (`plugins/stream`) the regenerated models and operations. Swift's generator could not run here (it needs the chat repo's generator) and the operations are server-side only, so it should be regenerated next time. .NET, Ruby, Rust and PHP need their regenerated models and operations, and every server-side SDK needs a `setAgent` and `removeAgent` beside `attach` and `detach`, and a number-waiting call that refuses a number an agent answers. Kotlin and Dart need nothing, since it is server-side only.
Kotlin reads the conversation's channel as Stream Chat keeps it (no spec change): `session.channelState(context, scope, messageLimit = 30)` watches the channel on the client `session.chat(context)` opens and answers Stream Chat's `StateFlow<ChannelState?>`, its messages kept live and watched again after a reconnect while the flow is held; `ChatClient.loadOlderMessages(cid, limit)` pages back into it. The incognito and wrong-user refusals are `chat()`'s. Swift (`ChatChannelController`), Dart (`Channel`) and JavaScript (the `stream-chat` channel) need nothing, since what they answer already keeps its state.
Every SDK names the session's `timezone` (no spec change). Go: `agents.Options.Timezone` is the agent's default, under `SessionOptions.Timezone`. Python: `Agent(timezone=)`, a per-call `timezone` on `join`, `answer`, `outbound_call` and `chat`, and `SessionOptions.timezone` in `plugins/stream`. JavaScript: `AgentOptions.timezone` under `CallOptions.timezone`, and `sessions.create` defaults to the device zone in a page (`""` sends none). Swift and Kotlin: `SessionOptions.timezone` defaults to the device zone, `nil`/`null` sends none. A device zone is sent only when it contains `/` or is `UTC`/`GMT` (JS also drops `Etc/Unknown`); a zone the app names is sent unfiltered. Dart still needs the app to pass one (no IANA name in its standard library). .NET, Ruby, Rust and PHP carry `timezone` only on their generated `CreateSessionRequest`, and need an agent-level default once they have agent wrappers. Neither `ForkSessionRequest` nor `StartSessionVoiceRequest` takes a zone: a fork of a live session keeps its parent's, one of an ended session falls back on the user's stored zone.
`openSocketSession`'s description names the start frame's `sample_rate` range (no shape change): 8000 to 192000, 16000 when left out; any other is refused with an `error` frame, `code` `invalid_request`. Python (`plugins/stream`) and JavaScript are regenerated. An SDK that opens the socket must send a rate in this range (AI-1852).
`runRollup` is Stream staff's now (AI-1735): `POST /v1/ops/stats/rollup` with the ops key. Every client is regenerated: Go, JavaScript and Python drop it, Ruby and Rust keep it at the new path. No SDK wrapped it, so nothing else needs to change.
`getOrganizationActivity` is Stream staff's (AI-2379): `GET /v1/ops/orgs/{org_id}/activity` with the ops key, answering `OrganizationActivity`. Go, JavaScript, Python, .NET and PHP gain its generated schemas, Ruby and Rust the operation too, as for `runRollup`. No SDK wraps it, so nothing else needs to change.
The recording `callback` doc says it must be a public https URL (AI-2298): Go (`stream/router.go`) is updated. .NET (`Router.cs`) and Python (`plugins/stream` `router.py`) need the same doc line.
A reply can carry UI the agent wrote, and a person's message what they did in it (StreamChatAI's generative UI). `CreateResponseRequest` gains an optional, client-accessible `ui_action`: an object of at most 8 KB as JSON naming `message_id`, `format` and `name`, with an optional `payload`, or else a 400. The person's message carries it as `custom.ai_ui_action`, and the model is told it after their words. A reply whose text has a fenced block with the info string `ui:<format>` or `ui:<format>@<version>`, or `openui-lang`, goes to Stream Chat with the first such block moved into `custom.ai_ui` (`v`, `format`, `version`, `content` and `status`, `streaming` or `complete`) and the words around it as its text; nothing else about a reply changes. Every generated client is regenerated. Go has `client.UIAction` as an input to `Responses.Create`, Swift `uiAction:` on `Responses.create`, JavaScript `uiAction` in `responses.create`'s options, Kotlin `uiAction` on `Responses.create` (Stream Chat 7.18.0), and Dart `uiAction` on `Responses.create`, a JSON map such as `AIUIAction.toJson()`. Python, .NET, Ruby, Rust and PHP need it only where they wrap creating a response.
An agent folder error names its line (AI-2009, no spec change): Go (`sdks/go/agents/folder.go`) prefixes `line N:` on a connector entry's `a connector needs a name`, `tools: []` and empty `connection` errors, on `connectors must be a list`, and on a `knowledge/urls.yaml` page's unknown key, `refresh_hours` below 1 and non-url/mapping entry. Python, JavaScript, .NET, Ruby, Rust and PHP: any SDK that reads an agent folder by hand should name the line of the entry in agent.yaml or urls.yaml the same way.
A cancelled socket send ends the session in .NET (AI-2411): `ClientWebSocket` aborts the whole socket when a send is cancelled part way, so a tool cancelled by `tool_cancel` while its `UpdateAsync` was writing ended the session. `Socket.WriteAsync` (`sdks/dotnet`) now writes with no token and uses the caller's token only to wait for its turn. Go is not affected (gorilla's `WriteMessage` takes no context). Python, JavaScript, Ruby, Rust, PHP, Dart, Kotlin and Swift are unchecked: any SDK that passes a per-call cancellation token to a socket send should check whether cancelling it aborts the transport.
Spend limits, teams and usage categories in Python (AI-2442, no spec change): `plugins/stream` has `api.spend_limits` (list, create, update, delete, grant, grants, revoke_grant, usage, usage_many and reset over `/v1/spend/limits*`), `api.teams` (list, set_limit, which creates or updates, remove_limit, usage and grant), `api.account` (get, and credits by page) and `api.usage.spend`. A device's user carries its team in `create_user_token(..., team=)`; a backend counts a user's work with `user_id=` on `Client.agent` or `Client.router` of a client built with `Client(team=, usage_categories=)` (`for_user` is deprecated, #2103), and that client's own work is counted against the same team and categories. Both are claims on every token the client signs (`team`, `usage_categories`), and `X-Stream-Usage-Categories` (`team:<name>` among them) without the proxy; a token handed in carries its own, so neither is taken beside one. Amounts are dollars as `Decimal`, `int` or `str` turned into micros exactly, never a float. The level is left to the router, and a team or category with `app_id` is sent as `app_team` or `app_category`. Go, JavaScript and the other server SDKs have no such wrappers yet: one that adds them should check a team and categories before signing, as the proxy does (a `team:` category refused in any case), and find an existing limit by listing rather than parsing `limit_exists`'s message.
A knowledge url or simulation error names its line too (AI-2417, no spec change): Go (`sdks/go/agents/folder.go`) prefixes `line N:` on a `knowledge/urls.yaml` page that is not an http or https url (the `url` key's line, or the page's), and on a `simulations/*.yaml` entry without a name, scenario or assertion, with a mode other than text or audio, or with a name already declared (the key's line, or the entry's when the key is missing). Python, JavaScript, .NET, Ruby, Rust and PHP: any SDK that reads an agent folder by hand should name these lines the same way.
Agent configs have `calls` (end_call, press, transfer with destinations). Go has it; JS, Python, Swift, Kotlin, Dart, .NET, Ruby, Rust and PHP still need it.
A question can be a voice note (AI-2518): `CreateResponseRequest` gains `audio` (`AudioSource {url}`: an HTTP(S) URL or a base64 audio data URI, at most 8 MiB, a data URI inside the 1 MiB body), and `text` may then be empty (still required in the schema). The router transcribes the note before the turn and answers what was said, after any text; a conversation kept in Stream Chat shows the note on the person's message. Go has `client.VoiceNote{URL}` as a `Responses.Create` input, keeping the automatic request id. JavaScript, Python (`plugins/stream`), Kotlin, Swift, Dart, .NET, Ruby, Rust and PHP have only the regenerated models: each needs a voice note input on its responses create, sent with a request id, and an empty text when the note is the whole question.
Message hook no longer pointed (AI-2352): `setConnectorProviderApp`, `setOperatorProviderApp` and `setConnectorOAuthClient` no longer point the pinned Stream app's message hook, and no longer answer the 503 for it (the two entries above are superseded); Stream Chat delivery is the only path. `setOperatorProviderApp` also lost its 503 for the hook, so its `503` response is gone from the spec; the other changes are operation descriptions. Go and JavaScript, and the other generated clients in the PR, have the regenerated descriptions; Swift, Kotlin and Dart need nothing since these operations are server-side only.
The dispatch `message` frame can carry `images` (AI-2521, no spec change): a list of `{url, mime_type}` objects, `mime_type` left out when unknown, and the whole field left out when no photo was sent, so a text-only frame is unchanged. These are the photos sent with the chat message, as URLs the worker fetches itself. Go reads them into `stream.InboundMessage.Images` (`[]stream.Image`, URL and MIME), and drops an entry that is not an object or has no string `url`. JavaScript (`sdks/js/src/inbound.ts`), Python (`plugins/stream` `dispatch.py`), .NET (`Dispatch.cs`), Ruby (`inbound.rb`), Rust (`dispatch.rs`) and PHP (`Inbound/InboundMessage.php`) read them too, into their inbound message's `images` (AI-2649, AI-2650, AI-2651). Swift, Kotlin and Dart need nothing: they do not wait on the dispatch socket.
A worker answering a message for a running session passes its photos on (AI-2522, no spec change): Go `agents.Dispatch.Answer` adds each `InboundMessage.Images` URL as an image of the response it creates. Go `Conversation.Respond(text, images...)` passes them in the worker's own respond call too. Every SDK with a dispatch worker (Go, JavaScript, Python, .NET, Ruby, Rust, PHP) passes them in its answer call under the message's request id (AI-2649, AI-2650, AI-2651), and an example that creates a response for a message passes its photos too. A photo sent without text is handed to a worker as well (AI-2652): the frame's `text` is empty and `images` holds the photos. A worker on an SDK from before this answers it with an empty text and no image, which the router refuses with a 400 "there is nothing to answer" (an `error` frame with that message on the socket's `respond`), and the person gets no reply.
A question of photos alone needs no request id any more (AI-2550, only the `text` description changed in the spec): on a session kept in Stream Chat, `createResponse` and the socket's `respond` without `request_id` show the photos on the person's message, under a request id's rules (data URIs, at most 8), where they were a 400 "invalid command ID or text". JavaScript (`responses.ts`), which leaves the request id out when images are attached, now gets photo-only questions answered; no SDK needs a code change. Every generated client is regenerated for the doc.
`mcp_servers` in agent.yaml is refused (AI-2531, no spec change): Go fails the folder read on a non-empty `mcp_servers:` with `mcp_servers is no longer read: a server named by URL is now a custom connector, so create one for its URL and name it under connectors`, as it does for `plugins`, while `mcp_servers: []` and a null key load as before; `MCPServerSettings`, its send in the sync body and the check that a connector alias is not also an MCP server name are gone. Python (AI-2532) and JavaScript (AI-2533, `sdks/js/src/folder.ts`) refuse it too; .NET, Ruby, Rust and PHP never read it (Python's text: `` `mcp_servers` is no longer supported: create a custom connector for the server's URL and name it under `connectors` ``).
JavaScript closes its gaps with Swift and Kotlin (no spec change): `session.conversation` (`turns`, `failure`, `approvals`, `connected`, `socketError`, with `get`/`subscribe`; `socketError` is a close other than 1000 or 1005, or a socket error), `session.failure`, `session.declineLogin(toolCallId)`, `connectorScopeRequiredOf(event)`, `VoiceSnapshot.failure`, `ToolOutput` (`text` and `images`, sent as parts), `SessionQuery` `createdSince`/`createdBefore`/`custom`/`sort`, `memory` sent with `user_id` as the user `setUser` named from a page (a backend names any user), `sessions.update`/`startVoice`/`stopVoice`/`close`/`fork` by id, `api.scheduledTasks` (the seven client-accessible operations), `api.clearUser()` and `api.setUser(guest)`, `returnUrl`, `VoiceSession.attach(api, sessionId)`, `api.router({ config, tags }).search(query)`, and `events()` read by several loops at once (each from when it started; one 256 behind is ended). `responses.create` now sends a `request_id` with images too, which a personal conversation kept in Chat needs; only videos are refused beside one. Dart still needs `memory`, the query fields, the scheduled tasks and `interrupt` with a request id.
JavaScript's `conversation.failure` is now cleared when the agent next hears, starts answering or speaks, and carries `failureContext` (the error frame's `context`: `stt`, `llm`, `sts`, `tts`) and `failureAt`, so a page shows a call's "can't hear you" line from the store rather than from its one `events()` reader. Swift's and Kotlin's `Conversation.failure` is still a sticky string with no context; they should take the same two fields and clearing, and Dart when it adds one.
A voice note can be sent on `respondSession` too (AI-2549): `RespondRequest` gains `audio` (`AudioSource`, as on `createResponse`), and `RespondRequest.text` loses `minLength: 1`, so text may be empty when audio is sent; empty text without audio is a 400 `invalid_request` ("there is nothing to answer"), where it was a 400 `validation_failed`. It is heard by the same code as `createResponse`, with the same refusals, billing, retry by request id and Chat attachment. The session socket's `respond` frame takes no voice note (its read loop would wait on the hearing, up to 90 s, before it read a `tool_result` or an `interrupt`); a socket voice note waits for a caller that needs it, and must hear off the read loop. Go has the regenerated client; no hand-written SDK sends `respondSession` (asking is responses.create), so no SDK needs a code change. Every generated client is regenerated.
A guest comes back with a refresh secret (AI-2487): `GuestUser` gains `refresh_secret` and `GuestUserRequest` an optional `refresh_secret`. `createGuestUser` re-mints an existing guest only for the app's backend, the guest's own still-valid token, or the `refresh_secret` they were last handed; an `id` with none of these, or with a wrong or spent secret, is ignored and a new guest (another id) is minted, 201, not an error. A secret works once and every answer carries the next, so a client stores what comes back each time, whichever guest it is. A returning guest's `name` and `custom` are no longer overwritten from the request. JavaScript, Swift, Kotlin and Dart are done: the store keeps the secret, an expired guest sends `{id, refresh_secret}` (an id only with a secret), and Swift, Kotlin and Dart keep it off their public guest type; JavaScript's `Guest` is the generated schema, so it carries it. Go and Python (`plugins/stream`) have the regenerated models. .NET, Ruby, Rust and PHP mint guests with the app's secret, so they need only the model field.
Answering machines: `POST /v1/phone/calls` takes `detect_voicemail` (bool), and the session request's `phone` takes `voicemail` (`{"action": "hang_up" | "leave_message", "message"}`, message up to 1,000 characters, required for leave_message). A session's `end_reason` can be `voicemail`. `POST /v1/phone/machine/{token}` is a vendor callback that no SDK calls. Every generated client is regenerated. Go has both fields through its generated client. JS, Python, .NET, Ruby, Rust and PHP need them on any hand-written place-call or session wrapper, and any SDK that lists end reasons by hand needs `voicemail`.
Answering machines in the client SDKs: Kotlin and Dart are regenerated (the session `phone.voicemail`, the `voicemail` end reason); Swift needs nothing, since no phone operation is client-accessible.
Plugins, `plugin_events` and `mcp_servers` are gone from the spec (AI-2538): `AgentConfig` no longer carries the three fields, so a GET or list does not return them. `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` keep them as deprecated, and a non-empty value is a 400 `invalid_request` (`plugins is no longer read: plugins were replaced by connectors, so name the provider under connectors`; the same shape for `plugin_events`; `mcp_servers is no longer read: a server named by URL is now a custom connector, so create one for its URL and name it under connectors`), while a missing key, `null` and `[]` pass as before. The 9 plugin operations are removed from the spec and answer 404: `listPlugins`, `getPluginLogo`, `pluginOAuthCallback`, `receivePluginEvent`, `listConfigPlugins`, `disconnectPlugin`, `authorizePlugin`, `setPluginClient` and `deletePluginClient`. Every generated client is regenerated. No hand-written SDK change is needed. The older notes above that ask an SDK to build plugin behaviour no longer apply: the `plugin_authorization` button, the plugin operations and PHP's `mcp_servers:`.
Plugin descriptions are gone from the spec (AI-1790): only doc text changed, no field or operation. `ConnectorAuditEvent.reason` and `ConnectorAuditAction` no longer name `plugin_migrate` (the writer went in #1625); `ErrorDetail.code` no longer lists `plugin`; the session socket's `conversation_updated` no longer describes a `plugin_authorization` attachment, and `PluginWithOptions.user` no longer says it is sent as one; `InputParts.instructions` and `listSessionTools` say connectors where they said plugins; `AgentConnectorSelectionType` says a session opened for an MCP event has no end user. Go, JavaScript, Python (`plugins/stream`), Kotlin, .NET, PHP and Rust are regenerated; Ruby, Swift and Dart carried none of these strings. No SDK needs a code change.
A personal conversation takes videos by request id (AI-2515): `createResponse` with `request_id` and `videos` is answered, where it was a 400, and the model gets the frames. The frames are not uploaded to the person's message. A retry does not sample the videos again. `VideoSource.url` names its containers (AI-2508, doc only). Go's `Responses.Create` sends a request id unless photos are attached, so a question with clips now has one. Rust (`sdks/rust/src/responses.rs`, `text_only`) still sends no request id with videos and needs the same rule. JavaScript and Python send no videos. Every generated client is regenerated.
A page is read into Markdown (AI-2611): `readPage` (`POST /v1/ocr`, server-side only) takes an `OcrRequest` of `image` (a JPEG or PNG, base64, at most 10 MB), `options` (`OcrOptions`: `target`, `providers`, `data_policy`) and `tags`, and answers an `OcrResult` of `markdown`, `provider`, `model`, `cost_micros` and `status`; a page every model failed is a 200 with `status: failed`, `error` and `error_code` (`OcrErrorCode`), not an error. `Modality` gains `ocr`, so `/v1/ocr/providers` and `/v1/ocr/routes` answer for it (`/v1/{modality}/stream` does not stream it). Go, JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP are regenerated. `OcrOptions` gains `figures` (boolean): `readPage` then summarises the page's charts, diagrams and pictures as `> **Figure:**` quotes, with vision models tried before Mistral OCR; the shortcut `ocr-figures` names the models knowledge reads figures with. No SDK wraps either by hand yet; one that does should send the image as bytes rather than a URL, and read a failed page as a result rather than raise. Swift, Kotlin and Dart need nothing, since it is server-side only.
Knowledge takes PDF and office files (AI-2600): `uploadKnowledgeFile` (`POST /v1/agents/knowledge/files`, server-side only) takes `namespace` (required) and an optional `source` as query parameters, and a `multipart/form-data` body with the file in a part named `file`, up to 50 MB. It answers 202 with an `IndexedKnowledgeDocument` that is `pending`; poll `getKnowledgeDocument` until it is `indexed` or `failed`. `IndexedKnowledgeDocument` gains `state` (`KnowledgeDocumentState`: `pending`, `indexed`, `failed`), `error` (set while a failed read is retried and once it has failed for good), `pages`, `content_type` and `bytes`. Refusals: 400 `invalid_request` for a file that is no document by its first bytes, an empty file or a form without `file`; 402 (and 403 or 429) for money, as on any paid operation, before the file is kept; 413 over 50 MB; 503 `not_configured` on a router without a knowledge bucket. Go, JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP are regenerated. No SDK wraps it by hand yet; one that does should stream the file rather than buffer it, send its name as the part's filename (the default `source`), and leave the type to the router, which reads the bytes. Swift, Kotlin and Dart need nothing, since it is server-side only.
A user is linked to a phone number (AI-2701): new server-side `PUT /v1/agents/users/{user_id}` (`updateUser`) with `AgentUserRequest {"phone": "+15551234567" | null}` answers `AgentUser {user_id, phone}`; null unlinks, a number another user of the app holds is a 409 `phone_taken`. Go has `client.Users().LinkPhone` / `UnlinkPhone` (`sdks/go/client/users.go`). The JavaScript types, Python (`plugins/stream`), .NET, Ruby, Rust and PHP models are regenerated; JavaScript, Python, .NET, Ruby, Rust and PHP still need a call of their own. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
A key in a usage or spend read's query is `api_key_id` (AI-2684). `listUsageEvents`, `getSpend`, `listLimits`, `listLimitGrants` and `getLimitUsage` (and their `manage*` twins, which are `Staff`) took it as `api_key`. Stream's proxy requires `api_key=<app key>` on every call and forwards it, so it always narrowed these reads to the caller's own key. Bodies and response fields keep `api_key`. Go, JavaScript, Ruby and Rust have their regenerated operations. Python (`plugins/stream`) has its regenerated client, and `spend_limits` and `usage.spend` keep their `api_key=` argument and send it as `api_key_id`. Kotlin, Swift, Dart, .NET and PHP generate nothing for these server-side operations. Any hand-written server SDK method that sends a key filter must send `api_key_id`.
The plugin and MCP server types are gone from the spec (AI-2772): `PluginEntry`, `PluginWithOptions`, `PluginEvent`, `McpServer` and `McpServerBranding`. `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` keep `plugins`, `plugin_events` and `mcp_servers`, deprecated, with no schema of their own: `plugins` takes strings or objects, the other two objects, and anything else is a 400 `validation_failed`. The router answers as before: a non-empty list is the 400 `invalid_request` of AI-2538, and `[]`, `null` or a left-out key saves. Go, Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP have the regenerated clients, and none used the removed types outside its generated code (each one's agent.yaml refusal reads the raw keys). Swift, Kotlin and Dart need nothing, since config is server-side.
A connection's tools say which only read (AI-2788): each `ConnectionTool` of `listConnectionTools` (`GET /v1/agents/connections/{id}/tools`, server-side only) gains `read_only` (bool, always present), from the connector's latest revision: true when every source of it lists the tool in `read_only_tools` or says `outbound: false` (false when the connector is gone). A binding may grant such a tool by name beside a sensitive connector (nessy) without `require_approval`; the config save refuses any other there unless `require_approval` holds it. Go, JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP are regenerated. No hand-written SDK wraps the operation yet; one that does, or an admin that preselects tools, should read `read_only` rather than guess from a tool's name. Swift, Kotlin and Dart need nothing, since the operation is server-side only.
An agent chooses the model that controls its floor, and how long a caller may wait once they stop, with `floor_control`, an object (`FloorControl`) of `model` and `max_wait_ms`: `{"model": "stream/chorus-asr", "max_wait_ms": 800}`. It replaces both the plain-string `floor_control` and `end_of_turn`, whose `EndOfTurn` and `EndOfTurnBar` schemas are gone with its presets and bars. `model` has the pattern `^(stream/chorus-asr|flow-controller)$`, so SDKs keep it a string and another model is one more value; it is required unless the object is empty. `flow-controller` keeps the flow controller whatever the router's default (`ROUTER_FLOOR_CONTROL_DEFAULT`), and takes no `max_wait_ms` (400). `max_wait_ms` (integer, at least 1, optional) chooses the server's measured point with the fewest cut-ins whose p90 wait is within it; left out, the server's default point. It is on `AgentConfig` (absent when the agent chose none), and on `AgentConfigRequest`, `AgentConfigPatch`, `SyncAgentRequest` and `CreateSessionRequest`. Left out or null, the stored choice stays; `{}` is no choice again, which the router's default rules (the flow controller, or `stream/chorus-asr` where the router defaults every agent to it); anything else replaces the stored choice whole. The router answers 400 `not_configured` for `stream/chorus-asr` on a router without a chorus-asr server, 400 `validation_failed` for the old string form, an unknown key or model, or a wait under 1, and 400 `invalid_request` for a `max_wait_ms` without `model`, a wait shorter than every point the server publishes, or `end_of_turn` sent at all; a sync choosing a point that fails the dictation guard, or one the server can't be asked about, is kept with a `warnings` entry. `agent.yaml` declares it as a mapping, `floor_control: {model: stream/chorus-asr, max_wait_ms: 800}`. Every server SDK's folder loader reads it (Go `agents.Settings.FloorControl`, JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP) and sends it in the sync body as written, `{}` included (PHP sends `{}` as an object, not `[]`), and nothing when the file doesn't name it or names null. A load refuses a value that is not a mapping (the old string form included), an unknown key, a `model` that is not a string and a `max_wait_ms` that is not an integer, naming the field; a top-level `end_of_turn` is an unknown key. Whether `model` is there and which models exist is the router's to say. The fingerprints are unchanged, being over the file. On `createSession` it is server-side only, a 403 from a device, so Swift, Kotlin and Dart have it in their regenerated models and must not expose it on their public session types. Every client is regenerated.
Usage reads name who started the work `origin` (AI-2811): `listUsageEvents` and `getSpend` take the query parameter `origin` (a public API key, or an origin such as `hook:chat`), `UsageEvent` gains `origin` (always present, the same value as `api_key`), and `getSpend` takes `group_by=who:origin`. `api_key_id` on those two operations, `UsageEvent.api_key` and `who:api_key` are deprecated and go in a later release; limits and grants keep `api_key_id`. Go, JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP have the regenerated clients. Other SDKs need to update: the Python SDK's hand-written `usage.spend(api_key=...)` (`plugins/stream/vision_agents/plugins/stream/account.py`) still sends it as `api_key_id` and documents `who:api_key`, and any hand-written method that filters or groups usage by key should send `origin` and read `UsageEvent.origin`. Swift, Kotlin and Dart need nothing, since these operations are server-side only.
Usage reads drop the old names of `origin` (AI-2851): `listUsageEvents` and `getSpend` lose the query parameter `api_key_id` (the router refuses it with a 400 naming `origin`), `UsageEvent` loses `api_key` (read `origin`), and `getSpend` refuses `group_by=who:api_key` (send `who:origin`). Go, JavaScript, Python (`plugins/stream`, whose hand-written `usage.spend(api_key=...)` now sends `origin`), .NET, Ruby, Rust and PHP have the regenerated clients. Other SDKs need to update: any hand-written method that still sends `api_key_id` on a usage or spend read, reads `UsageEvent.api_key` or documents `who:api_key` should move to `origin`. Swift, Kotlin and Dart need nothing, since these operations are server-side only.
A session's end says whose fault it was and at which stage (AI-2831): `Session` gains `end_fault` (`SessionEndFault`: `none`, `caller`, `router`, `vendor`, `carrier`, `customer_config`, `customer_credit`) and `end_stage` (`SessionEndStage`: `ringing`, `conversation`), both read-only and absent while the session runs, and `SessionEndReason` gains `closed`, `shutdown`, `agent_failed`, `model_failed`, `model_config_refused` and `model_no_credit`. A session stopped through the API now shows `end_reason: closed` where it showed none. A client that decodes `end_reason` as a closed enum fails on the new values until regenerated. Every generated client is regenerated (Go, JavaScript, Python, Swift, Kotlin, Dart, .NET, Ruby, Rust, PHP); Go needs nothing more. Any other SDK that lists end reasons by hand, or wraps `Session` by hand (Swift's `Models.swift`, Kotlin, Dart), needs the two fields and the new reasons.
A link says how much of the number's past the user reads (AI-2861): `AgentUserRequest` gains `include_phone_history` (bool) and `phone_history_since` (RFC 3339), both optional; `true` with a since, or a since in the future, is a 400 `invalid_request`. `AgentUser` answers the stored boundary as `include_phone_history: true` or `phone_history_since`. New server-side `GET /v1/agents/users/{user_id}` (`getUser`) answers `AgentUser`, with a null phone for a user with no link. Go has `client.Users().LinkPhoneWithHistory` (`PhoneHistory{All, Since}`; the zero value sends `false`) and `Get` (`sdks/go/client/users.go`). The JavaScript types, Python (`plugins/stream`), .NET, Ruby, Rust and PHP models are regenerated. Other SDKs need to update: JavaScript, Python, .NET, Ruby, Rust and PHP need a call of their own for both fields and for `getUser`. Swift, Kotlin and Dart need nothing, since both operations are server-side only.
episode_cards is an enum (AI-2856): `AgentConfig`, `AgentConfigRequest` and `AgentConfigPatch` take and answer `episode_cards` as `EpisodeCardsMode`, a string `off` | `record` | `on`, where it was a boolean; a boolean is refused (400 `validation_failed`). `true` is `on` and `false` is `off`. Go, JavaScript, Python (`plugins/stream`), .NET, Rust and PHP have the regenerated clients; Ruby's spec table, Swift, Kotlin and Dart did not change, since these operations are server-side only and Ruby's table holds no schema. Other SDKs need to update: any hand-written code or doc that sends `episode_cards: true` should send `on`.
An import refuses an export over an app the target holds (AI-2889): `importData` (`POST /v1/data/import`, server-side only) gains the query parameter `full` (bool, default false) and answers 409 `conflict`, before it writes any of the export's rows, when the file carries an export's rows (`table`) and the app already has a row in the target's shared database; `full=true` writes them as before. Lines carrying a `change` are applied whatever the app holds. Go, JavaScript, Python (`plugins/stream`), Ruby and Rust have the regenerated clients (Go's `ImportDataWithBody` and Rust's `import_data` now take the query); .NET, PHP, Swift, Kotlin and Dart generate nothing for this operation. Other SDKs need to update: a hand-written import wrapper should expose `full` and read the 409 as "already holds data here".
Campaigns (dialer) endpoints: Go has them (`sdks/go/client/campaigns.go`: `Client.Campaigns()` with `List`, `Create`, `Get`, `Update`, `Delete`, `Launch`, `Pause`, `Resume`, `Stop`, `Duplicate`, `Analytics`, `AddContacts`, `DeleteContacts`, `ListContacts`, `GetContact`, `StopContact`). `startCampaign` is gone: `launchCampaign` takes `consent` (must be true) and an optional `start_at`. Every generated client is regenerated. The other server-side SDKs (dotnet, ruby, rust, php, js) still need hand-written wrappers; `addCampaignContacts` answers 201 with the refused rows by index, which is not an error. Campaigns are server-side only, so Swift, Kotlin and Dart need no campaign wrappers.
Campaign voicemail: a campaign step takes `voicemail` (`{"action": "hang_up" | "leave_message", "message"}`, message up to 1,000 characters with `{{variable}}` placeholders, required for leave_message), and analytics `dials_per_day` has `voicemail`. Go has both through its generated client. JS, .NET, Ruby, Rust and PHP need them on any hand-written campaign wrapper.
Campaign fixes (no new field): `paused_reason` can be `session_refused` (the agent config makes a session that cannot open), `pauseCampaign` takes a scheduled campaign too, and an opt-out's `source` can be `campaign`. Every generated client is regenerated except Swift, which has no campaign or opt-out models. Any SDK listing paused reasons or opt-out sources by hand needs the new value.
Photos on respond: `RespondRequest` gains `images` (`[]ImageSource`), data URIs, at most 8 with a `request_id`, as on `createResponse`; the socket `respond`'s `request_id` doc no longer says text only. Every generated client is regenerated (Go, JavaScript, Python in `plugins/stream`, .NET, Ruby, Rust and PHP), and none has a hand-written respond wrapper to update. Swift, Kotlin and Dart need nothing, since respond is server-side only.
A response enum value the spec does not list yet is read, not refused (AI-2951). Python (`plugins/stream`) and Rust failed on one: the six new session `end_reason`s raised `ValueError` and `Error::Decode`. Their generators now keep the value. Python's `_decode` makes a member that carries it, and Rust's `Unlisted(String)` variant holds it. Both write it back as it came, and a value a caller builds or parses is still checked. Checked in the other SDKs, one place each: Go `type SessionEndReason string` (`sdks/go/acceleration/generated.go`); JavaScript types only, no check when it runs (`sdks/js/src/generated/api.ts`); Swift a `RawRepresentable` class whose `init(rawValue:)` takes any string (`SessionEndReason.swift`); Kotlin's serializer reads one it does not list as `unknown_default_open_api` and drops the value (`SessionEndReason.kt`); PHP `Json::enum` is `tryFrom($value) ?? $value` (`sdks/php/src/Json.php`); Dart and .NET read `end_reason` as a `String`; Ruby keeps answers as hashes. No other SDK needs a change.
A failed model call says what the provider answered (AI-2954): the session socket's `model_call` frame gains `error_message` beside `error_code`, only on a call that did not succeed and said something, and `ModelCallTiming` (a call timeline's `model_calls`) gains `error_message` from the stored request. The text is redacted and capped as the requests table stores it. A successful call's frame and timeline entry are unchanged. Go, JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP have the regenerated clients; Swift, Kotlin and Dart did not change, since `ModelCallTiming` is server-side only. Other SDKs need to update: a hand-written reader of `model_call` frames (Python's `accelerated.py` logs them) may show `error_message` for a failed call.
Go reads `Retry-After` (AI-1892, no spec change): `stream.RouterError.RetryAfter` is the wait a 429 (`user_limit_reached`, `concurrency_limited`) or a 503 (`spend_check_unavailable`) asked for, as whole seconds or an HTTP date, and zero when there was none; the SDK retries nothing itself. .NET (`RetryAfter`), Ruby (`retry_after`) and PHP already carry it, reading seconds only, so a date reads as nothing there. JavaScript, Rust and Python (`plugins/stream`) have no such field and need one. Go-only in the same change: the helpers that took the generated client (`DefineAgent`, `DefineSkills`, `IngestKnowledge`, `SubscribeKnowledgeURLs`, `stream.NewPhone`) take a `stream.Backend`, `Harness.VM` is `Harness.Sandbox`, and a client made on another client's `Backend()` shares its usage watcher.
A session is counted under a team without a token naming it (AI-2991). `CreateSessionRequest` gains `team` (string, 1 to 59 letters, digits, `_ . -`). It is server-side only: a device sending it gets a 403. The router also refuses, with a 400, a team that is no team name and a team other than the one the caller's token names. An agent config's tag `team` (`tags: team: finance` in `agent.yaml`) is the team its sessions are counted under when neither the token nor the session names one. A config whose `team` tag is no team name is refused with a 400 on create, update, patch and sync. Go has `client.SessionOptions.Team`. Every client is regenerated (Go, JavaScript, Python in `plugins/stream`, Swift, Kotlin, Dart, .NET, Ruby, Rust and PHP). Other SDKs need to update: a hand-written server-side session create (JavaScript, Python, .NET, Ruby, Rust, PHP) should take a team and send it as `team`. Swift, Kotlin and Dart have `team` in their regenerated models and must not expose it on their public session types. No folder loader changes, since `tags` is already sent as written.
Every server SDK has spend limits, teams, and a team on the client and the session (AI-2993, no spec change). The SDKs are Go, Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP. Each one has:
- A spend-limits wrapper: create, list (every page), get, set amount, set note, delete and reset. A team or category with an app id becomes `app_team` or `app_category`.
- A teams wrapper: list, set limit and remove limit. Set limit creates the limit or updates the existing one, and handles the `limit_exists` race. Remove limit does nothing when there is no limit.
- An exact USD type over integer micros, which no float reaches: Go `client.USD`, Python `Decimal`, JS `USD` (bigint), .NET `Usd`, Ruby `USD`, Rust `Usd`, PHP `Usd`.
- A team and usage categories on the client, checked by the router's rules: a team is 1 to 59 of `A-Za-z0-9_.-`, a category is 1 to 64 of `A-Za-z0-9_.:-` and doesn't start with `team:`, at most 10 together, sorted and each once. They are signed into every token the client mints as the `team` and `usage_categories` claims. A router with no proxy in front of it gets them in `X-Stream-Usage-Categories`, the team as `team:<name>`. Either one beside a handed-in token is refused.
- A `team` option on session create, sent only when set.
JS, Rust and PHP also mint a user token carrying a team (`createUserToken`, `Client::user_token`, `Backend::userToken`), as Python's `create_user_token` does. Go, .NET and Ruby have no user-token minting yet. Grants are in Go, Python, JS and Ruby; .NET, Rust and PHP still need them. Each SDK's README has a "Spend limits and teams" snippet covering these. Swift, Kotlin and Dart need nothing, since these are server-side.
An agent config has `chat_channels` (on `AgentConfig`, `AgentConfigRequest` and `AgentConfigPatch`): a list of `AgentChatChannel` `{type}`, at most 16, naming Stream Chat channel types of the app's own Stream app the agent answers in besides `agent` channels. A message in a channel of a named type is answered there by the router's own session, written as the Stream user whose id is the config's id. A type matches `^[A-Za-z0-9_-]+$` (at most 64), is named once, and is never `agent`. Left out on an update, the stored list stays; an empty list removes it. Entries are objects so a per-type setting can join `type` later. `SyncAgentRequest` has it too, with the same rules: `agent.yaml`'s `chat_channels`, a list of `{type: <name>}`. Sent, it replaces the stored list, an empty list removing it; left out, the stored list stays. Go reads it from `agent.yaml` (`agents.Settings.ChatChannels`) and sends it on sync: nil when the file names none, an empty list for `chat_channels: []`. Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP have it in their regenerated clients, but their folder sync does not read `chat_channels` from `agent.yaml` yet; each needs that, sending nothing when the file names none. Swift, Kotlin and Dart need nothing, since config is server-side.
A `chat_channels` entry has `answer` (`ChatChannelAnswer`): `always`, as when it is left out, or `mentioned`, where the agent answers only a message that mentions it. `agent.yaml` names it on an entry (`- type: callouts` / `answer: mentioned`). Go reads it (`agents.ChatChannelSettings.Answer`) and sends it on sync, nothing when the file leaves it out. Python, JavaScript, .NET, Ruby, Rust and PHP have it in their regenerated clients; their folder sync, once it reads `chat_channels`, needs to send `answer` too. Swift, Kotlin and Dart need nothing.
An agent config has `agents` (on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest`, items `ChildAgent`: `config`, `tool`, `description`, `timeout_ms`): the app's other text agents a text agent hands work to as tools. agent.yaml takes it as `agents:` (a list of those keys), sent whole when declared, an empty list removing the stored one, and left out when the file says nothing. `Run` gains `children`, a map from tool name to `CallUsage`. Go reads and syncs `agents:` (`agents.Settings.Agents`) and has the regenerated client. Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP have the regenerated types. Python, .NET, Ruby, Rust and PHP need `agents:` read from agent.yaml and sent on sync; Swift, Kotlin and Dart need nothing, since agent configs and runs are server-side only.
An agent config has `image` (on `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest`, a string): the target an agent draws pictures with, which offers a text agent the built-in `generate_image` tool. agent.yaml takes it as `image:`: sent when declared, an empty `image: ""` sent too, since that is how a file turns drawing off, and left out when the file says nothing, which keeps the stored one. Go (`agents.Settings.Image`, a `*string`), JavaScript (`folder.ts` and `Agent.sync`) and Python (`plugins/stream` `folder.py` and `config.py`) read and sync it, and every SDK has the regenerated types. .NET, Ruby, Rust and PHP need `image:` read from agent.yaml and sent on sync the same way; Swift, Kotlin and Dart need nothing, since agent configs are server-side only.
`ChildAgent` gains `max_tool_rounds` (an integer: zero or absent is the router's default of 8, negative is no limit), and agent.yaml's `agents:` items take it as `max_tool_rounds:`. Go reads and syncs it (`agents.AgentSettings.MaxToolRounds`) and has the regenerated client. Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP have the regenerated types and need `max_tool_rounds` read from agent.yaml's `agents:` and sent on sync, once they read `agents:` at all.
A session keeps its team, and every SDK queries sessions alike. `Session` gains `team`: the team its usage is counted under, the same one `usage_categories` holds as `team:<name>`. `SessionFilter` gains `team`, a bare value or `{"$eq": ...}`. A caller whose token is signed for a team gets a 400 asking for another one. Every SDK's session query now takes what JavaScript's `SessionQuery` takes: `team`, `createdSince`/`createdBefore` (sent as `filter.created_at` `$gte`/`$lt`), `custom` (sent only when it holds a label) and `sort` (one `{"field": ...}` with no direction). The names, in each SDK's own style:
- Go: `Query.Team` and `Query.Sort`, beside the existing `CreatedAfter`, `CreatedBefore` and `Custom`.
- Python (`plugins/stream`): `Query.team`, `created_since`, `created_before`, `custom` and `sort`.
- Ruby: `query`/`search` keywords `team:`, `created_since:`, `created_before:`, `custom:` and `sort:`.
- PHP: `query`/`search` named arguments `team`, `createdSince`, `createdBefore`, `custom` and `sort` (`SessionSortField`).
- Rust: `Query.team`, `created_since`, `created_before` (RFC 3339 strings), `custom` and `sort`.
- .NET: `SessionQuery.Team`, `CreatedSince`, `CreatedBefore`, `Custom` and `Sort`, and `Session.Team`.
- JavaScript, Swift, Kotlin and Dart: `team` on their session query and on `Session`.
Every generated client is regenerated. The `.sdk_update_log` files are left where they were, since each SDK still lags older notes.
A tier limit's refusal has its own code. The error envelope (`ErrorDetail`) gains `limit`, present only with code `tier_limit_reached`. A place call or transfer that the organization's tier limits refuse answers 403, type `permission`, code `tier_limit_reached`, with `limit` set to `country`, `per_day`, `recipients_per_day` or `concurrent`; it used to be `forbidden`. An agent config save whose sandbox is beyond the organization's sandbox limits answers 400 `invalid_request`, code `tier_limit_reached`, with `limit` set to `sandbox_network`, `sandbox_cpu`, `sandbox_memory_gb` or `sandbox_disk_gb`. A scheduled task run refused by a tier limit has `error` `tier_limit_reached`. Go, JavaScript and Python (`plugins/stream`) have the regenerated clients. Swift needs regenerating, which takes the `chat` and `monolith` checkouts. Other SDKs need to update: each hand-written router error (Go `stream.RouterError`, .NET, Ruby, Rust, PHP, JavaScript, Swift `AgentsError`, Kotlin, Dart) should carry `limit` beside `code`.
Swift's `agents.attach(sessionID:)` now starts the session it returns, as Kotlin's and Dart's do, so a resumed or forked session receives events and answers tools without a separate `start()` (no spec change). Dart's `SessionQuery` drops `userId`, a server-only filter that Kotlin and Swift already leave out.
JavaScript has `AgentChat` and `agentChatTransport` in `@stream-io/stream-agents/chat`: a conversation held in writing for Stream's AI components (the channel's messages on stream-chat 9 or 10, each reply's whole thinking from `LiveReasoning`, `thinking`/`working`/`failed` activity from `session.state` and `session.conversation`, `send`/`stop`/`loadOlderMessages`, a session opened lazily and deleted on `close` when a new conversation's was never asked anything), and the transport of the AI components' conversation state (`AIConversationController` in stream-chat-react-native). The transport sends the controller's message id as `requestId`, a generated-UI action from `custom.uiAction`, a `regenerate` as a new question, and a failed reply as an `AI_STATE_ERROR` activity with no text. Swift (`StreamAgents`, with an `AIConversationTransport` conformance on `StreamChatAI`), Kotlin (`core`, with a transport for `AIConversationState` once stream-chat-android#7004 matches Swift and React Native) and Dart still need the same; the server-side SDKs need nothing.
A response takes a file (AI-3197): `CreateResponseRequest` gains `files` (`FileSource[]`, at most 1: `url`, a data URI or an HTTPS URL, and an optional `name`), a PDF or a Word document the agent answers from on this turn and every later one. `createResponse` is client-accessible, so a device may send one. `ErrorDetail.code` gains `document_too_large` (413) and `document_unreadable` (400). Every generated client is regenerated. Other SDKs need to update: each `responses.create` wrapper (Go first; then JavaScript, Python, Swift, Kotlin, Dart, .NET, Ruby, Rust, PHP) should take a file, send it as a data URI with its file name, and leave its type to the router, which reads the bytes. A composer that attaches files (Stream Chat's AI components) sends at most one per message, and not with a voice note.
Regenerate, edit and branches in a conversation kept in Stream Chat (AI-3198): `CreateResponseRequest` gains `replaces` (an earlier response id; empty `text` regenerates its reply, `text` edits its question; `request_id` required; no images, audio, videos or `ui_action`). `AgentResponse` gains `parent_response_id`, `branch` (`ResponseBranch` `{of: reply|question, index, count}`, absent for 1 of 1) and `rewound_to` (`RewoundTo` `{message_id, inclusive}`). New client-accessible operations: `listResponseSiblings` (`ResponseSiblingPage`, query `of`, `limit`, `cursor`), `getResponseBranch` (`BranchMessagePage`, `active: true` and no items for the branch on the conversation) and `activateResponse` (`ActivatedBranch`: `leaf_response_id`, `already_active`, `resent`, `rewound_to`). New error codes `branch_limit_reached` (409), `branch_too_long` (409) and `branch_unavailable` (410). Go has `Responses.Regenerate`, `Edit`, `Siblings`, `Branch` and `Activate` (`sdks/go/client/responses.go`). Go, JavaScript, Python (`plugins/stream`), Swift, Kotlin and Ruby are regenerated; .NET, PHP, Rust and Dart still need regenerating (their generators did not run here). JavaScript has the five methods, `branchErrorOf`, `supportBranchOf`, the `channel.rewound` prune and re-read, and `agentChatTransport.switchBranch`. Other SDKs need to update: Python, .NET, Ruby, Rust and PHP need the five methods; Swift, Kotlin and Dart need them on their client session once branches come to their AI components (Swift's generate.py `OPERATIONS` does not list the three new operations yet).
Regenerate, edit and branches in a conversation kept in Stream Chat (AI-3198): `CreateResponseRequest` gains `replaces` (an earlier response id; empty `text` regenerates its reply, `text` edits its question; `request_id` required; no images, audio, videos or `ui_action`). `AgentResponse` gains `parent_response_id`, `branch` (`ResponseBranch` `{of: reply|question, index, count}`, absent for 1 of 1) and `rewound_to` (`RewoundTo` `{message_id, inclusive}`). New client-accessible operations: `listResponseSiblings` (`ResponseSiblingPage`, query `of`, `limit`, `cursor`), `getResponseBranch` (`BranchMessagePage`, `active: true` and no items for the branch on the conversation) and `activateResponse` (`ActivatedBranch`: `leaf_response_id`, `already_active`, `resent`, `rewound_to`). New error codes `branch_limit_reached` (409), `branch_too_long` (409) and `branch_unavailable` (410). Go has `Responses.Regenerate`, `Edit`, `Siblings`, `Branch` and `Activate` (`sdks/go/client/responses.go`). Go, JavaScript, Python (`plugins/stream`), Swift, Kotlin and Ruby are regenerated; .NET, PHP, Rust and Dart still need regenerating (their generators did not run here). Other SDKs need to update: JavaScript (task 7 of AI-3198, with a `channel.rewound` re-query), Python, .NET, Ruby, Rust and PHP need the five methods; Swift, Kotlin and Dart need them on their client session once branches come to their AI components (Swift's generate.py `OPERATIONS` does not list the three new operations yet).
A response takes a file (AI-3197): `CreateResponseRequest` gains `files` (`FileSource[]`, at most 1: `url`, a data URI or an HTTPS URL, and an optional `name`), a PDF or a Word document the agent answers from on this turn and every later one. `createResponse` is client-accessible, so a device may send one. `ErrorDetail.code` gains `document_too_large` (413) and `document_unreadable` (400). Every generated client is regenerated. Go has `client.Document{URL, Name}` and `client.DocumentFile(path)` as `Responses.Create` inputs (`sdks/go/client/responses.go`), and a question with one keeps its request id. Other SDKs need to update: each `responses.create` wrapper (JavaScript, Python, Swift, Kotlin, Dart, .NET, Ruby, Rust, PHP) should take a file, send it as a data URI with its file name, and leave its type to the router, which reads the bytes. A composer that attaches files (Stream Chat's AI components) sends at most one per message, and not with a voice note.
Go keeps phone numbers and end-user ids out of Info logs (AI-3210, no spec change): a dispatch worker's "answering a call" and an agent's "ringing" carry the last four characters of each number (`***0111`, from `sdks/go/internal/redact`), and "answering a message" names who wrote it only at Debug. Other SDKs need to update: Python's client (`plugins/stream/vision_agents/plugins/stream/dispatch.py`, the "answering a call" and "answering a message" lines) logs both numbers and the user id at INFO and needs the same. JavaScript, .NET, Ruby, Rust, PHP, Swift, Kotlin and Dart log neither, so they need nothing.
Dart is one package now. `sdks/dart/stream_agents` (`stream_agents`) replaces `stream_agents_core`, `stream_agents_chat` and `stream_agents_rtc`, with the same API behind one import, `package:stream_agents/stream_agents.dart`. It is a Flutter package, since rtc needs Stream Video; core, chat and rtc stay apart inside it as `lib/src/core`, `lib/src/chat` and `lib/src/rtc`, each with a barrel, and `test/area_boundaries_test.dart` keeps core pure Dart and the areas apart. The Dart floor is 3.12 and the Flutter floor 3.44, Stream Chat 10.4's. No wire change; the other SDKs have nothing to do.
Fast-lane dynamic UI streaming and declarative UI catalogs (no OpenAPI operation change):
- The session events WebSocket (`watchSession`, `GET /v1/agents/sessions/{id}/events`) emits `ui_delta` (`turn_id`, `format`, optional `version`, optional `mode`: `replace` | `patch`, `delta`) and `ui_completed` (`turn_id`, `format`, optional `version`, optional `mode`, `content`) with zero router timer buffering as soon as a reply opens a ```` ```openui-lang ````, ```` ```openui-patch ```` or ```` ```ui:<format>[@<version>][+patch] ```` fence at the start of a line, isolating UI code from stage-direction stripping and voice TTS on calls and persisting settled `custom.ai_ui` in both written conversations and voice `chatlog` transcripts.
- JavaScript (`sdks/js`), Dart (`sdks/dart/stream_agents`) and Swift (`sdks/swift`: `Turn.ui` / `TurnUI` in `Conversation.swift`, `LiveUI` in `Chat.swift`, whose `overlay(_:)` answers each in-flight reply's custom data with the socket's `ai_ui`, since a `ChatMessage` is not copied with new extra data) fold `ui_delta` and `ui_completed` onto each agent `Turn` (`turn.ui` / `TurnUI`, merging `openui` statement patches in place) and expose `LiveUI` in their chat layers to overlay 0ms socket UI onto in-flight Stream Chat replies until `custom.ai_ui.status` reaches `complete`. `swift_assistant` shows it, with the booking components, brand tokens and voice UI. Kotlin (`sdks/kotlin`: `AgentEvent.Kind.UiDelta` / `UiCompleted`, `Turn.ui` / `TurnUI` in `Conversation.kt`, `LiveUI` in `LiveUI.kt` with `overlay(messages)` in `Chat.kt`, which answers each in-flight reply's custom data by message id with the socket's `ai_ui`) does the same, and `android_assistant` shows it, with the trip and booking components (`components/TripComponents.kt`), brands and voice UI. Other client SDKs need to update: Kotlin's `android_assistant` reads its components' arguments from the untyped map `stream-chat-android-ai-compose`'s `AIUIComponent` hands it, so typed arguments, as Swift decodes them into `Decodable` structs, need that library first; React Native (`stream-chat-react-native` `OpenUIRenderer` over `@openuidev/react-lang` and `react_native_assistant`), and `tui/` (`sdks/go/stream/conversation.go`) should fold `ui_delta` / `ui_completed` and `LiveUI` the same way.
- `agent.yaml` supports an optional `ui:` mapping (`format`, `keep` component allowlist, `components` path defaulting to `ui/components.json`, `blueprints` path defaulting to `ui/blueprints.yaml`, `patch_mode`, `voice_ui`, `rules`), compiled deterministically so LLM prefix caches stay warm across turns. Go and JavaScript sync it as `ui_instructions`, apart from `instructions` (see the note at the end). Go (`sdks/go/agents/ui.go`) and JavaScript (`sdks/js/src/ui-catalog.ts` & `folder.ts`) load and validate `ui:`. Other server SDKs that load agent folders by hand — Python (`plugins/stream/vision_agents/plugins/stream/folder.py`), .NET (`Folder.cs`), Ruby (`folder.rb`), Rust (`folder.rs`), and PHP (`Folder/Declaration.php`) — need to read and compile `ui:` identically.
Posted knowledge text uses the document states too (AI-2198): an ingest saves each document's row as `pending` before writing its passages, then marks it `indexed`, or `failed` with the reason when the write stops part way. Only the descriptions of `KnowledgeDocumentState`, `error` and `passages` changed. Go, JavaScript, Python (`plugins/stream`), .NET, Rust and PHP have the regenerated clients. Swift, Kotlin, Dart and Ruby do not carry these descriptions, so they need nothing.
Routes are listed by modality (AI-3199): `GET /v1/{modality}/routes` (`listRoutes`) is a resource method, `Client.Routes(ctx, modality)` in Go and `Router.routes(modality)` (`api.router().routes("image")`) in JavaScript, returning the `Route` list as served, default first. No wire change. Rust already has it as `list_routes` (one method per operation). Python (`plugins/stream`, which has only the generated `list_routes` call), .NET, Ruby and PHP need the same method on their server client; Swift, Kotlin and Dart need nothing, since the operation is server-side only.
`ForkSessionRequest` has `tool_timeout_ms` (AI-3201): how long the fork's model waits for a caller's or a worker's tool, in milliseconds, as on `CreateSessionRequest`, whose description now says the default is 30 seconds and that a tool's own `timeout_ms` replaces it. Leaving it out keeps a running parent's, so send it only when the caller sets it. Go sends it from `client.ForkOptions.ToolTimeout` (a `time.Duration`, sent when at least a millisecond, since one under it would go over as zero, which the router reads as 30 seconds). JavaScript's `ForkOptions` takes the generated `tool_timeout_ms`; Python (`plugins/stream`) and Swift have the regenerated models. .NET, Ruby, Rust and PHP have the regenerated types and need the field on their fork call; Kotlin and Dart need it on fork only if they expose fork.
`resumeSession` (`POST /v1/agents/sessions/{id}/resume`, client accessible, AI-3201) carries a conversation on with `ResumeSessionRequest`: `tool_timeout_ms` and `tools` (`SessionTool`) written over what it ran with, answered with the `Session` as `getSession` does. The router now keeps the caller's `tool_timeout_ms` and declared tools on the session row, so an SDK's `resume` needs to send this only to change them. Send it when there is something to say, a timeout or functions registered in this process, declared as on create; otherwise read the session with `getSession` as before, since a session that cannot be carried on (a call that kept no conversation) is still read. Do not send an empty `tools` for "no functions here": it clears the stored ones another watcher may run. Declare none for a resume that will not watch, since nothing runs them. A running session ignores the tools sent; it takes only the timeout, and only from the kind of caller that opened it. The router has to be deployed before an SDK that sends this ships. A timeout under a millisecond is not sent, as on fork. JavaScript's `ResumeOptions` takes `tool_timeout_ms`; Go has `client.ResumeOptions.ToolTimeout`, read by `client.Sessions.Resume` and `agents.Sessions.Resume`, through `stream.Pipeline.Resume`. Python (`plugins/stream`), .NET, Rust, Ruby and PHP have the regenerated types and need it on their resume; Swift, Kotlin and Dart need it only if they expose resume. `ForkSessionRequest.tool_timeout_ms`'s description no longer says the row keeps no timeout; a fork of an ended parent still has 30 seconds.
`SessionFilter` takes `config_id` (a value or `{"$eq": ...}`), `state` (`live` or `ended`, a value or `{"$eq": ...}`), `created_at` (`TimeWindow`: `$gte` and/or `$lt`, RFC 3339) and `custom` (an object of string labels the session's `custom` holds), anywhere in the filter, `$or` included. Go documents them on `client.Filter`. Every generated client is regenerated (`SessionStateEquals` is the new `state` schema; Swift drops `config_id` and `state`, which are string-or-object unions). Other SDKs need to update: every typed filter (Kotlin, Swift, Dart) should offer the four fields, and the client SDKs may offer all four, since none is server side only.
`POST /v1/agents/conversations/{cid}/tool_approvals` (`answerConversationToolApproval`, client-accessible, body `ToolApprovalAnswer`: `tool_call_id`, `request_id`, `allowed`, `summary`) answers a connector call held for approval in a conversation, as `tool_approval` on the session socket does: 204, 403 when the call asks another person, 404 when nothing waits or the caller is not a member of the channel. In a channel of a type `chat_channels` names, the call asks the writer of the message (its step's `target_user_id`), who answers with their own token, since the router's session there is no socket of theirs (AI-3154). Go has `stream.Backend.AnswerApproval(ctx, cid, toolCallID, requestID, allowed, summary)`. Other SDKs need to update: Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP have the regenerated operation and need a hand-written call beside their socket's approval answer; Swift, Kotlin and Dart, whose users are the writers, need the operation added to their client filter and a call that answers a step's approval with the user's own token.
Generative UI follow-up (no wire or spec change): `ui.format` in agent.yaml accepted only `openui` when this landed; `a2ui` now compiles in Go and JavaScript too (below). `sdks/testdata/ui/concierge/` and `sdks/testdata/ui/concierge.instructions.txt` are what an SDK that compiles `ui:` must reproduce byte for byte; Go and JavaScript test against them. The router never sends an `overflow` pointer in `custom.ai_ui`, so a client's `LiveUI` needs no branch for one (JavaScript and Dart dropped theirs). A client that folds a turn's UI into a value it skips when equal must count the raw, unmerged patch text in that equality, or a patch delta that leaves the merged card unchanged is lost and the next one lands on stale text (Dart's `Conversation ==` now does). Other SDKs need to update: Python, .NET, Ruby, Rust and PHP, when they read `ui:`, against the shared fixture; Swift and Kotlin, when they fold `ui_delta`, the equality rule (both now keep the raw text apart from `Turn.ui`, as below).
Swift's live UI follows the `LiveUI` rules in the `generative-ui` skill (no wire change): a reply that names its turn shows only that turn's UI, `latest` is the newest turn's UI only when that turn is the agent's, a reply shows the socket's UI only while Chat says it is `generating` and its `ai_ui` isn't complete, there is no `overflow` branch, and a patch with no card before it in the transcript sets no `Turn.ui`. `Conversation` keeps each turn's raw UI text apart from `Turn.ui`, as JavaScript does, so no delta is lost to equality. Swift also shows only the finished statements of OpenUI while it streams: `TurnUI.content` holds back the statement no newline has ended yet, and `LiveUI.overlay` leaves a reply its text until one is finished, so a card grows a part at a time instead of reflowing with every delta (a gauge reading 8 before 86).
Kotlin's live UI follows the same `LiveUI` rules as Swift's (AND-1948, no wire change): a reply that names its turn (`turn_id`, or `support_runtime.turn_id`) shows only that turn's UI, `latest` is the newest turn's UI only when that turn is the agent's, a reply shows the socket's UI only while Chat says it is `generating` and its `ai_ui` isn't complete, there is no `overflow` branch, and a patch with no card before it in the transcript sets no `Turn.ui`. `Conversation` keeps each turn's raw UI text apart from `Turn.ui` (`uiWritten`, counted in equality), so no delta is lost to equality. `TurnUI.content` holds back the OpenUI statement no newline has ended yet, a turn has no `Turn.ui` until one is finished, and a streamed patch merges only its finished statements, as JavaScript's do, so `LiveUI.overlay` leaves a reply its text until one is finished. A turn that ends with no `ui_completed` settles on `responded` or `interrupted`, as in JavaScript: its UI is complete, with the last statement shown when its brackets and strings closed. `TurnUI.customData` is the UI as a message's `ai_ui` holds it, so a call screen, which shows no channel, shows the newest `Turn.ui` through `AIUIDocument.from`. Other client SDKs need nothing new from this. Kotlin has `AgentSession.addTools` and `removeTool` (#2050), but `android_assistant` does not use them yet, so its seat selector brings no `reserve_table` tool.
JavaScript holds back the unfinished OpenUI statement too (no wire change): while a turn's OpenUI streams, `TurnUI.content` in `sdks/js/src/conversation.ts` is its finished statements only, joined by newlines with blank and comment lines left out, and `ui_completed` shows the whole program. A turn gets no `Turn.ui` until a statement is finished, so `LiveUI` leaves a reply its text and a call keeps the card before until then, and a streamed patch merges only its finished statements onto the card before it. A turn that ends with no `ui_completed`, as an interrupted reply does (the router drops its UI block with the turn), settles on `responded` or `interrupted`: its UI is complete, with the last statement shown when its brackets and strings closed. Other client SDKs need to update: React Native, when it folds `ui_delta`, should hold back the same way; Kotlin does (AND-1948, above).
Dart holds back the unfinished OpenUI statement the same way as JavaScript (no wire change): `sdks/dart/stream_agents/lib/src/core/conversation.dart` keeps what each turn's UI wrote in the `Conversation` value until it settles (counted in its `==`, so a holder that skips equal values loses no delta), sets `Turn.ui` only once a statement is finished, merges a streamed patch's finished statements only, and settles on `responded` or `interrupted`. `LiveUI.observe` reports a change only when what shows changed, not when only `TurnUI.raw` grew.
`ui.format: a2ui` compiles in Go (no wire or spec change): the agent is told to write A2UI 1.0 in a ```` ```ui:a2ui@1.0 ```` block with the catalog `getstream.io:app-catalog`, the prompt stream-chat-swift's A2UI renderer writes for itself (`sdks/go/agents/ui_a2ui.go`). The basic catalog and protocol text are files, `sdks/go/agents/a2ui/basic_catalog.json`, `protocol.md` and `writing.md`, which `a2ui/generate.sh` writes from stream-chat-swift. `keep` names the basic catalog's components and functions, with nothing implied; `patch_mode` is refused with `a2ui`; a blueprint `example` is A2UI, checked as the renderer's `A2UIProgram` checks it. JavaScript compiles it too (`sdks/js/src/ui-a2ui.ts`), held to `sdks/testdata/ui/concierge-a2ui/` and `concierge-a2ui.instructions.txt`, with the three files as `sdks/js/src/generated/a2ui.ts`, which `npm run a2ui` writes from Go's copies after `generate.sh` (a test fails while they differ). Other SDKs need to update: Python, .NET, Ruby, Rust and PHP, when they read `ui:`, against the same fixture.
A running session's caller gives it tools and takes them back (no socket change): `POST /v1/agents/sessions/{id}/tools` (`addSessionTools`, body `AddSessionToolsRequest` `{tools: SessionTool[]}`, at least one) and `DELETE /v1/agents/sessions/{id}/tools/{name}` (`removeSessionTool`), both client-accessible and 204. A tool named as one the caller already has is a 409: to change one, remove it, then add it again, so no call runs half under each declaration. A change waits for the turn in progress and every tool call in flight, one answered as still running included, so a call is only checked against the tools it was made with, the model is offered the change from the next turn, and once a removal answers no call of the tool can still arrive: a handler goes then, and must not wait for a change from inside a call. Only the kind of caller that opened the session may: a device its own session's, a backend a backend's (403 otherwise). A name the session offers from elsewhere (built in, a connector's, a worker's, another agent's) is a 409; withdrawing a name the caller has no tool by, or changing a session that is not running, a 404; a speech-to-speech model whose tools are fixed when it opens (Gemini Live) a 400; a speech-to-speech session that drops while the change waits a 503, to ask again. A native model's call made while the tools change, or by a reply that opened while they did, is refused rather than run, and so is one of a tool it is not offered. A watcher that names the tools it runs (`?tools=`) is also asked to run the ones its side added, and leaves a call it does not hold to one that does, as every SDK's socket already does. Go has `stream.Pipeline.AddTools(ctx, *tools.Registry)` and `RemoveTool(ctx, name)`, with `client.Session` wrappers; the added functions are the session's alone, not its agent's registry, and are forgotten when it is left. Swift has `AgentSession.add(tools:)` and `remove(toolNamed:)`, and `swift_assistant`'s seat selector brings `reserve_table` that way. Go, JavaScript, Python (`plugins/stream`), Swift, .NET, Ruby, Rust and PHP are regenerated; Kotlin's and Dart's generators do not list the two operations yet. Other SDKs need to update: JavaScript, Python, .NET, Ruby, Rust and PHP need the two methods beside their tool registries, the added functions kept per session; Kotlin and Dart on their client session, as Swift does. Each puts a handler in place before the request for a name it does not have yet, never replaces one it has, takes it back only when the router refused, marks a name whose adding got no answer unsettled and withdraws it (a 404 being as good) before the name is added again, lets a name withdrawn from its agent-wide registry be added again with another function, and makes one change at a time.
A session's metrics have resource methods (no spec change): `getCallTokens`, `getCallTimeline` and `getCallEvents` take the session's id (the calls table is keyed by it) and are read through the server-side sessions resource as `tokens(id)`, `timeline(id)` and `decisions(id)`, named decisions rather than events because a session already has a live `events()` stream. Go has `client.Sessions.Tokens`, `Timeline` and `Decisions` (`sdks/go/client/sessions.go`); JavaScript, Python (`plugins/stream`), .NET (`TokensAsync`, `TimelineAsync`, `DecisionsAsync`), Ruby, Rust and PHP have them too. `decisions` sends no `limit`, so the router's default applies. Swift, Kotlin and Dart need nothing, since the three are server-side only.
A session's tokens moved to `getSessionTokens` (`GET /v1/agents/sessions/{id}/tokens`, server side only), since a chat session has tokens and no call; an unknown id is a 404 `session_not_found`. `getCallTokens` (`GET /v1/agents/calls/{id}/tokens`) is deprecated and still served, answering an unknown id with `call_not_found`. `getCallTimeline` and `getCallEvents` stay under `/calls/`, since only a voice session has them. Every generated client is regenerated and every server SDK's `tokens(id)` reads the new path. Other callers need to update: the Volt dashboard's `use-call-tokens.ts` and the CLI's generated `operations_gen.go` still read `getCallTokens`.
A running session's caller gives it tools and takes them back (no socket change): `POST /v1/agents/sessions/{id}/tools` (`addSessionTools`, body `AddSessionToolsRequest` `{tools: SessionTool[]}`, at least one) and `DELETE /v1/agents/sessions/{id}/tools/{name}` (`removeSessionTool`), both client-accessible and 204. A tool named as one the caller already has is a 409: to change one, remove it, then add it again, so no call runs half under each declaration. A change waits for the turn in progress and every tool call in flight, one answered as still running included, so a call is only checked against the tools it was made with, the model is offered the change from the next turn, and once a removal answers no call of the tool can still arrive: a handler goes then, and must not wait for a change from inside a call. Only the kind of caller that opened the session may: a device its own session's, a backend a backend's (403 otherwise). A name the session offers from elsewhere (built in, a connector's, a worker's, another agent's) is a 409; withdrawing a name the caller has no tool by, or changing a session that is not running, a 404; a speech-to-speech model whose tools are fixed when it opens (Gemini Live) a 400; a speech-to-speech session that drops while the change waits a 503, to ask again. A native model's call made while the tools change, or by a reply that opened while they did, is refused rather than run, and so is one of a tool it is not offered. A watcher that names the tools it runs (`?tools=`) is also asked to run the ones its side added, and leaves a call it does not hold to one that does, as every SDK's socket already does. Go has `stream.Pipeline.AddTools(ctx, *tools.Registry)` and `RemoveTool(ctx, name)`, with `client.Session` wrappers; the added functions are the session's alone, not its agent's registry, and are forgotten when it is left. Swift has `AgentSession.add(tools:)` and `remove(toolNamed:)`, and `swift_assistant`'s seat selector brings `reserve_table` that way. Every SDK has them now, the added functions kept per session: JavaScript `Session.addTools`/`removeTool`, Python (`plugins/stream`) `Session.add_tools`/`remove_tool` and `Accelerated.add_tools`/`remove_tool`, .NET `Session.AddToolsAsync`/`RemoveToolAsync`, Ruby `Session#add_tools`/`remove_tool`, Rust `Session::add_tools`/`remove_tool`, PHP `Session::addTools`/`removeTool`, and Kotlin and Dart `AgentSession.addTools`/`removeTool`, whose generators list the two operations. Each puts a handler in place before the request for a name it does not have yet, never replaces one it has, takes it back only when the router refused, marks a name whose adding got no answer unsettled and withdraws it (a 404 being as good) before the name is added again, lets a name withdrawn from its agent-wide registry be added again with another function, and makes one change at a time.
A removal whose answer is lost is unsettled as an add's is, in every SDK, Go and Swift included: the handler stays until the next remove (a 404 accepted) or add (which withdraws first) of the name settles it. A change given up on while its request is in flight is unsettled the same way; Rust marks the name before the request, since a dropped future runs nothing after it. Only a 4xx is a refusal (an add's handlers taken back, a removal changing nothing): a 5xx, a 2xx that cannot be read, or no answer leaves the name unsettled, since a gateway can answer 502 or 504 after the router applied the change. The SDK's own HTTP stack resends neither request (a client the app hands in, with retries of its own, is the app's), so a lost answer never comes back as a replay's 404 or 409: JavaScript sends the DELETE as not idempotent, Ruby turns off Net::HTTP's one resend of it, PHP sends it on an Amp client without `RetryRequests`, .NET sends it with an empty body, since its handler resends a bodyless request whose connection closed before any answer, and Kotlin sends both as a one-shot body OkHttp never replays; Go, Python, Rust, Swift and Dart's stacks resend neither. A fork of a running session is offered the tools the parent has now (`forkSpec` takes the live spec, which a change of tools updates; `TestAForkOfARunningSessionIsOfferedTheToolsItHasNow`), so a fork watched with handlers gets the session's current ones (opening minus withdrawn, plus added), copied with the session's unsettled names and asked for under the change lock: Go `Session.Fork`, JavaScript, Python, .NET, Ruby, Rust, PHP and Dart. Such a fork waits for a change in flight, so it is not awaited from inside one of the session's tools either. Swift's and Kotlin's `fork` return a session the app attaches with its own tools. Python, .NET, Ruby, Rust and PHP keep a copy of the added functions, since a caller's registry there could later hold another function under the name; Go's and JavaScript's refuse a second one, and Swift's, Kotlin's and Dart's tools are values.
Tool groups (breaking): `tools` on `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` is now a list of `ToolGroup` (`name`, `loading` of `ToolLoading` `full`/`summary`/`deferred`, `tools`, `output_retention`), and the mapping it was (`AgentTools`: `progressive`, `output_retention`) is refused with a 400. `AgentConnectorBinding` gains `loading` and `output_retention` the same way. A session under a config is offered only the functions a group names: one its caller declares that no group names is a 400 `tool_not_configured` on create and on `addSessionTools`, and a worker's that no group names is not offered. `summary` is what `progressive: true` was; `deferred` holds a tool back until the model finds it with the router's `search_tool` and loads it with `load_tool`, names no function may take. `OfferedTool` (`listSessionTools`) carries `loading` for a live session. Go reads `tools:` in agent.yaml as the list (`sdks/go/agents/folder.go`, `toolGroupList`), refuses the old mapping saying where its settings went, and sends `loading` and `output_retention` on a connector entry; its examples name their functions in a group. Other SDKs need to update: Python (`vision_agents`' folder loader and `plugins/stream`), JavaScript (`sdks/js/src/folder.ts`), .NET, Ruby, Rust and PHP read `tools:` as the group list, refuse the mapping and send the connector fields, and their examples and docs name every function they register in a group, or those functions are refused; Swift, Kotlin and Dart need nothing but the regenerated types, since configs are server side.
Tool call state (no breaking change): the session socket sends `tool_call.started`, `tool_call.progress` and `tool_call.finished` for every call of the session, whoever runs it (the router, a worker, a connector, a device), each carrying the call's whole `ToolCallState` (`tool_call_id`, `tool`, `turn_id`, `status` of `ToolCallStatus` `in_progress`/`waiting`/`success`/`failed`/`cancelled`, `progress`, `started_at`, `duration_ms`, `approved_at`, `rejected_at`, `error`), so a client replaces what it holds rather than merging. `waiting` is a call held for a person's approval, with its question as `progress`; a declined call or one whose wait lapsed ends `cancelled` with `rejected_at`. `tool_held` and `tool_updated` are now listed frames too. The schema is in the socket's `x-server-frames`. A function an agent's tool groups name that nothing on the session runs is logged as a warning on create, and a call of a hosted function no worker holds is warned of, while the agent carries on. Go has `stream.Pipeline.On(kind, fn) (off func())`, `ToolCall(id)` and `ToolCalls()`, with `client.Session.On`/`ToolCall`, and `Event.ToolCall`; JavaScript `session.toolCalls` (a store of a `ReadonlyMap`), `session.toolCall(id)`, `session.on(kind, fn)` and `useToolCalls`/`useToolCall`/`useSessionEvent` from `@stream-io/stream-agents/react`; Swift `@Published toolCalls` and `on(_:perform:) -> AnyCancellable`; Kotlin `toolCalls: StateFlow`, `toolCall(id): Flow` and `on(kind, handler): Job`; Dart `toolCalls: LiveValue` and `on(kind, handler)`. Each keeps finished calls, and the client SDKs no longer run an app tool's call sent with `run: false`, nor ask again for one sent `approved: true`. Other SDKs need to update: Python (`plugins/stream`), .NET, Ruby, Rust and PHP need the typed state, the three kinds and an `on(kind, handler)` on their session.
A tool call no longer says how it is going (no wire change): every SDK dropped its call's update and say (Go `tools.Call.Update`/`Say`, with `tools.Line` only `Hold`; JavaScript and Python `ToolCallContext.update`/`say`, with `ToolLine` only `hold`; .NET `UpdateAsync`/`SayAsync`; Ruby, Rust and PHP `update`/`say`). A session's own `say` stays. The router still takes `tool_update` (with `verbatim`) from SDKs already released, so it stays in the spec and on the socket. Swift, Kotlin and Dart never had them.
A tool call's update is back, without say, and carries data (`tool_update` gains `custom`): every server SDK sends `{"type":"tool_update","tool_call_id","text","custom"}`, leaving out an empty title and a missing `custom`, and does nothing outside a call. There are two forms: a title shortcut, and a full update with an optional title and `custom`. Go has `tools.Call.Update(ctx, title)` and `SendUpdate(ctx, tools.Update{Title, Custom})` (`tools.Line.Update(ctx, id, update)`); JavaScript `ToolCallContext.update(title | {title, custom})` (`ToolLine.update(id, update)`); Python `await ToolCallContext.update(title, custom=...)` (`ToolLine.update(id, title, custom)`); .NET `UpdateAsync(title)` and `UpdateAsync(new ToolCallUpdate(Title, Custom))`; Ruby `update(title, custom: ...)`; Rust `update(title)` and `send_update(ToolCallUpdate { title, custom })`; PHP `update(?title, ?custom)`. The router keeps the title as the call's `progress` and replaces the call's `custom` whole with each update that carries one, keeping it once the call finishes. An update with only `custom` changes no title and is not spoken, and sends no `tool_updated`. `ToolCallState` gains `custom`, read by JavaScript (`ToolCallState.custom`), Kotlin, Swift and Dart. The client SDKs' title is the update while the call runs or waits, then the display title, then the tool's name: JavaScript `toolCallTitle`, Kotlin, Swift and Dart `ToolCallState.title`. Nothing is left to update.
Tool stats per agent (no breaking change): `getAgentStats` (`GET /v1/stats/agents`, server side only) takes `agent`, a config id (unknown is a 404 `agent_config_not_found`), and answers `sessions` and `avg_turns` beside the peak. Each `ToolStats` adds `sessions`, `session_share` (0 to 1, out of the window's sessions), `avg_turns_before_use`, `loading`, `definition_tokens` and `summary_tokens`: what deciding a tool's loading weighs. Go has the regenerated `GetAgentStatsParams.Agent` and fields, and no hand-written call. JavaScript and Python (`plugins/stream`) are regenerated. Other SDKs need to update: .NET, Ruby, Rust and PHP regenerate their types, and any that wrap the stats call pass `agent`; Swift, Kotlin and Dart need nothing, since it is server side.
Tools hosted for every agent (no spec change): a worker's `host_tools` frame takes `every_agent: true` in place of an `agent_id`, and the router offers those tools to any session whose config names them in a tool group (never to a session without a config); a tool of the same name hosted for the agent itself wins. A frame with neither, or both, is `hosting_refused`; `hosting` and `hosting_refused` echo `every_agent`. Every server SDK registers the app's tools once on its client and hosts them with `every_agent`, and agent handles no longer carry tools: Go `client.Tools()` and `client.RunDispatch(ctx)` (`stream.ToolHost`, which `*client.Client` satisfies, is what `Dispatch.Host` takes), Python `Client.tools` and `run_dispatch()`, JavaScript `client.tools` and `runDispatch(signal)`, .NET `Tools` and `RunDispatchAsync`, Ruby `tools` and `run_dispatch`, Rust `tools()` and `run_dispatch()`, PHP `$tools` and `runDispatch()`. `dispatch.host(client)` is for a worker that also answers calls or messages. A client derived for a user (`AsUser`, `as_user`, `SetUser`) shares the registry. Other SDKs need to update: JavaScript's folder loader (`sdks/js/src/folder.ts`) refuses a top-level `tools:` in agent.yaml, so `travel_support_js` cannot name `lookup_booking` in a group and its agent is not offered it until the loader reads tool groups.
Agent stats have an SDK method (no spec change): Go's `client.Agent.Stats(ctx, from, to)` looks up the agent's config by name and reads `getAgentStats` for its id, failing without a request for a name nothing is stored under (`sdks/go/client/client.go`). Other SDKs need to update: Python (`plugins/stream`), JavaScript, .NET, Ruby, Rust and PHP need the same `stats(from, to)` on their server-side agent; Swift, Kotlin and Dart need nothing, since it is server side.
Dart catches up with Swift and Kotlin (no spec change): `AgentSession.interrupt({requestId})` sends `request_id` on the `interrupt` frame only when given, `say(text, interrupt: true)` sends a bare `interrupt` before the `say`, and `StreamAgents.scheduledTasks` is the Swift/Kotlin `ScheduledTasks` (`list`, `get`, `update`, `pause`, `resume`, `delete`, `runs`), its seven operations on Dart's generator allowlist, `update` never sending `instructions`. Dart spells the wire's `in` as `after` (`ScheduledTaskNext.after`, `ScheduledTaskSchedule.after`), as Kotlin does, and refuses `ScheduledTaskState.unknown` in a query with an `ArgumentError` before asking, as Kotlin does. Dart's generator now reads a property the spec requires but marks `nullable` as optional and always writes it, null included (`ScheduledTask.last_run_at` and `next_run_at`, `AddSessionToolsRequest.tools`). Still not in Swift, Kotlin or Dart, to be added to the three together: `tool_timeout_ms` on fork, the `config_id`, `state`, `created_at` and `custom` session filters, regenerate/edit/branches (`replaces`, `listResponseSiblings`, `getResponseBranch`, `activateResponse`), a document on `responses.create` (`files`), and answering an approval from a conversation's history (`answerConversationToolApproval`). None needs `resumeSession`: their `attach` reads the session with `getSession`, and the router keeps the declared tools and `tool_timeout_ms` on the session row, so resume is only needed to change them.
Go `Agent.Sync` stores the config first (unless the stored config has a sandbox, AI-3363 below) and then its skills with `config_id` set (AI-3342): the router refuses a skill with no config (`skillComplaint`, `acceleration/internal/api/configs.go:1502`), and skill names are unique per config, so the skills are listed with `config_id` to find the ones to edit. `agents.DefineSkills` takes the `configID`. Other SDKs: Python already does this (`plugins/stream/vision_agents/plugins/stream/config.py:304-305`); JavaScript (`sdks/js/src/agent.ts:559`), Ruby (`sdks/ruby/lib/getstream/vision_agents/agent.rb:369`), .NET (`sdks/dotnet/src/GetStream.VisionAgents/Agent.cs:509`) and PHP send skills inside the `syncAgent` body and are not affected. **Rust needs the same fix**: `sdks/rust/src/agent.rs:675-690` (`sync_config`) creates or updates skills with `Skill::request()` (`sdks/rust/src/harness.rs:52`, no `config_id`) before it stores the config; store the config first, then list skills with `config_id` and write each with the config's id.
An agent's UI instructions are kept apart from its instructions, so a session can turn UI off: `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` have `ui_instructions` (an additive migration), and `CreateSessionRequest` has `ui`, a boolean a device may send. The router tells the model `ui_instructions` after the instructions (a backend's own session instructions included) unless the session was opened with `ui: false`, which reopening or forking it keeps (`agent_sessions.no_ui`). A sync sends the directory whole, so a sync without `ui_instructions` removes them; a PUT that leaves them out keeps them, so a client that does not know the field does not take the UI away. Go's `Load` compiles agent.yaml's `ui:` into `Folder.UIInstructions` and `syncFolder` sends it as `ui_instructions`; the folder's hash takes it in only when there is UI, so a directory without `ui:` is not synced again, and one with it is synced once more, which moves the UI out of the stored instructions. A router older than the field takes the sync and drops it, so `syncFolder` does not trust a stamp covering UI that the stored config lacks, and syncs again, and the router writes a sync of the same hash that declares UI the config lacks rather than finding it unchanged. Deploy the router before releasing an SDK that sends the field. A folder synced by both SDKs flips back: a JavaScript sync writes the UI into `instructions` and removes `ui_instructions`, so a session with `ui: false` is told the UI again; sync a folder with one SDK until JavaScript sends `ui_instructions`. The shared fixtures are unchanged: they are what the model is told, the instructions and the UI joined by a blank line, as the router joins them. Every generated client is regenerated (Go, JavaScript types, Python `plugins/stream`, Swift). Other SDKs need to update: JavaScript (`sdks/js/src/folder.ts`) should send the compiled `ui:` as `ui_instructions` rather than append it to `instructions`, its hash taking it in the same way; Python, .NET, Ruby, Rust and PHP, when they read `ui:`, the same; Swift has `SessionOptions.ui`, which `swift_assistant`'s Settings switch sets, and JavaScript's `sessions.create` passes `ui` through with the regenerated types; Python, Kotlin, Dart and the other server SDKs should offer `ui` on their create-session options, so an app that shows no UI can say so.
Go `Agent.Sync` and Python `stream.define_agent` write a stored config's skills before the config when that config has a sandbox, and after it otherwise (AI-3363). The router refuses a config edit without a sandbox while a skill it names still has scripts (`storedSkillSandboxComplaint`, `acceleration/internal/api/configs.go:1552`), and refuses a skill with scripts while the stored config has no sandbox (`configs.go:475`, `:527`). So a sync that drops the sandbox and a skill's scripts together needs the skills first, and one that adds both needs the config first. Other SDKs: JavaScript (`sdks/js/src/agent.ts:597`), Ruby (`sdks/ruby/lib/getstream/vision_agents/agent.rb:244`), .NET (`sdks/dotnet/src/GetStream.VisionAgents/Agent.cs:528`) and PHP (`sdks/php/src/Agent.php:271`) send skills inside one `syncAgent` body, which the router checks against the new sandbox (`acceleration/internal/api/sync.go:329`), so they are not affected. Swift, Kotlin and Dart store no configs. **Rust needs the same order**: `sdks/rust/src/agent.rs:675-710` (`sync_config`) writes every skill before the config, so a sync that adds the sandbox and a skill's scripts together is refused; with the AI-3342 fix above, write the skills first only when the stored config has a sandbox.
Go `Agent.Sync` stores the config first and then its skills with `config_id` set (AI-3342): the router refuses a skill with no config (`skillComplaint`, `acceleration/internal/api/configs.go:1502`), and skill names are unique per config, so the skills are listed with `config_id` to find the ones to edit. `agents.DefineSkills` takes the `configID`. Other SDKs: Python already does this (`plugins/stream/vision_agents/plugins/stream/config.py:293`); JavaScript (`sdks/js/src/agent.ts:559`), Ruby (`sdks/ruby/lib/getstream/vision_agents/agent.rb:369`), .NET (`sdks/dotnet/src/GetStream.VisionAgents/Agent.cs:509`) and PHP send skills inside the `syncAgent` body and are not affected. **Rust needs the same fix**: `sdks/rust/src/agent.rs:675-690` (`sync_config`) creates or updates skills with `Skill::request()` (`sdks/rust/src/harness.rs:52`, no `config_id`) before it stores the config; store the config first, then list skills with `config_id` and write each with the config's id.
An agent's UI instructions are kept apart from its instructions, so a session can turn UI off: `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` have `ui_instructions` (an additive migration), and `CreateSessionRequest` has `ui`, a boolean a device may send. The router tells the model `ui_instructions` after the instructions (a backend's own session instructions included) unless the session was opened with `ui: false`, which reopening or forking it keeps (`agent_sessions.no_ui`). A sync sends the directory whole, so a sync without `ui_instructions` removes them; a PUT that leaves them out keeps them, so a client that does not know the field does not take the UI away. Go's `Load` compiles agent.yaml's `ui:` into `Folder.UIInstructions` and `syncFolder` sends it as `ui_instructions`; the folder's hash takes it in only when there is UI, so a directory without `ui:` is not synced again, and one with it is synced once more, which moves the UI out of the stored instructions. A router older than the field takes the sync and drops it, so `syncFolder` does not trust a stamp covering UI that the stored config lacks, and syncs again, and the router writes a sync of the same hash that declares UI the config lacks rather than finding it unchanged. Deploy the router before releasing an SDK that sends the field. A folder synced by both SDKs flips back: a JavaScript sync writes the UI into `instructions` and removes `ui_instructions`, so a session with `ui: false` is told the UI again; sync a folder with one SDK until JavaScript sends `ui_instructions`. The shared fixtures are unchanged: they are what the model is told, the instructions and the UI joined by a blank line, as the router joins them. Every generated client is regenerated (Go, JavaScript types, Python `plugins/stream`, Swift). Other SDKs need to update: JavaScript (`sdks/js/src/folder.ts`) should send the compiled `ui:` as `ui_instructions` rather than append it to `instructions`, its hash taking it in the same way; Python, .NET, Ruby, Rust and PHP, when they read `ui:`, the same; Swift has `SessionOptions.ui`, which `swift_assistant`'s Settings switch sets, and JavaScript's `sessions.create` passes `ui` through with the regenerated types; Python, Kotlin, Dart and the other server SDKs should offer `ui` on their create-session options, so an app that shows no UI can say so.
Connections (AI-3376): Go has `client.Connections()` for the accounts the app and its users hold at connectors, over `createConnection`, `createAuthorization`, `getConnection`, `listConnections` and `deleteConnection`, with no router change. The shape the other SDKs copy is one flat `connections` resource on the client with the user as a parameter of each call, always the `UserID` of the call's options struct (other SDKs use an optional named parameter `userId`/`user_id`), as Chat's server SDKs pass `user_id` (no per-user client): `Create(ctx, ConnectionRequest{Connector, Label, UserID})`, `Authorize(ctx, id, AuthorizeOptions{ReturnURL, UserID})` returning the generated `Authorization` (launch URL, handoff token, expiry), `Get(ctx, id, ConnectionOptions{UserID})`, `List(ctx, ConnectionFilter{UserID, Connector})` reading every page newest first, and `Delete(ctx, id, ConnectionOptions{UserID})`. A user given is sent as `owner.user_id` (create only) and as `X-Stream-User-Id` on every request, reads included, overriding whoever the client otherwise acts for; an empty user is the app's connection (`owner.type: app`, no header, List asks `owner_type=app`). An app connection is reached (Get, Authorize, Delete) by every backend call, one naming a user included; only List with a user is that user's alone. Refusals are the SDK's router error; an empty connection id is refused before sending. Other SDKs need to update: JavaScript, Python (plugins/stream), .NET, Ruby, Rust, PHP (AI-3378..AI-3383).
Connections in Rust (AI-3383): `Client::connections()` (`sdks/rust/src/connections.rs`) follows Go's shape with the user as `user_id` of each call: `create(&NewConnection{connector, label, user_id})`, `authorize(id, &AuthorizeOptions{return_url, user_id})`, `get(id, user_id: Option<&str>)`, `list(&ConnectionFilter{connector, user_id})`, `delete(id, user_id: Option<&str>)`; options structs rather than adjacent `Option<&str>` so a label cannot be swapped for a user. A user given goes through `pub(crate) Client::acting_for`, so the header matches the call and replaces a `ClientOptions::user_id` the client was built with; no user (or an empty one) leaves the client as built, as Go's `UserID` does (92148e5fe). Rust had no public acting-for helper to deprecate for AI-3387: `Backend` and its `acting_for` field are crate-private (`sdks/rust/src/backend.rs`, not re-exported from `lib.rs`), and `Client::acting_for` is `pub(crate)`. No other SDK needs to change for this.
Connections in JavaScript (AI-3378, AI-3387): `api.connections` has `create(connectorId, { label, userId })`, `authorize(id, { returnUrl, userId })`, `get(id, { userId })`, `list({ connectorId, userId })` (every page, 200 a page, newest first) and `delete(id, { userId })`. The user is an optional parameter of each call, never a client of its own: given, it is sent as `owner.user_id` (create) and `X-Stream-User-Id` on every call, reads included, with the app's server credential (an internal `speakingFor(backend, userId)` in `backend.ts`, kept off `Backend`'s type, which Dispatch's `answer` also uses); left out or empty, the call is the app's (`owner.type: app`, `owner_type=app`, no header added). Optional parts are one options object, never adjacent positional strings. `Backend.actingFor` stays public and working, marked `@deprecated` (Chat's "deprecate, never break"), and a test pins its requests to the base commit's. A client built with `BackendOptions.userId` still sends that user on a call without `userId`, as on every other call; one built on the deprecated `actingFor` does not (the call is the app's). A `userId` on a client that is not server side (a device, or a page on a customer-id router) is a `ConfigurationError` before any request. Other SDKs need to update: Python, .NET, Ruby, Rust and PHP (AI-3379..AI-3383).
Connections in Python (AI-3379, no spec change): `plugins/stream` has `api.connections` with the Go shape: `create(connector_id, *, label=None, user_id=None)`, `authorize(id, *, return_url=None, user_id=None)` returning `Authorization`, `get(id, *, user_id=None)`, `list(*, connector_id=None, user_id=None)` reading every page, `delete(id, *, user_id=None)`; every option is keyword-only, so a user id cannot land in the label's or connector's slot. A user given is `owner.user_id` (create) and `X-Stream-User-Id` on every call, replacing whoever the client acts for and the user its backend was built for (which behind the proxy would sign that user's own token); none is the app's connection, sent as the client is otherwise (a client built for a user still names that user). AI-3387 in Python: `Client.for_user` is deprecated (`DeprecationWarning`, still working) in favour of a keyword-only `user_id=None`, last, on `Client.agent` and `Client.router`, on a client built with `team=`/`usage_categories=`; a device naming a user is refused before any request. Dispatch and `Accelerated` keep `Backend.acting_for` internally.
The session socket sends `reasoning_delta` (`turn_id`, `text`): the next piece of the model's thinking on a written reply, which a kept conversation also streams into the reply's Chat message and an incognito one has nowhere else to show. JavaScript folds it, with `tool_started`, `tool_updated` (not `verbatim`) and `tool_ran`, into each agent turn's `steps` in `sdks/js/src/conversation.ts`: a round of thinking `r1`, `r2`... opens on a delta after anything else and completes when the turn writes text or UI, calls a tool, answers or is cut off; a call runs until `tool_ran`, failed when it carries an `error`, its summary the last non-verbatim update. A turn is `done` on `responded` with no `pending_work`, or `interrupted`. `AgentChat` shows a session with no `conversationId` from these turns (`sdks/js/src/turn-messages.ts`): the agent's turns between two of the person's messages are one reply, shaped as the channel's messages (top level in stream-chat 9, under `custom` in 10) with `ai_reasoning` and `ai_tool_call` steps, rounds numbered across the reply, its whole thinking given to `reasoning`, and a call waiting in `approvals` shown `awaiting_approval` with its question and the session's `user_id` as `target_user_id`. The clients that carry the socket's description (JavaScript types, Python `plugins/stream`) are regenerated. Swift does the same: `Conversation` folds the frames into `Turn.steps` and `Turn.isDone`, and `TurnMessage.messages(of:approvals:userID:isConnected:)` (`session.turnMessages`) builds the replies, each step an attachment type and JSON payload for `AIMessagePart.parts(from:)`, the session's user now `Session.userID`; `swift_assistant`'s `AgentChat` shows an incognito session from them. Kotlin does the same: `Conversation` folds the frames into `Turn.steps` (`TurnStep.Reasoning`, `TurnStep.ToolCall`) and `Turn.isDone`, and `TurnMessage.messages(conversation, approvals, userId, isConnected)` (`AgentSession.turnMessages`, a `Flow`) builds the replies, each step an attachment type and plain-Kotlin fields for `AIMessagePart.parts`; its `target_user_id` is the user `setUser` named (`backend.user`), not the session's `user_id`, which is the name the agent joined the call as; `android_assistant`'s `AgentTransport` shows an incognito session from them. Other SDKs need to update: Dart, whose AI components read the same steps, should fold the same frames into their `Conversation` turns and show a session with no channel through their transports; the server SDKs need nothing.
An agent's UI instructions are kept apart from its instructions, so a session can turn UI off: `AgentConfig`, `AgentConfigRequest`, `AgentConfigPatch` and `SyncAgentRequest` have `ui_instructions` (an additive migration), and `CreateSessionRequest` has `ui`, a boolean a device may send. The router tells the model `ui_instructions` after the instructions (a backend's own session instructions included) unless the session was opened with `ui: false`, which reopening or forking it keeps (`agent_sessions.no_ui`). A sync sends the directory whole, so a sync without `ui_instructions` removes them; a PUT that leaves them out keeps them, so a client that does not know the field does not take the UI away. Go's `Load` compiles agent.yaml's `ui:` into `Folder.UIInstructions` and `syncFolder` sends it as `ui_instructions`; the folder's hash takes it in only when there is UI, so a directory without `ui:` is not synced again, and one with it is synced once more, which moves the UI out of the stored instructions. A router older than the field takes the sync and drops it, so `syncFolder` does not trust a stamp covering UI that the stored config lacks, and syncs again, and the router writes a sync of the same hash that declares UI the config lacks rather than finding it unchanged. Deploy the router before releasing an SDK that sends the field. JavaScript does the same: `loadFolder` puts the compiled `ui:` in `Folder.uiInstructions`, `Agent.sync` sends it as `ui_instructions` (left out without `ui:`, so such a directory keeps its fingerprint), and a stamp covering UI the stored config lacks is synced again. When a sync's answer has no `ui_instructions` though it sent them (a router older than the field), JavaScript syncs once more with the UI joined onto `instructions`, as before, under that body's own fingerprint and without writing the stamp, so the agent keeps its UI and the next sync moves it apart once the router knows the field. That fallback cannot honour `ui: false`: the UI is in `instructions` then, which every session is told, so the Interactive UI switch needs a router that knows the field and a sync it stored apart. Go only syncs again there, so an older router leaves a Go-synced agent with no UI, and Go should fall back the same way. `Agent`'s `instructions` option replaces instructions.md only: the folder's `ui:` is still sent as `ui_instructions`, as in Go. `react_assistant`'s settings have the same Interactive UI switch as `swift_assistant`'s, which opens new conversations with `ui: false`. The shared fixtures are unchanged: they are what the model is told, the instructions and the UI joined by a blank line, as the router joins them. Every generated client is regenerated (Go, JavaScript types, Python `plugins/stream`, Swift, Rust's `types.rs`); Rust compiling and sending `ui:` is still to do, below. Other SDKs need to update: Python, .NET, Ruby, Rust and PHP, when they read `ui:`, should send it as `ui_instructions` the same way; Swift has `SessionOptions.ui`, which `swift_assistant`'s Settings switch sets, and JavaScript's `sessions.create` passes `ui` through with the regenerated types, and Kotlin has `SessionOptions.ui`, which `Sessions.create` sends as it is (null left out); Python, Dart and the other server SDKs should offer `ui` on their create-session options, so an app that shows no UI can say so.
A tool call's state (`ToolCallState`, the `tool_call.started`, `tool_call.progress` and `tool_call.finished` frames) carries `display_title`: what the call is doing, as its tool was declared with (a session's own tool's `display_title`, or a hosted tool's), or "Searching the web" for the router's own search, the same default a Chat reply's tool step uses (`conversation.ToolTitle`). A worker's `host_tools` frame takes `display_title` on each tool, beside `interruptible` and `timeout_ms`. Go has `tools.DisplayTitle(title)`, sent on `host_tools` and on a session's own tools. The generated clients are regenerated (Go, JavaScript types, Python `plugins/stream`, Ruby, PHP, .NET); Swift's generates no `ToolCallState`, so it is unchanged. JavaScript needs nothing: its `host_tools` sends `tools.declared()`, `displayTitle` included, which the router now keeps. Every server SDK now declares one: Python `register(display_title=...)` (on `ToolPolicy`, sent by `plugins/stream`'s `_with_policy`), .NET `displayTitle:`, Ruby `display_title:`, PHP `displayTitle:` and Rust's `SessionTool.display_title`; Swift, Kotlin and Dart read it off the tool call state. Nothing is left to update.
Connections in PHP (AI-3381, AI-3387): `$client->connections` (`sdks/php/src/Connections.php`) has `create(NewConnection)`, `authorize(id, AuthorizeOptions)`, `get(id, userId)`, `list(ConnectionFilter)` (every page, `limit` 200, a repeated cursor ends it) and `delete(id, userId)`, Go's shape: the calls with more than one optional take an options object (`NewConnection`, `AuthorizeOptions`, `ConnectionFilter`, `sdks/php/src/`) like Go's `ConnectionRequest`, `AuthorizeOptions` and `ConnectionFilter`, so a user id cannot take the place of a label, return URL or connector (R1.1 of the review: `create('linear', 'ada')` had filed the user's account as the app's). `userId` is optional and last (a parameter of `get` and `delete`, a field of the options objects); given, it is `owner.user_id` and `X-Stream-User-Id` with the server credential (a server token behind the proxy, never a user token); left out or empty, `owner.type: app` and no header, whoever the backend otherwise acts for. `Connections` goes through `Backend::speakingFor` (`@internal`, PHP has no package visibility), which drops the backend's own user. `Dispatch::answer` goes through `Backend::writingFor` (`@internal`, `Dispatch.php:193`), which keeps the backend's own user when the writer has none, as `onBehalfOf` did before; `onBehalfOf` calls `writingFor`. `Backend::onBehalfOf` stays public and working, `@deprecated` in favour of the `userId` parameter; PHP's `Backend::actingFor` is unchanged and still signs a user token (the device path), so its name means something else than `actingFor` in Go and JavaScript. No other public PHP wrapper used `onBehalfOf`.
.NET connections (AI-3382): `VisionAgentsClient.Connections` (`sdks/dotnet/src/GetStream.VisionAgents/Connections.cs`) has the Go shape: `CreateAsync(connectorId, NewConnectionOptions?)`, `AuthorizeAsync(id, AuthorizeOptions?)` and `ListAsync(ConnectionFilter?)` (every page, 200 at a time) take sealed options records with `UserId`, as Go's `ConnectionRequest`, `AuthorizeOptions` and `ConnectionFilter` do, because adjacent optional strings let a user passed in the wrong place become a label; `GetAsync(id, userId)` and `DeleteAsync(id, userId)` take `string? userId` last before the `CancellationToken`. A user given goes through the internal `ActingFor` that Dispatch uses (a server credential plus `X-Stream-User-Id`, replacing a user the client was made for); a null or empty one sends with the client as it is. AI-3387 needed no deprecation in .NET: `Backend` is internal (`Backend.cs:143`) and so is `VisionAgentsClient.ActingFor`, so no public acting helper or wrapper built on one exists.
Ruby connections and the user parameter (AI-3380, AI-3387): `Client#connections` has `create(connector, label:, user_id:)`, `authorize(id, return_url:, user_id:)`, `get(id, user_id:)`, `list(connector:, user_id:)` (every page, `owner_type` app or user) and `delete(id, user_id:)`; a `user_id` is the owner on create and `X-Stream-User-Id` on every call, none is the app's connection with no header. `Client#get`, `post`, `put`, `patch`, `delete` and `socket` take an optional `user_id:` last (nil keeps whoever the backend acts for, empty drops it), and `Backend#acting_for` keeps working with a `@deprecated` tag pointing at it; `Dispatch#answer` acts through `Backend#acting` (`@api private`). Other SDKs follow the same rule (AI-3378..AI-3383).
A screened turn carries its guardrail check: `TimelineEntry.guardrail` and the `guardrail` field of the session socket's `turn` frame, a `GuardrailCheck` (`kind`, `model`, `probability`, `threshold`, `allowed`, `latency_ms`, `held_ms`, `mode`, `failed`), absent when no check ran; a written aside (`Agent.Ask`) is no turn, so its check is not recorded. A `type: decision_model` guardrail.md takes a `question:` key, and a guardrail webhook's body has `conversation`, the lines said before the turn. Go has the regenerated client and `agents.GuardrailAsk.Conversation`. The generated clients are regenerated for Go, JavaScript types, Python `plugins/stream`, Ruby, PHP, .NET and Rust. Other SDKs need to update: Ruby, PHP, .NET and Rust should add `conversation` to their guardrail webhook body where they have one; Swift, Kotlin and Dart read `guardrail` off the `turn` frame once they show one (Swift's client was not regenerated here: its generator needs the chat repo's `tools/openapi`).
Acting for a user (AI-3396): Go deprecated `Backend.ActingFor`: name the user on the call where it takes one (`UserID` of `client.Connections()` options, `XStreamUserId` of a generated call's params such as `CreateScheduledTaskParams`, or an `X-Stream-User-Id` set on one request with an `acceleration.RequestEditorFn`); `client.Agent(...)` calls take no per-call user yet, so `ActingFor` stays how they act for one. `ActingFor` keeps working and sends what it always did. Other SDKs need to update: JavaScript (#2110), Python (#2103), Ruby (#2102) and PHP (#2101) deprecate their own helper in their open PRs, each with an optional per-call user; .NET (#2099) and Rust (#2100) add the per-call user and have no public helper to deprecate. Until those merge, none of them is deprecated.
Acting for another user in .NET connections (AI-3410, AI-3412): a `Connections` call that names a user sends the client's server credential and `X-Stream-User-Id`, and drops the user the client was made for (`Backend.Acting` sets `UserId` to empty, `Backend.cs:254`). Behind the proxy that is a `server: true` token, as Python (`_backend.py:463`), JavaScript (`speakingFor`, `backend.ts:575`), PHP (`Backend.php:198`), Ruby (`backend.rb:301`) and Rust (`client.rs:174`) send; **Go differs**: a `Backend` with `UserID` and `ActingFor` signs `{"user_id": <UserID>}` and adds the header (`stream/backend.go:250-253`, `:273`), a user's token, which Stream's proxy refuses with a 403 when it names another user (`chat/projects/stream-accelerate/proxy.go:430` on master; the 403 is `chat/lib/core/errors/errors.go:223-225`), so a Go client made for a user cannot name another on a connections call; Go should drop `UserID` for the call, as the others do. A client with an API key holding a user's token (a device: `Token` with `UserId`, or `AsUser` of a client with an API key) naming a user on a connections call throws `ConfigurationException` before any request, as JavaScript's `connections.ts:137-146` does; a customer-id client (`ServerSide` true) is unchanged. Other SDKs need to update: Go (the call's user replaces `UserID`), Python, Ruby and Rust (refuse a device's user before sending, AI-3412).
A device naming a user on a connections call (AI-3412): the router answers every connections call from a user token with 403 `server_side_only` (the operations carry no `x-client-accessible`, so `refuseClientSide` stops it before the handler, `acceleration/internal/api/server.go:1262`), so a device with a `userId` is refused before sending. JavaScript (`sdks/js/src/connections.ts:137`) and PHP (`Backend::speakingFor`) already did; Python (`connections.py`, `Connections._client`), Go (`client/connections.go`, `Connections.api`), Ruby (`connections.rb`, `named`) and Rust (`connections.rs`, `acting`) now do. A device is a client with a user token: Python, Ruby and Rust key it on the SDK's own `server_side`, Go on `Authenticate` with a `UserID` and a `Token`, since `SetUser` keeps the secret (a Go client with a `Token` and no `UserID` counts as server side, as `ServerSide()` does). A Go `Backend` with the API secret and a `UserID` and no `Token` that names another user drops its own `UserID` for that call and sends the app's token with `X-Stream-User-Id`, as Python's `acting_for` does; before, it signed a token for its own user, which the proxy refused with 403. A client on a router that trusts the customer id (`as_user`/`SetUser` with `customer_id` and no API key) is not refused in those four: it sends no token and works against a dev router today; JavaScript still refuses it, because its page says `stream-auth-type=jwt` and the router reads it as the end user (`backend.ts:613`). Other SDKs need to update: .NET follows in the AI-3410 PR (`Connections.SendAsync`, `Connections.cs:152`).
`agent.yaml`'s `greeting` may be its text alone, `greeting: Hello, how can I help?`, read as `{text, mode: variation}`; the mapping still says `exact`, and a mapping without `mode` is now `variation` too, so a folder loader always sends `mode`. The API's own default stays `exact`. Go is done (`GreetingSettings.UnmarshalYAML` in `sdks/go/agents/folder.go`). Other SDKs need to update: the folder loaders of JavaScript (`sdks/js/src/folder.ts`, `greeting()`), Python (`plugins/stream` `folder.py`, `_greeting`), .NET, Ruby, Rust and PHP should take the string form and default a missing `mode` to `variation`.
Calls have an id of their own and a `session_id`: a session starts a new call each time voice is started or stopped on it, and an incognito session keeps none, so a session id is no longer a call id. `Call.id` is the call's own id; `Call` gains `session_id` (absent once the session is deleted) and loses `config_id` and `user_id`. `listCalls` (`GET /v1/agents/calls`) takes `session_id` and answers that session's calls newest first. Go is done: `client.Sessions.Timeline` and `Decisions` list the session's calls with `session_id` and `limit=1`, read the newest one's `getCallTimeline` or `getCallEvents`, and fail with `client.ErrNoCall` when the session has none (`sdks/go/client/sessions.go`). Other SDKs need to update: JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP regenerate their clients, and any helper that passes a session id to `/v1/agents/calls/{id}` (its timeline, events, transcript or tokens) lists the session's calls first; Swift, Kotlin and Dart regenerate `Call` where they have it.
STS models list their built-in voices on `Provider.voices` (`ModelVoice`: `id`, `name`, `description`, `gender`, `default`), omitted for non-STS providers, and new voice configs created via `createAgentConfig` or `syncAgent` now default `sts` to `sts-fast` when `sts` is omitted and no cascade settings are provided (explicit `sts: ""` selects the cascade). Go is regenerated (`sdks/go/acceleration/generated.go`). Other SDKs need to update: JavaScript, Python (`plugins/stream`), Swift, Kotlin, Dart, .NET, Ruby, Rust and PHP regenerate their OpenAPI types to pick up `Provider.voices` and `ModelVoice`.