Repository navigation
v0.28.0
Breaking: yoagent no longer bundles prices. prices::enable_bundled(), PriceTable::builtin() and PriceSource::YoagentMain are removed; costs come from a live table (prices::enable_live) or one you install. Model limits stay bundled and are unchanged. Behaviour changes to know: a cancelled or failed turn keeps the text it had streamed, and that message is sent back on the next request; ModelConfig::anthropic("<a preset's id>", ..) builds the preset's limits instead of 200K / 16,000; Gemini 3.6 and later (Gemini 4 included) are sent no temperature. Also in this release: a fix for an Anthropic 400 that broke a session after a thinking-only message, presets for Claude Fable 5.2 and Gemini 4 Carbon, Neon and Hydrogen, and an opt-in ReadLog::require_read. Ships with yoagent-rutis 0.14.0 and yoagent-workers 0.5.0.
- Breaking: yoagent no longer bundles prices. The price snapshot compiled into the crate (
src/provider/prices.json) is gone. A compiled-in rate goes stale when a vendor reprices and nothing in the crate can notice, so it could not be trusted. Costs now come only from data you install: a live table, or your own. Nothing else changes in how costs are computed, and the table format (PriceTable, schema 1) is the same. Limits are unaffected: the context window and most output of the models yoagent knows are still bundled (src/provider/limits.json, limits only) and apply with or without prices. What to change:prices::enable_bundled()→prices::enable_live(&PriceSource::ModelsDev).await(native; fetches models.dev), or your own table withprices::global::install_override(table)or theYOAGENT_PRICESfile (every target, offline; the only route on wasm32 besides fetching one yourself withPriceTable::fetchandglobal::install_fetched).PriceTable::builtin()is removed. For a model's limits,PriceTable::builtin().entry(p, id)→ the newModelLimits::of(p, id)(context_window,max_output; a caller's table first, then the bundled limits, then a fetched table).LivePrices::fell_back()→is_unavailable(), andPriceOrigin::Builtin/is_builtin()→PriceOrigin::Unavailable/is_unavailable(). A failed fetch with no usable cache now installs nothing: the table is empty and costs read as unpriced. There is no fallback table.PriceSource::YoagentMain→PriceSource::ModelsDev, orPriceSource::Urlfor a table you host.global::clear_bundled()andglobal::is_bundled_enabled()are removed: there is nothing to turn off.global::pricing_enabled()still says whether any price is in effect.- The layers are now the user layer (
install_override,YOAGENT_PRICES) over the fetched layer (enable_live*,install_fetched).InstallPolicy::AddOnlyadds only the models the current fetched layer does not list. A first-party lookup that misses while any price is installed warns once per model. - The decision presets (
jev(),clef*(),gpt_6_luna()) and DeepSeek's models are not priced by models.dev (it does not list the first, and the mapping skips DeepSeek's time-of-day rates). They are unpriced unless your table lists them:typesafe/<reported id>,cloudflare/clef,cloudflare/clef-flash,openai-decisions/gpt-6-luna,deepseek/<id>. Seedocs/concepts/pricing.md. - The presets' docs no longer state rates, and the
tests/price_audit.rsaudit of the snapshot is replaced bytests/limits_audit.rs, which checks the bundled limits against models.dev.
ReadLog::require_read: refuse awrite_fileover an existing file the agent never read. With a sharedReadLog,write_filealready refused to overwrite a file read only in part, but allowed one never read at all, which destroys content the model has not seen.ReadLog::new().require_read(true)refuses that too, with an error telling the model to read the file or useedit_file. An existing file is then overwritten only once the log knows it whole: read in full (one read or pages), or last written by this agent. A path that does not exist is always writable;edit_fileis not affected. Off by default, anddefault_tools()leaves it off, so nothing changes unless you turn it on. The setting is shared by every clone of the log;requires_read()reads it. Rewriting a file longer than oneread_filepage then means reading every page first, a file seen only throughbashcounts as never read, and a fileread_filecannot show (not UTF-8 text, a refused image format) or shows with a line cut can no longer be replaced withwrite_file(#461).- Anthropic: a cache breakpoint no longer lands on a thinking block. The history breakpoint, and the bridge after a large tool batch, went on the last block of a message whatever its type. When that block was
thinkingorredacted_thinking(an assistant message holding only its reasoning, such as a refused or interrupted turn), Anthropic answered 400 (thinking.cache_control: Extra inputs are not permitted). The same request is rebuilt on every turn, so every later request of the session failed too. A breakpoint now goes on the message's last block that can carry one (text that is not empty, image, tool use, tool result), and a message with no such block is passed over for the one before it (#455, #458). - A cancelled or failed turn keeps the text it had already streamed. When a run was cancelled mid-stream, or a turn failed for good after streaming part of its answer, the closing assistant message (
StopReason::AbortedorError) was built empty. The text a consumer had already shown from theMessageUpdatedeltas was missing fromMessageEnd,AgentEndandagent.messages(), and the next request no longer held it. The message now carries that text, oneTextblock per text block streamed by the last attempt: the one that failed for good, was cancelled mid-stream, or whose retry was cancelled during the backoff (a terminal that aborts onProviderRetryafter showing text keeps that text). The text of an attempt that was retried is still discarded. Only text is kept: thinking streamed so far has no signature and a tool call cut short cannot run. A turn that streamed no text is unchanged (one emptyTextblock, which providers leave out of a request). A consumer that prints both the deltas and the content of a failedMessageEndwould now print the text twice (#459). - A preset for Claude Fable 5.2.
ModelConfig::claude_fable_5_2(), andModelConfig::preset("anthropic", "claude-fable-5-2"): 1M context, 64,000 of the model's 128,000 output, adaptive thinking, native structured outputs (it rejects forcedtool_choice, like Fable 5.1), no sampling parameters. Its rates differ from Fable 5's in every column, and the crate carries none: a table that listsanthropic/claude-fable-5-2prices it by that id, never by prefix.preset("bedrock", "global.anthropic.claude-fable-5-2")andpreset("openrouter", "anthropic/claude-fable-5.2")resolve it too (#456). - Every Claude model's limits are bundled data. The bundled limits (
src/provider/limits.json) list the named presets' models as well as Opus 4.5 to 4.7, so a model's most output is data:ModelLimits::of("anthropic", id)givesmax_output(128,000 for every current model, 64,000 for Haiku 4.5), read from Anthropic's models overview page. Presets are unchanged. The generic constructor changes for these ids:ModelConfig::anthropic("claude-sonnet-5", ..)used to build the generic 200K context and 16,000max_tokens, and now builds the preset's limits (1M and 64,000; Haiku 4.5: 200K and 32,000). Setmax_tokensyourself if you relied on 16,000 (#460). - Bedrock ids for Opus 4.7, 4.6 and 4.5.
ModelConfig::preset("bedrock", ..)andbedrock_anthropic_idnow readanthropic.claude-opus-4-7,anthropic.claude-opus-4-6-v1andanthropic.claude-opus-4-5-20251101-v1:0(AWS's spellings, with any profile prefix), and build the config from the bundled limits rather than returningNone. Unpriced, like every Bedrock preset (#460). - Gemini 3.6 and later are sent no temperature. Google's API reference says
temperature,topPandtopKare "no longer supported and silently ignored on Gemini 3.6 Flash and newer models", and its Gemini 3.6 notes include Gemini 3.5 Flash-Lite and every later release.ModelConfig::google(id, ..)now turnsaccepts_sampling_paramsoff for those ids (gemini-3.6-…and later, everygemini-4-…,gemini-3.5-flash-lite), and so do the presets (gemini_4_argon,gemini_3_8_flash,gemini_3_6_flash,gemini_3_5_flash_lite) and the OpenRouter and OpenCode routes to them. The agent loop then drops the temperature and says so once per model, where before it was sent and did nothing. Earlier Gemini models are unchanged. Turn it back on withwith_accepts_sampling_params(true)(#457). - Presets for Gemini 4 Carbon, Neon and Hydrogen.
ModelConfig::gemini_4_carbon(),gemini_4_neon()andgemini_4_hydrogen(), andModelConfig::preset("google", id)for each: 1,048,576 context and 65,536 output (the per-request cap when streaming; Google's long decode is not used), thinking always on, no sampling parameters. Their rates were checked against Google's pricing page when the presets were added (2026-12-04), but the crate carries no rates: they are priced when your table or a fetched one lists them. Neon and Hydrogen accept athinkingLevelofxhigh, which this crate does not send:ThinkingLevel::XHighandMaxgo out asHIGH, as on every Gemini model. - Gemini 4 Argon is deprecated by Google. From 2026-12-15 requests to
gemini-4-argonare routed to Gemini 4 Carbon;gemini_4_argon()still works and its doc now says to prefergemini_4_carbon(). Its introductory price ended on 2026-11-30.
Integration crates: yoagent-rutis 0.14.0 and yoagent-workers 0.5.0. Requirement bumps to yoagent 0.28. yoagent-rutis has no code change (rutis 0.20, Rust 1.88, as before). yoagent-workers no longer calls prices::enable_bundled() in its docs, tests and example: a Worker that wants Clef's spend reported installs its own price table (see its README).