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_injectedfirst) and ends with that run's response. If the run ends before the steer joins (a tool calledctx.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, callinterrupt(). The callbacks given with the steer (onDelta,onEvent,onThinkingDelta) now get only the steer's stream.- A steer that arrives during the last turn
maxTurnsallows 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,onYieldis 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 forresume().interrupted()lists them after the cut-off runs, withwaiting: true, an emptyrunIdandstartedAt: 0.pendingCountcounts them, andclearQueue()drops them. Before,interrupted()did not show them (it returned[]when no run was cut off), and they ran by themselves after the nextrun(), with nobody waiting for their answers. If you checkinterrupted().lengthbefore callingresume(), 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, andresume()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.pendingand 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, orfileAccess.rootsrefused it) or read another file. importSessioninto 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, sonew Agent({ persist })followed byimportSession(...)no longer leaves an empty, lockedsessions/<random id>/folder behind on every start.agent.workerslists 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.importSessionwith a session fromloadSessionDirnow 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 forresume(), 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.systemPromptholds the agent's own instructions, as every run sets it. Before, it held the savedsystemPromptuntil the next run replaced it, so anexportSession()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), andagent.isClosedtells 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 checksrun()makes after a tool batch. When the tokens of workers passlimits.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 (anonTurnthat aborts) now fails the stream withAbortError. Before, it ended as a success.- An aborted run's
err.partialnow has everything a failed run's has (tool calls, tool results, workers and cost, besides usage, turns and text), onrun()andstream(). Before, an abort kept only usage, turns and text. Onrun(), an abort that the provider reported with your own reason (controller.abort(new Error("user left"))) had zero usage andturns: 0. A stream aborted with a reason now fails with that reason's message, asrun()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, themedia/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 areset(), a rollback or an import. Files thatsaveSessionDirwrites (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.jsonthrewSessionLoadError. To keep a limit, setpersist: { dir, loadLimits: { maxMessages: 50_000, maxBytes: 100 * 1024 * 1024 } }(workers use their parent's), or pass the same limits toloadSessionDirandloadSessionFile.maxMessagesnow also counts the messages in the journal. Before, only those insession.jsoncounted. - New:
beforeRequestmay return{ history }to replace the saved conversation (it is saved at once and kept for later turns and runs), andbeforeRequestandonYieldgetctx.inputTokens(the last request's input) andctx.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
Agentopened on a saved session now continues it, also when its last run ended normally: withpersist: { dir }and the samesessionId, or the samepersist: { 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 anothersessionId(or file), or callreset(). 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
errornow fails with aProviderErrorthat 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 isserver_errororrate_limit_exceeded. Anerrorthat 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 sameProviderErrorasrun(), and a temporary one is retried before the stream starts. A real answer gives its text, thinking and tool calls (the text arrives as onetext_delta). Before, the stream ended with an empty answer. On OpenRouter this also coversrun(), which streams. - A stream that ends with no answer and no end event now fails as a retryable
incomplete_streamwhatever 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.completedwhile a tool call is still being written now fails as a retryableincomplete_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()andstream(). 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 byretry. Before, it was anAbortError, 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'srun(), and generators called directly. If you caughtAbortErrorto spot a timeout, catchTimeoutError. 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_EXHAUSTEDorINTERNAL, an OpenAI-compatibleoverloadedor429, 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 withfinishReason: "error"). Before, all of these failed for good. OpenAI's own codes keep their statuses, and OpenRouter'serror_typestill wins over the name incode. - More thinking text arrives as
thinkingandthinking_delta: OpenRouter summary blocks (reasoning.summary, how OpenAI models send it), areasoningfield next to an empty or encrypted-onlyreasoning_detailslist, andreasoning_contentonrun()with OpenAI-compatible services (DeepSeek, vLLM, Qwen). Before, all three were dropped. A stream now sends onethinking_deltaper chunk rather than one per block. - On OpenAI-compatible services and OpenRouter, parallel streamed tool calls whose pieces carry no
indexnow 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.completednow fills what the stream lost: text from an unreadable delta frame (the missing end arrives as one moretext_delta), and a function call whoseoutput_item.addednever 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 inevent_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.fromConfigkeeps theapiKey,baseUrlandheadersofbaseonly when the new model names the same provider asbase.model(gemini/andgoogle/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,baseUrlandheadersonly when both models name the same provider. A model object ({ provider, id }) now counts by itsprovider: 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'sheaders. Give such a worker its provider's key in the environment. - A per-call
envnow reads the same key names, in the same order, asprocess.env. A custom provider whose prefix starts withgoogle(such asgoogleproxy/) no longer getsGEMINI_API_KEYorGOOGLE_API_KEYfrom it; set<PREFIX>_API_KEY. With several Google names in it,GEMINI_API_KEYnow wins, as inprocess.env(it wasGOOGLE_API_KEY), andGOOGLE_GENAI_API_KEYis read too. With both OpenAI names in it,OPENAI_BASE_API_KEYnow wins, as inprocess.env. - A custom service's
<PREFIX>_BASE_API_KEYis now read fromprocess.envtoo, after<PREFIX>_API_KEY, as the reference said. Before, only a per-callenvwas read for it. - With
fileAccess.rootsset, a local path in media a tool returns withtoolContentmust 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 aSecurityPolicyErrormessage) 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, aSecurityPolicyError) when the address of its host cannot be looked up. Before, the check let it through andfetchresolved 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
fetchof the agent or the call (it used the globalfetch) and stops when the run is aborted or interrupted (it kept downloading, up to 512 MB).normalizeMediaInputtakes the same as an optional third argument,{ signal, fetch }. - With
resume: "explicit", a newrun()after a crash (instead ofresume()) 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()andstream()with a differentsessionIdnow wait for their own run (also withmidSession.whenBusy: "steer"orenqueue: "steer"), andsteer()for another session throws aValidationError. Before, user B's text went into user A's conversation and B got A's answer. - The spending of an
imageToolnow belongs to the agent that runs it. It counts towardusageLimitandbudget: once a cap is reached, the next picture is refused and the run ends withBudgetExceededError. Before, pictures were listed inusageReport()but no cap saw them. It is also saved with the session (infixedUsage, as a node withrole: "image") and comes back after a restart. One tool object given to two agents no longer adds their pictures together.maxImagesstill counts per tool object in one process. - After a restart, the starting point of
usageLimitnow includes what the copies of fixed workers spent. Before, it counted only the agent and itsagent.workersworkers. Agent.fromConfigalso finds a tool by the name the model sees (the tool'sname), not only by its key inbase.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.googlesetting. It used to nameGOOGLE_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_deltaand theschemaVersionfield 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 isSubAgentSpec). The SDK builds theAgent. Withoutmodelit runs on the worker model (dynamicSubagents.model, elsesub_agent_modelfromsetModelsorsetSubAgentModel), as the removedSubAgentclass did. A plainnew Agent(...)withoutmodelstill 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.xto172.31.x,192.168.x,169.254.x(cloud metadata),100.64.xto100.127.x,.localand.internalnames, a name that DNS resolves to one of them and a redirect to one all throwSecurityPolicyError(aRemoteFetchError). Before, they were downloaded. To use such a file, read it yourself and pass aUint8Array, 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
SubAgentclass,SubAgentConfig,agentFromEnv(),Agent.fromEnv(),.asTool()and.toTool(). A fixed worker is a plainAgent. 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 totelemetryBus.
Behavior that changed
saveSessionDirandsaveSessionFilethrow when they cannot write. An agent withpersiststill reports a failed save topersist.onPersistError, which now also works withpersist: { file }.- A tool named
__proto__is refused. The name a model asks for is looked up among your own tools only, so a call toconstructoris 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 502ProviderError, not as an empty answer. - A provider reply over its size cap is refused with a
ProviderErrorthat 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 asfixedUsage, so it survives a restart.- The
User-Agentheader names the SDK's own version, not the version of the app that runs it.
Options and APIs
| Was | Now | Since |
|---|---|---|
stop, seed agent options | Removed. Do not pass them. | 0.6.0 |
temperature, topP, sampling | Removed on every provider. | earlier |
allowedModels | setModels(list). See Allowed models. | 0.7.0 |
configure() and the settings env vars | setConfigs({ values }). See Settings. | 0.7.0 |
Tool retry, tags, output | Removed. They were stored and never used. | 0.7.0 |
needsApproval | Ask inside execute and refuse with ctx.stop(reason), or use the beforeTool hook. | earlier |
dynamicSubagents.timeout, modelMaySetTimeout | dynamicSubagents.workerTimeoutMs and the action's own timeoutMs. | 0.5.5 |
Event scheduled_action.killed | scheduled_action.deleted | 0.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 name | Newer name | Wins |
|---|---|---|
thinkingLevel | thinking | thinking |
subagentModel | dynamicSubagents.model | dynamicSubagents.model |
midSession.mode | midSession.whenBusy | whenBusy |
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.
| Name | Use instead | Since |
|---|---|---|
buildSessionData, serializeSession, deserializeSession, inspectSessionPayload, SessionAgentLike, SessionPayloadStatus | agent.exportSession() and agent.importSession(), or saveSessionFile and loadSessionFile. | 0.9.0 |
extractMediaToDir, resolveMediaPaths | saveSessionDir and loadSessionDir move the media for you. | 0.9.0 |
computeSessionTurnCost | agent.usageReport(), or res.usage.cost for one run. | 0.9.0 |
writeFileAtomic | Nothing. 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, CustomProviderOptions | Use an Agent. getProvider(id) and ensureCustomProvider(prefix, { baseUrl }) still give you a provider. | 0.9.0 |
zodToJsonSchema, cleanJsonSchema, toStandardToolDeclarations, StandardToolDeclaration, stripSchemaForGoogle, assertValidToolName, TOOL_NAME_PATTERN | tool({ input }) converts and checks the schema and the name for you. | 0.9.0 |
isValidThoughtSignature, retainThoughtSignature, extractGoogleThoughtSignature, clearInteractionChains | Nothing. The SDK keeps thought signatures and Google chains itself. | 0.9.0 |
clampCacheKey, resolveEffectiveThinking, CACHE_OPTIONS | Nothing. Set cache and thinking on the agent or on a run. | 0.9.0 |
toConciseProviderError, assertModalitiesSupported | Nothing. Errors already reach you as one-line typed errors, and unsupported input fails before the network. | 0.9.0 |
getAttribution | Keep the values you gave to setAttribution. | 0.9.0 |
buildSessionHeaders | Nothing. Agents send their session headers themselves. | 0.9.0 |
createTrackingId, createChildSessionId, createFixedChildSessionId, isSessionDescendant | The trackingId, sessionId and parentSessionId in a worker's result metadata. | 0.9.0 |
getCacheDir, getCacheFilePath, getCatalogTTL, isValidCatalogPayload, DEFAULT_CATALOG_TTL_MS, CATALOG_PROVIDERS | getCatalogStatus() (cache path, age and TTL) and the catalog_cache_dir setting. | 0.9.0 |
formatSessionBanner, formatSessionTokens, formatSessionCost, getSessionContextWindow | Copy the small helpers from examples/_shared.ts. SessionTelemetry.formatBar() stays. | 0.9.0 |
ProviderRequestOptions, ProviderGenerateResult, ProviderSteps | Nothing. 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, SessionToolRecord | Read them off PersistedAgentSession, for example NonNullable<PersistedAgentSession["runs"]>[number]. | 0.9.0 |
NoulQuestion, ChoiceQuestion, ScoreQuestion, NoulAnswer, ChoiceAnswer, ScoreAnswer, RefusalAnswer, ResolvedDecisionQuestion | DecisionQuestion and DecisionAnswer, narrowed on type: Extract<DecisionAnswer, { type: "choice" }>. | 0.9.0 |
ImageTokenPrices, ImageSizeRules, VideoTokenPrices, VideoClipReferences, VideoFrameRole, EmbeddingPrices, EmbeddingInputKind, EmbeddingTaskStyle, DecisionPrices, DecisionInputKind | Read 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, ProviderVideoResumeRequest | ImageOptions, 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:
| Was | Now |
|---|---|
MODEL, MODEL_NAME, SUB_AGENT_MODEL | setModels({ 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_URL | The 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, _USER | The 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_HEADERS | The compat setting: { no_stream_options, no_session_headers }. |
AGENT_ACCEL_USAGE_LIMIT_USD and _TOKENS, AGENT_ACCEL_SCHEDULED_BUDGET_USD and _TOKENS | The 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_SHA256 | The settings catalog_refresh: "off", catalog_cache_dir and models_dev_sha256. |
AGENT_ACCEL_HOME | setHome(dir), or an Agent's home. Code only. |
Scheduled action files
The on-disk format has its own changelog: Scheduled action files.