Skip to content

Migration ​

What was removed or renamed, and what to use now. Everything that still works but has a better name is marked.

Upgrading to 0.9.6 ​

0.9.6 keeps every steer, waiting prompt and saved conversation. A streamed steer gets its own stream and answer, and a steer or onYield message on the last turn is answered. Prompts that waited before a crash are listed and wait for resume(). A saved session continues when a new agent opens it, keeps its edits and media straight, loads with no size limit, and a hook can compact it. agent.close() releases an agent, and stream() checks and reports like run(). Nothing was removed. Some changes make code see other results. If you stream steers, use onYield with maxTurns, use resume: "explicit", call importSession, rely on the session load limits, or open a new agent on a saved session, read the list below.

Behavior that changed

  • stream(prompt, { enqueue: "steer" }) now returns a stream of its own instead of the active run's stream. It carries the run's events from the moment the steer joins (steer_injected first) and ends with that run's response. If the run ends before the steer joins (a tool called ctx.stop, or the run failed), the stream carries the follow-up run that answers the steer. Before, the stream had already ended with the earlier answer and the steer's own answer was lost. Breaking out of the steer's stream no longer cancels the run: it drops the steer if it is still waiting. To stop the run, call interrupt(). The callbacks given with the steer (onDelta, onEvent, onThinkingDelta) now get only the steer's stream.
  • A steer that arrives during the last turn maxTurns allows now becomes a follow-up run, and its promise resolves with that run's answer. Before, it was added to the history but never answered: the promise resolved with the answer from before the steer, and the next run found an unanswered message in the history. For the same reason, onYield is no longer called after the last allowed turn. Before, its { continue } message was added to the history and never answered.
  • With resume: "explicit", prompts that were waiting when the process stopped (a steer or a queued follow-up) now wait for resume(). interrupted() lists them after the cut-off runs, with waiting: true, an empty runId and startedAt: 0. pendingCount counts them, and clearQueue() drops them. Before, interrupted() did not show them (it returned [] when no run was cut off), and they ran by themselves after the next run(), with nobody waiting for their answers. If you check interrupted().length before calling resume(), it now also counts these prompts. Automatic mode is unchanged.
  • After a crash, a tool call that a run left open is no longer "finished" with the saved result of an earlier run's call that had the same id. Some endpoints give every run's calls the same short ids (call_0). When a run cut off such a call, loading the session took the earlier run's result for it, and resume() gave that old result to the model. A tool that is not replay-safe now gets the "interrupted" result, and a replay-safe one runs again, as for any other cut-off call.
  • A waiting prompt with a picture or other media now comes back after a restart with the path of its file inside the session folder, as messages do. Before, loadSessionDir(dir).session.pending and the restored prompt kept the saved relative path (media/image-h….png). It was read against the current folder of the process, so the prompt failed to run (the file was not there, or fileAccess.roots refused it) or read another file.
  • importSession into another session id now lets go of the old session. Its folder lock is removed once no other agent of the process uses it, so another process may open that conversation. Its folder is removed too when nothing was saved there, so new Agent({ persist }) followed by importSession(...) no longer leaves an empty, locked sessions/<random id>/ folder behind on every start. agent.workers lists the workers of the imported session instead of the old one's, and the old session's open workers are closed. Before, the old folder stayed locked until the process exited, and the old workers stayed.
  • importSession with a session from loadSessionDir now takes the saved results of a cut-off run's finished tool calls and the prompts that were waiting. Like after a restart, the waiting prompts wait for resume(), which no longer repeats a finished tool call. Before, both were ignored: resume() gave finished calls an "interrupted" result or ran them again, and the waiting prompts were lost.
  • After importSession, agent.context.systemPrompt holds the agent's own instructions, as every run sets it. Before, it held the saved systemPrompt until the next run replaced it, so an exportSession() in between saved the old one.
  • New: agent.close() lets go of everything an agent holds (its folder lock, open workers, provider state, telemetry folder and scheduled-action registration), and agent.isClosed tells whether it was called. See Agents. agent.workers.close(id) now closes the worker's agent the same way, so its folder lock is released too. Before, it stayed until the process exited.
  • stream() now makes the two checks run() makes after a tool batch. When the tokens of workers pass limits.maxTotalTokens, the run fails before another model call. Before, stream() paid for one more model turn first, or ended as a success on the last turn. An abort during the last turn's callbacks (an onTurn that aborts) now fails the stream with AbortError. Before, it ended as a success.
  • An aborted run's err.partial now has everything a failed run's has (tool calls, tool results, workers and cost, besides usage, turns and text), on run() and stream(). Before, an abort kept only usage, turns and text. On run(), an abort that the provider reported with your own reason (controller.abort(new Error("user left"))) had zero usage and turns: 0. A stream aborted with a reason now fails with that reason's message, as run() does. Before, it said "Stream aborted".
  • A saved session now writes a change to its history that keeps the number of messages: a message replaced by another object, or the same messages in another order. The SDK makes such a change itself when it repairs the order of tool results before a model call. Before, the journal compared only the number of messages and the last one, so the change reached the disk only at the next snapshot, and a crash before it brought back the old history.
  • A session saved with persist: { dir } now deletes pictures and other media it no longer uses. When the journal is folded into a new snapshot, the media/ files that neither the snapshot nor the waiting prompts name are removed. Before, a picture stayed on disk for good once it was saved, also after a reset(), a rollback or an import. Files that saveSessionDir writes (image-3.png) are left to it, as before.
  • Saved sessions load with no size limit by default. Before, a session over 50,000 messages or 100 MB of session.json threw SessionLoadError. To keep a limit, set persist: { dir, loadLimits: { maxMessages: 50_000, maxBytes: 100 * 1024 * 1024 } } (workers use their parent's), or pass the same limits to loadSessionDir and loadSessionFile. maxMessages now also counts the messages in the journal. Before, only those in session.json counted.
  • New: beforeRequest may return { history } to replace the saved conversation (it is saved at once and kept for later turns and runs), and beforeRequest and onYield get ctx.inputTokens (the last request's input) and ctx.contextWindow. With the saved sessions' new unlimited default, this is how you keep a long conversation within the model's window, for example by compacting at 80%. See Tools.
  • A new Agent opened on a saved session now continues it, also when its last run ended normally: with persist: { dir } and the same sessionId, or the same persist: { file }, its history, run marks, spending and worker traces load when the agent is created, and its next run carries on from there. Before, only a session that a crash cut off was loaded. A finished one started empty, and the agent's first save replaced the saved conversation. To start over, use another sessionId (or file), or call reset(). A cut-off run is still continued by itself, in folder mode, as before.

Upgrading to 0.9.5 ​

0.9.5 makes every provider failure visible. A reply or a stream that failed no longer comes back as an empty answer: it throws, with the provider's own message, and a temporary failure (a timeout, or a rate limit or overload reported inside a reply) is retried. Streams also keep what they used to drop: tool-call arguments sent as an object, parallel calls without an index, thinking summaries, text that only OpenAI's final event still had, and deltas after the first megabyte. Nothing was removed. Four changes make code see an error where it used to get an answer, or another error than before: an OpenAI reply that carries an error, a whole JSON reply to a stream request, a Google stream cut inside a tool call, and a request timeout, which is now a TimeoutError instead of an AbortError. If you use a model behind a proxy, catch errors from Google streams, or catch timeouts, read the list below.

Behavior that changed

  • On OpenAI, a reply that carries an error now fails with a ProviderError that has the provider's message and code, also when it came with HTTP 200 (some proxies do that) and in the last event of a stream. Before, the run ended with an empty answer (text: "", finishReason: "stop"), as if it had worked. Like other OpenAI errors, it is retried when its code is server_error or rate_limit_exceeded. An error that holds nothing (null, "" or {}) next to a real answer is still ignored.
  • A stream request answered with one whole JSON reply instead of a stream is now read as run() reads it, on every provider. An error in it fails the stream with the same ProviderError as run(), and a temporary one is retried before the stream starts. A real answer gives its text, thinking and tool calls (the text arrives as one text_delta). Before, the stream ended with an empty answer. On OpenRouter this also covers run(), which streams.
  • A stream that ends with no answer and no end event now fails as a retryable incomplete_stream whatever its content type. Before, it passed as an empty answer when the body was not labelled as a stream or as text.
  • On Google, a stream that stops before interaction.completed while a tool call is still being written now fails as a retryable incomplete_stream. Before, it returned the cut call as a success (Google checked only for an empty stream, and took the usage sent after each step for the end). A cut stream no longer saves the chain: the next turn sends the full history. A call cut off by the output limit is saved with {} as its arguments, so the SDK's internal marker is never sent back to Google.
  • On OpenAI-compatible services and OpenRouter, a tool call whose arguments come as an object instead of JSON text now runs with those arguments, on run() and stream(). Before, it ran with none ({}), so a tool with only optional fields did nothing useful; with a required field, the model got a validation error.
  • A provider request that outlives its time limit now fails with a retryable TimeoutError (code: "timeout") and is retried by retry. Before, it was an AbortError, as if you had cancelled it: it was never retried, a run treated it as an interruption, and on a stream the first timed-out attempt stopped the whole stream. This shows where the agent's own timer does not fire first: Gemini 4 long answers, OpenRouter's run(), and generators called directly. If you caught AbortError to spot a timeout, catch TimeoutError. On Gemini 4 long answers, a status check that times out no longer cancels the job at Google.
  • An error a provider reports inside a reply or a stream (HTTP 200) is now retryable when its code is a status number or names a temporary failure: Google's gateway_timeout, UNAVAILABLE, RESOURCE_EXHAUSTED or INTERNAL, an OpenAI-compatible overloaded or 429, and so on. finish_reason: "error" on OpenRouter and OpenAI-compatible services is a retryable 502 too (in a whole reply it used to give the answer with finishReason: "error"). Before, all of these failed for good. OpenAI's own codes keep their statuses, and OpenRouter's error_type still wins over the name in code.
  • More thinking text arrives as thinking and thinking_delta: OpenRouter summary blocks (reasoning.summary, how OpenAI models send it), a reasoning field next to an empty or encrypted-only reasoning_details list, and reasoning_content on run() with OpenAI-compatible services (DeepSeek, vLLM, Qwen). Before, all three were dropped. A stream now sends one thinking_delta per chunk rather than one per block.
  • On OpenAI-compatible services and OpenRouter, parallel streamed tool calls whose pieces carry no index now stay separate calls when their ids differ. Before, they were merged into one call with joined arguments, which never ran.
  • On OpenAI streams, the final response.completed now fills what the stream lost: text from an unreadable delta frame (the missing end arrives as one more text_delta), and a function call whose output_item.added never arrived (it runs like the others). Before, that text was missing from the answer and that call was dropped.
  • A long answer keeps streaming after its first million characters. The 1 MB limit per event now measures only the event's new text; before, it also counted the answer so far (partialText, partialThinking), so every later delta was dropped (stream_event_oversize) once an answer passed it. The final result was always complete.
  • A Server-Sent Events frame that has an event: name but no data no longer gives its name to the next frame: every blank line resets the name and the id, as the SSE standard says. Only the Google adapter reads that name, and Google's frames also name themselves in event_type, so no Google reply was read wrongly.

Upgrading to 0.9.4 ​

0.9.4 closes safety gaps. Keys, addresses and headers stay with the provider they were written for. Local files and media URLs obey their guards. A crash, a cut stream, parallel calls of one worker and several sessions on one agent no longer mix up results. Pictures count toward the spending caps. Nothing was removed. If you rely on one key for several providers, steer prompts across sessions, or download media on a network where only a proxy resolves names, read the list below.

Behavior that changed

  • Agent.fromConfig keeps the apiKey, baseUrl and headers of base only when the new model names the same provider as base.model (gemini/ and google/ count as one). This now covers the top-level ones too, not only a key inside a model helper. For another provider, or a model written without a provider, they are dropped and the key comes from that provider's environment variable. Before, the top-level key, address and headers went to the new provider. If an edited agent may switch providers, set each provider's key in its environment variable.
  • A worker gets the parent's apiKey, baseUrl and headers only when both models name the same provider. A model object ({ provider, id }) now counts by its provider: before, { provider: "openrouter", id: "openai/gpt-5.5" } counted as OpenAI and got an OpenAI parent's key. When either model is written without a provider, the worker now gets none of them. A dynamic worker on another provider no longer gets the parent's headers. Give such a worker its provider's key in the environment.
  • A per-call env now reads the same key names, in the same order, as process.env. A custom provider whose prefix starts with google (such as googleproxy/) no longer gets GEMINI_API_KEY or GOOGLE_API_KEY from it; set <PREFIX>_API_KEY. With several Google names in it, GEMINI_API_KEY now wins, as in process.env (it was GOOGLE_API_KEY), and GOOGLE_GENAI_API_KEY is read too. With both OpenAI names in it, OPENAI_BASE_API_KEY now wins, as in process.env.
  • A custom service's <PREFIX>_BASE_API_KEY is now read from process.env too, after <PREFIX>_API_KEY, as the reference said. Before, only a per-call env was read for it.
  • With fileAccess.roots set, a local path in media a tool returns with toolContent must be inside the roots too. Before, the executor read it from anywhere on disk, so a tool that took a path from the model could show the model any file. A path outside the roots now makes that call an error result (the model sees a SecurityPolicyError message) and the run goes on. Read such a file yourself and return its bytes, or add its folder to the roots.
  • A media URL that the SDK downloads itself is refused (RemoteFetchError, a SecurityPolicyError) when the address of its host cannot be looked up. Before, the check let it through and fetch resolved the name unchecked. This matters on a network where only a proxy resolves names: read such a file yourself and pass the bytes, a data URL or base64. An IPv6 address of the form ::ffff:0:a.b.c.d (IPv4-translated) now counts by the IPv4 address in it, like the other forms.
  • A media URL that the SDK downloads itself now goes through the fetch of the agent or the call (it used the global fetch) and stops when the run is aborted or interrupted (it kept downloading, up to 512 MB). normalizeMediaInput takes the same as an optional third argument, { signal, fetch }.
  • With resume: "explicit", a new run() after a crash (instead of resume()) gives the model the saved result of every tool call that finished before the crash. Before, every open call was answered "interrupted", so the model could repeat work that was already done.
  • A streamed tool call whose arguments were cut off (for example at maxOutputTokens) after the provider opened it with {} (Google, and OpenAI when it sends {}) is now a cut-off call that never runs. Before, it ran with empty arguments, so a tool whose fields are all optional ran with nothing.
  • Each call of a fixed sub-agent now gets its own session id (<parent>-sub-<name>-<random>), so two calls in one model turn no longer share one. On Google the copies used to continue each other's conversation, and the first to finish cleared the other's. If you matched the old id <parent>-sub-<name> in your telemetry, match the prefix.
  • A busy agent no longer steers a prompt for another session into the running conversation. run() and stream() with a different sessionId now wait for their own run (also with midSession.whenBusy: "steer" or enqueue: "steer"), and steer() for another session throws a ValidationError. Before, user B's text went into user A's conversation and B got A's answer.
  • The spending of an imageTool now belongs to the agent that runs it. It counts toward usageLimit and budget: once a cap is reached, the next picture is refused and the run ends with BudgetExceededError. Before, pictures were listed in usageReport() but no cap saw them. It is also saved with the session (in fixedUsage, as a node with role: "image") and comes back after a restart. One tool object given to two agents no longer adds their pictures together. maxImages still counts per tool object in one process.
  • After a restart, the starting point of usageLimit now includes what the copies of fixed workers spent. Before, it counted only the agent and its agent.workers workers.
  • Agent.fromConfig also finds a tool by the name the model sees (the tool's name), not only by its key in base.tools.

Upgrading to 0.9.3 ​

0.9.3 changes no API and no behavior. No change is needed.

  • The package no longer ships the folder examples/prompts/ (three example prompt files that only the examples read). Copy them from 0.9.2 if you used them.
  • A 401 from Google now names the base_urls.google setting. It used to name GOOGLE_BASE_URL, an environment variable removed in 0.7.0.
  • The reference now lists only the stream events the SDK sends. text_start, text_end, thinking_start, thinking_end, tool_call_start, tool_call_delta and the schemaVersion field stay in the types as reserved names. They were never sent.

Upgrading to 0.9.2 ​

0.9.2 adds one thing and changes nothing that worked. No change is needed.

New

  • A fixed sub-agent can be written as data in subagents: [...]: { name, description, instructions, model?, tools? } (the type is SubAgentSpec). The SDK builds the Agent. Without model it runs on the worker model (dynamicSubagents.model, else sub_agent_model from setModels or setSubAgentModel), as the removed SubAgent class did. A plain new Agent(...) without model still uses the main model. See Sub-agents.

Upgrading to 0.9.1 ​

0.9.1 closes a gap in how the SDK downloads media links. If you pass public links, bytes, data URLs, base64 or local paths, you need no change.

Behavior that changed

  • A media URL that the SDK downloads itself must now point to a public host. localhost, 127.x, 10.x, 172.16.x to 172.31.x, 192.168.x, 169.254.x (cloud metadata), 100.64.x to 100.127.x, .local and .internal names, a name that DNS resolves to one of them and a redirect to one all throw SecurityPolicyError (a RemoteFetchError). Before, they were downloaded. To use such a file, read it yourself and pass a Uint8Array, a data URL or base64. A link that a provider fetches itself (for example an image URL sent to OpenAI) was never downloaded by the SDK and is unchanged.
  • The check now sees an IPv4 address inside an IPv6 one ([::ffff:127.0.0.1], [::127.0.0.1], NAT64) and treats an IPv6 address it cannot read as private.
  • A browser runtime is not checked, because its requests start on the user's own machine.

Upgrading to 0.9.0 ​

0.9.0 removes the old worker class, makes the public API smaller and makes a few failures louder. If you use nothing listed here, you need no change.

Removed

  • The SubAgent class, SubAgentConfig, agentFromEnv(), Agent.fromEnv(), .asTool() and .toTool(). A fixed worker is a plain Agent. See the first table below.
  • 92 names that were exported but are internal: session plumbing, provider classes and tables, schema and signature helpers, wire-level provider types and inner types. See Names that are no longer exported.
  • The callback globalThis.__agentAccelAnomaly. Warnings go to telemetryBus.

Behavior that changed

  • saveSessionDir and saveSessionFile throw when they cannot write. An agent with persist still reports a failed save to persist.onPersistError, which now also works with persist: { file }.
  • A tool named __proto__ is refused. The name a model asks for is looked up among your own tools only, so a call to constructor is an unknown tool.
  • A provider that answers HTTP 200 with something that is not a reply (an empty object, a list, no choices) now fails as a retryable 502 ProviderError, not as an empty answer.
  • A provider reply over its size cap is refused with a ProviderError that is not retried: 64 MB for chat, 256 MB for pictures, vectors and decisions, 1 MB for an error body and 512 MB for a downloaded video.
  • agent.usageReport() lists the workers that a fixed worker started, so its total matches the response. The session saves the spending of fixed workers as fixedUsage, so it survives a restart.
  • The User-Agent header names the SDK's own version, not the version of the app that runs it.

Options and APIs ​

WasNowSince
stop, seed agent optionsRemoved. Do not pass them.0.6.0
temperature, topP, samplingRemoved on every provider.earlier
allowedModelssetModels(list). See Allowed models.0.7.0
configure() and the settings env varssetConfigs({ values }). See Settings.0.7.0
Tool retry, tags, outputRemoved. They were stored and never used.0.7.0
needsApprovalAsk inside execute and refuse with ctx.stop(reason), or use the beforeTool hook.earlier
dynamicSubagents.timeout, modelMaySetTimeoutdynamicSubagents.workerTimeoutMs and the action's own timeoutMs.0.5.5
Event scheduled_action.killedscheduled_action.deleted0.5.5
The SubAgent class, SubAgentConfig, agentFromEnv(), Agent.fromEnv(), .asTool() and .toTool()Removed. A fixed worker is a plain new Agent({ name, model, instructions }) in subagents: [...], or agentToTool({ name, agent }). For agentFromEnv() and Agent.fromEnv(), leave out model: an Agent without one uses the saved choice, then the list default (see Allowed models). fromEnv also fell back to the saved worker model when nothing else was set, so name the model in that case. Name the model of every worker: the old class used the saved worker model when you named none, but a plain Agent looks for the saved main model first. From 0.9.2 an entry written as data, { name, description, instructions }, uses the saved worker model when it names none. See Sub-agents.0.9.0
hooks (a placeholder that only warned)A working option: beforeTool, afterTool, beforeRequest, onYield. An unknown hook name throws a ConfigError.0.8.9

Names that still work ​

These older names are still accepted. When both are set, the winner is the one in the last column.

Older nameNewer nameWins
thinkingLevelthinkingthinking
subagentModeldynamicSubagents.modeldynamicSubagents.model
midSession.modemidSession.whenBusywhenBusy

Two tool options have two names for the same thing: maxTries and maxAttempts (maxTries wins), and redactError and redact (redactError wins).

Names that are no longer exported ​

These were internal helpers that happened to be exported. They are still in the source, but they are not part of the public API.

NameUse insteadSince
buildSessionData, serializeSession, deserializeSession, inspectSessionPayload, SessionAgentLike, SessionPayloadStatusagent.exportSession() and agent.importSession(), or saveSessionFile and loadSessionFile.0.9.0
extractMediaToDir, resolveMediaPathssaveSessionDir and loadSessionDir move the media for you.0.9.0
computeSessionTurnCostagent.usageReport(), or res.usage.cost for one run.0.9.0
writeFileAtomicNothing. It was the SDK's own crash-safe writer: write a temp file, then rename it.0.9.0
The provider classes GoogleInteractionsProvider, OpenAIResponsesProvider, AnthropicMessagesProvider, OpenRouterChatCompletionsProvider, OpenAICompatibleChatProvider, the tables GOOGLE_MODELS, OPENAI_MODELS, ANTHROPIC_MODELS, OPENROUTER_MODELS, and createOpenAICompatibleProvider, createCustomProvider, CustomProvider, CustomProviderOptionsUse an Agent. getProvider(id) and ensureCustomProvider(prefix, { baseUrl }) still give you a provider.0.9.0
zodToJsonSchema, cleanJsonSchema, toStandardToolDeclarations, StandardToolDeclaration, stripSchemaForGoogle, assertValidToolName, TOOL_NAME_PATTERNtool({ input }) converts and checks the schema and the name for you.0.9.0
isValidThoughtSignature, retainThoughtSignature, extractGoogleThoughtSignature, clearInteractionChainsNothing. The SDK keeps thought signatures and Google chains itself.0.9.0
clampCacheKey, resolveEffectiveThinking, CACHE_OPTIONSNothing. Set cache and thinking on the agent or on a run.0.9.0
toConciseProviderError, assertModalitiesSupportedNothing. Errors already reach you as one-line typed errors, and unsupported input fails before the network.0.9.0
getAttributionKeep the values you gave to setAttribution.0.9.0
buildSessionHeadersNothing. Agents send their session headers themselves.0.9.0
createTrackingId, createChildSessionId, createFixedChildSessionId, isSessionDescendantThe trackingId, sessionId and parentSessionId in a worker's result metadata.0.9.0
getCacheDir, getCacheFilePath, getCatalogTTL, isValidCatalogPayload, DEFAULT_CATALOG_TTL_MS, CATALOG_PROVIDERSgetCatalogStatus() (cache path, age and TTL) and the catalog_cache_dir setting.0.9.0
formatSessionBanner, formatSessionTokens, formatSessionCost, getSessionContextWindowCopy the small helpers from examples/_shared.ts. SessionTelemetry.formatBar() stays.0.9.0
ProviderRequestOptions, ProviderGenerateResult, ProviderStepsNothing. They are what an adapter receives and returns, and you cannot plug in your own. Set options on the agent or the run, and read an AgentResponse.0.9.0
PersistedSubAgentTrace, SessionRunMark, SessionRunEnd, SessionPending, SessionPendingPrompt, SessionToolRecordRead them off PersistedAgentSession, for example NonNullable<PersistedAgentSession["runs"]>[number].0.9.0
NoulQuestion, ChoiceQuestion, ScoreQuestion, NoulAnswer, ChoiceAnswer, ScoreAnswer, RefusalAnswer, ResolvedDecisionQuestionDecisionQuestion and DecisionAnswer, narrowed on type: Extract<DecisionAnswer, { type: "choice" }>.0.9.0
ImageTokenPrices, ImageSizeRules, VideoTokenPrices, VideoClipReferences, VideoFrameRole, EmbeddingPrices, EmbeddingInputKind, EmbeddingTaskStyle, DecisionPrices, DecisionInputKindRead them off the model-info type that holds them, for example ImageModelInfo["prices"] or DecisionModelInfo["prices"].0.9.0
ProviderImageRequest, ProviderImageResult, ProviderEmbeddingRequest, ProviderEmbeddingResult, ProviderDecisionRequest, ProviderDecisionAnswer, ProviderDecisionResult, ProviderVideoRequest, ProviderVideoResult, ProviderVideoResumeRequestImageOptions, EmbeddingOptions, DecisionOptions and VideoOptions for what you pass in, and ImageResult, EmbeddingResult, DecisionResult and VideoResult for what comes back.0.9.0

Providers and models ​

  • The OpenRouter Responses transport is gone. OpenRouter uses Chat Completions.
  • Gemini 1.x and 2.x are rejected. The minimum is Gemini 3.

Environment variables ​

The environment holds API keys and nothing else. The older variables are no longer read:

WasNow
MODEL, MODEL_NAME, SUB_AGENT_MODELsetModels({ default: { model, sub_agent_model }, providers }). The user's choice: setModel(id) and setSubAgentModel(id).
GOOGLE_BASE_URL, OPENAI_BASE_URL, OPENAI_API_BASE, OPENROUTER_BASE_URL, <PREFIX>_BASE_URLThe base_urls setting: { google, openai, anthropic, openrouter, <prefix> }.
OPENROUTER_ORDER, _ONLY, _IGNORE, _ALLOW_FALLBACKS, _REQUIRE_PARAMETERS, _ZDR, _DATA_COLLECTION, _SORT, _PARALLEL_TOOL_CALLS, _REASONING_EXCLUDE, _USERThe openrouter setting: { order, only, ignore, allow_fallbacks, require_parameters, zdr, data_collection, sort, parallel_tool_calls, reasoning_exclude, user }.
COMPAT_NO_STREAM_OPTIONS, COMPAT_NO_SESSION_HEADERSThe compat setting: { no_stream_options, no_session_headers }.
AGENT_ACCEL_USAGE_LIMIT_USD and _TOKENS, AGENT_ACCEL_SCHEDULED_BUDGET_USD and _TOKENSThe usage_limit and scheduled_action_budget settings: { max_cost_usd, max_total_tokens }.
configure({ concurrency })The concurrency setting: { max_requests, per_provider }.
AGENT_CATALOG_REFRESH=off, AGENT_CACHE_DIR, MODELS_DEV_SHA256The settings catalog_refresh: "off", catalog_cache_dir and models_dev_sha256.
AGENT_ACCEL_HOMEsetHome(dir), or an Agent's home. Code only.

Scheduled action files ​

The on-disk format has its own changelog: Scheduled action files.

Released under the MIT License.