Appearance
0063. A reasoning effort is one setting, per model, configurable end to end ​
Status: Accepted (2026-11-21)
Context ​
The models behind the gateway differ: some reason only when a level is sent, others reason by default, and the level names how much. Adam sends none today: MODEL_EXTRA_BODY is the only way to set one. The owner asked for one setting, reasoning effort, configurable in adam and all its clients — and ruled, on 2026-11-21, that:
- there is no global default (not in the chart, the env or the code); unset means nothing is sent, while a profile or a preset may set a per-model value;
- the setting is per model, because each model behind the gateway differs: a deployment's model configuration declares, for each model it can call, whether it takes a reasoning setting, which levels it accepts, and how they are sent;
- the vocabulary is the gateway's observed levels, closed, but the mapping and the allowed levels belong to the model's profile;
reasoning/v1advertises the levels of the agent's current model, and a request outside them is refused, fail closed;- the precedence stays request → thread → agent folder → the agent's preset → the profile, each level choosing among the model's levels;
- every surface (coder, folder agent, engine, orchestrator/web, platform) gets the feature through its own mechanism — the parity rule.
The bench's earlier probe (2026-11-20, bench/variants-reasoning at 3281d519) found medium, high and max spending more than 32k reasoning tokens at a 32k output budget with no answer; #273 (2026-11-21) now continues a turn that the output limit cuts while the model is only thinking, so the run no longer ends as a question — the budget still bounds one turn, and the effort still trades latency and tokens for reasoning.
The gateway was probed on 2026-11-21: 25 models, wire reasoning_effort, with no setting and every level, then a multi-step problem with three samples per level (about 200k tokens). Verified 2026-11-21 on the deployment's gateway; the table below is by family, names no gateway host, and the full per-model table is recorded outside this repository.
- Every model accepts every level with a 200, except Gemini, which returns 400 for
maxandxhigh. noneandminimalare real levels: some models reason unlessnoneis sent (DeepSeek,adorsys-frontend,adorsys-researcher), while the others reason by default andnoneturns that off.- There is no graded effect between
low,medium,highandmax: the real switch is off versus on. Gemini is the exception (lowanswers wrong;mediumandhighanswer right). - GLM (5.3, 5.3-flash, 4.7-flash) is stochastic and partly inverted; no level controls it, so its
reasoningEffortsis empty. thinkingis ignored where accepted and rejected by Gemini; thereasoningobject is a 400 on Gemini. Onlyreasoning_effortis verified on this gateway; the other wires are for other gateways and are unverified here.- The owner's bench finding holds: DeepSeek v4.1-1017 at
lowanswers 3/3 correctly in about a second, andmaxadds nothing.
Decision ​
The vocabulary is closed.
ReasoningEffortinadam-model:None,Minimal,Low,Medium,High,XHigh,Max, spellednone,minimal,low,medium,high,xhigh,max— the gateway's observed levels. Built likeAccessTier: anALLarray, an exhaustiveas_strandFromStr, and serderename_allon top, so a new variant fails to compile everywhere until it is handled.noneis a real level: some models reason unless it is sent. Absence sends nothing and is the model's default, which may reason; a model that takes no setting hasreasoningEfforts: [].The model profile is the only seat. Each model's profile in
MODEL_ALIASES_FILE(theprofiles:map; ADR 0054 slice 11; the output cap,extraBodyand thepresets:bundle are the companion ADR 0064's, not in this PR) declares its reasoning fields:reasoningEfforts: the levels it accepts, a subset of the closed vocabulary, lowest first; absent or empty means the model takes no reasoning setting.reasoningWire: one of a closed set, and it is how a level is sent:reasoning_effort→{"reasoning_effort": "<level>"}— the only wire verified on this gateway (every family accepts it; Gemini rejectsmaxandxhigh);reasoning_object→{"reasoning": {"effort": "<level>"}}— for another gateway, unverified here (a 400 on Gemini);thinking_budget→{"thinking": {"type": "enabled", "budget_tokens": <n>}}, withreasoningBudgetsmapping every declared level to its token budget — for another gateway, unverified here (thinkingis ignored or rejected by this one).
reasoningEffort(optional): the model's own value, one of itsreasoningEfforts.- A preset in
presets:may carryreasoningEffort; a profile may name one (preset:). - A level outside the vocabulary, an unknown
reasoningWire, a duplicate level, areasoningBudgetsentry for an undeclared level, a declared level with no budget, a budget that is not a positive integer, areasoningEffortoutside the model'sreasoningEfforts, a preset'sreasoningEffortoutside them,reasoningBudgetswithoutthinking_budget,reasoningEffortswithout areasoningWire, or areasoningWirewith noreasoningEffortsis a startup error (exit 78), naming the alias and the file.reasoningEfforts: []is how a model says it takes none. - There is no
MODEL_REASONING_EFFORTand no code default. The chart gains one value,config.modelProfiles, that mounts the file (a ConfigMap); it is unset by default, so the goldens are unchanged. The file is the deployment's.
No global default. If the request, the thread, the session, the folder, the preset and the profile's
reasoningEffortall set nothing, no reasoning member is sent — today's behaviour. A profile's or a preset'sreasoningEffortis an explicit per-model choice, not a global default; the card'sdefaultis the resolved value (the folder's, else the preset's, else the profile's), and is absent when none of them sets one.The levels, narrowest wins: request → thread → agent folder → the agent's preset → the profile. A child's
subagent_startvalue is a request-level choice (ADR 0054's table says "per request"), so it sits with the request and wins over the inherited thread.- request: the
reasoning/v1extension on one A2A message (decision 5), and a child'ssubagent_startconfig (ADR 0054's table row) — both explicit choices by the person or the parent, winning over the inherited thread (the extension for the message it activates, the session for that child's calls). - thread: the run's current effort, held in the protected context key
vymalo.reasoningEffort; the newest activated message sets it. It carries into a continuing task of the same thread and into a child run (and the child's own children). A new thread starts at the resolved default. - agent folder:
reasoning_effortat the top level of the frontmatter (the engine builder's value is the same level for an embedded agent with no folder). - the agent's preset: the folder's
model_preset:(ADR 0064) and the profile's base preset. - the profile: its own
reasoningEffort(then its base preset's), the model's own value. Every choice picks among the current model'sreasoningEfforts. A request outside them isInvalidParams(-32602) before anything is written; a folder, session, preset or profile value outside them is a load/start error naming the file and line (exit 78 for a binary). A folder that sets an effort on a model whose profile takes none is that same error.
- request: the
The A2A extension is
https://agents.vymalo.com/a2a/extensions/reasoning/v1.- The card lists it only when the root agent's model takes at least one level;
paramsis{efforts: [the model's levels, lowest first], default?: <the resolved default>}.defaultis the folder's, else the preset's, else the profile's value; it is absent when none of them sets one. - It is activated per message exactly like
access-tier/v1(theA2A-Extensionsheader and/ormessage.extensions); an activated message must carrymetadata[URI] = {"effort": "<one of the model's levels>"}. A missing entry, a non-object, a missing or non-stringeffort, an unknown word, or a level the model does not take isInvalidParams(-32602) before anything is written. Other members of the entry are ignored. - The accepted sets are a
ReasoningEffortsinadam-a2a, mapping each alias to its model's levels, carried to the backend asAccessTiersis (with_reasoning_efforts); it builds the card'seffortsfor the root's model and refuses a request against the model of the run it reaches — the root's for the root context, the child's for a child context.Boundcarries the resolved default (the folder's, else the preset's, else the profile's), or none. - The value is merged into the run's protected context as
vymalo.reasoningEffort({"effort": ..}); the newest message wins from the agent's next step. A caller that activated it is echoed the effort on theSendMessageanswer,GetTask, the first stream frame, and when it changes — the access tier's echo shape. The extension can only set: no member clears an effort. - A subagent's
subagent_startvalue is checked against the subagent's profile, not the root's (the card describes the root's model). A helper'schild-sessions/v1configbounds carry its model's levels, so a person can set a session value on a helper whose model differs. A child whose model takes levels under a root whose model takes none is not reachable by the extension (the card does not list it); only the child's sessionconfigcan set its effort.
- The card lists it only when the root agent's model takes at least one level;
The wire.
ModelRequestgainsreasoning_effort: Option<ReasoningEffort>; the client is given the profiles and applies thereasoningWireof the request's model:- the typed level is applied after the profile's
extraBody(or, until ADR 0064 lands,MODEL_EXTRA_BODY), and it removes only the members the chosen wire would duplicate —reasoning_effortandreasoning.effortfor the first two wires,thinkingforthinking_budget— so a typed level wins without dropping a flag the model needs; if the extra body'sreasoningobject becomes empty, the object is removed; - other extra-body members remain;
- the compaction/summary call sets the typed field to
None; the profile'sextraBodystill reaches it, so a profile that names a reasoning member also reasons in summaries (stated in the docs). A test pins the order:MODEL_EXTRA_BODY={"reasoning_effort":"medium"}+ a requestlowon areasoning_effortmodel → bodylowonly.
- the typed level is applied after the profile's
Usage. Each model call's
UsageEventcarrieseffort: Option<ReasoningEffort>— the typed effort the request named; it is absent when no typed level was set (including when onlyMODEL_EXTRA_BODYset a reasoning member, because the loop cannot see the raw member). Reported per call byusage/v1(the struct is#[non_exhaustive], so additive); the totals stay per provider+model.The engine.
Engine::builder()takes the same profiles (models(profiles), additive) and the agent's explicit value (reasoning_effort(value), checked against the profile) for an embedded agent with no folder — the platform'sagent.embeddedcoder is this seat.Limitskeeps the run bounds and staysCopy. The engine has no per-message extension, so the run's effort is the session's, else the folder's, else the builder's explicit value, else the preset's, else the profile's, else nothing.Amended 2026-11-21: two
Limitstypes are in play, and only the second isCopy.adam_engine::Limits(the engine's) isClone + PartialEq, notCopy— it holds the worker id, the retry policy and the session limits — and it holds no model setting;adam_llm_agent::Limits, the loop's per-run bounds, isCopy. The operative requirement is that the engine'sLimitskeeps the run bounds and never a model setting: the profiles and the level reach the engine throughEngineBuilder::modelsandEngineBuilder::reasoning_effort, never throughLimits. The builder's level applies to any root whose file sets none, folder or not — the file's ownreasoning_effortwins — and never to a subagent, which has its own file.The parity table. The feature is not done until every surface has it through its own mechanism; the gaps are the issues linked from
docs/reference/parity.md, whose reasoning row this ADR updates.Surface How it sets the effort, per model State adam-coderthe profile for its model; the folder's reasoning_effort; the engine builder's explicit value when embedded;reasoning/v1per message; the card lists the model's levelsto build (#284) adam-agent(folder agents)the same: the profile, the folder key, the extension, the card to build (#284) adam-engine(embedded)Engine::builder().models(profiles); the session/folder/preset/profile value checked; no per-message extensionto build (#284) orchestrator and web read reasoning/v1from the live card (never cached); send the level per message and store it per thread; the picker shows the card's levelsgap: #415 platform ModelEndpointdeclares the levels and the wire;AgentConfigpicks; forms, Platform API,aapctlto build (#284) another-app the hexagonal plan's ports (private) no column; the coordinator tracks it State 2026-11-21: the
adam-enginerow's builder seat is built (#317); the table's "to build" is kept as the decision was written.
The probe, model by model (2026-11-21) ​
| Family (models) | reasoning_effort accepted | Absent reasons? | Recommended reasoningEfforts | Notes |
|---|---|---|---|---|
| DeepSeek (v4.1-flash, v4.1-flash-1017, v4-flash-0731) | all levels | no | [none, low] | low 3/3 correct, ~1 s; max adds nothing |
| Kimi (k2.5, k2.7-code, k3.1-pro) | all levels | yes | [none, minimal] (k2.5, k3.1) | |
| Gemini (3p1-flash-lite) | all except max, xhigh (400) | yes | [none, medium] | low answers wrong; medium/high right; the reasoning object is a 400 |
| GLM (5.3, 5.3-flash, 4.7-flash) | all levels (200) | yes | [] | stochastic, partly inverted; no level controls it |
| Qwen (3-5-9b-local) | all levels | yes | [none, low] | the embedding model is not a chat model |
| MiniMax (m3, m2p5, m2.7) | all levels | yes | [none, low] | |
| MiMo (v2p5-pro, v2p5, v2.6-pro, v2.6-flash) | all levels | yes | [none, low] | |
| Ornith, Gemma, adorsys-* | all levels | no for adorsys-frontend/adorsys-researcher; yes otherwise | [none, low] | |
qwen3-embedding-8b | not a chat model | — | [] | no profile |
"all levels" is none, minimal, low, medium, high, xhigh, max. The recommended set is the cheapest reliable level per family; the full per-model table is recorded outside this repository.
The effort's life ​
The diagram is for a model whose profile takes at least one level; a model that takes none has no extension, so Idle --> Set cannot happen and only a session/folder/preset/profile value (which is then an error) could name one.
The extension in one message ​
Consequences ​
- A deployment that sets nothing renders nothing new: no reasoning member and no new value; the model file is the only new input, its path
MODEL_ALIASES_FILEand the chart's one value (config.modelProfiles) are unset by default. The file is the deployment's. - Breaks (a struct literal must add the field):
ModelRequest(adam-model),AgentFrontmatter(adam-agent-fs, public and not#[non_exhaustive]), andModelConfig(adam-service, theMODEL_ALIASES_FILEpath and profiles). The alias-file types are new.UsageEventis#[non_exhaustive], so additive;Bound,OpenAiCompatibleandReasoningEffortsgain fields or methods additively;adam-engine::Limitsis unchanged and the engine's builder gainsmodels(profiles). The implementation PR updates the crate READMEs and theadam-upgradeskill. - Files that say the opposite today and change with the implementation:
docs/reference/agent-files.md(the known-key list and the "ModelRequesthas no such fields, so the keys are ignored" paragraph),docs/reference/a2a-server.md(one section per extension, and theusage/v1members),docs/reference/environment.md,docs/reference/errors.md(the exit-78 list),docs/architecture.md(the new context key),crates/adam-a2a/src/extensions.rs's "Twelve extensions" and table,crates/adam-a2a/README.md,crates/adam-a2a-runtime/README.md,crates/adam-model-openai/README.md(the "it wins over what the client wrote" sentence gains the exception),crates/adam-llm-agent/README.md(the protected-keys list gainsvymalo.reasoningEffort),deploy/coder/README.mdandvalues.yaml(the model file),bin/adam-agent/README.mdandbin/adam-coder/README.md,bin/adam-coder/tests/fixtures/agent/card.json, the two binaries' card tests' exact URI lists,.agents/skills/adam-a2a-extensions,.agents/skills/adam-agent-folder, andbench/README.md(itsoffarm sends{"reasoning_effort":"none"};noneis now a real level, so the arm is unchanged). docs/api/usage-v1.mdlives invymalo/another-agentic-system; the system half's ADR and PR amend it.- The card gains one extension only for a model that takes a level; the chart gains one value that mounts the model file, unset by default, so the four goldens are unchanged.
- The parity gaps (orchestrator/web and platform) are issues, linked from the matrix; another-app is private and has no column. The engine's builder and the two binaries are this repository's.
- The probe is the evidence for the profiles; the profiles themselves are the deployment's, and the ADR's examples are not a shipped configuration.
Amends ADR 0054 ​
Amended 2026-11-21 (ADR 0063): for reasoning_effort only, the declaration is the model's profile in MODEL_ALIASES_FILE (reasoningEfforts, reasoningWire, reasoningBudgets, reasoningEffort), not a global variable; a session, folder, preset or profile value must be one of that model's levels, and there is no global default (a profile's or preset's reasoningEffort is an explicit per-model choice; absent everywhere sends nothing). The MODEL_EXTRA_BODY rule is 0054's owner item 8, extended: a typed level removes the members the model's wire would duplicate from the profile's extraBody (or MODEL_EXTRA_BODY until ADR 0064 lands) and writes the model's mapping. temperature is unchanged.
Amended 2026-11-22 ​
Amended 2026-11-22: a thinking_budget profile may not declare none. The shape has no disabled form — {"thinking": {"type": "enabled", "budget_tokens": n}} — so a level that means "do not reason" would send thinking enabled. reasoningEfforts containing none with reasoningWire: thinking_budget is a startup error (exit 78), naming the alias and the level: leave none out or use another wire. The probe table's recommended [none, low] sets are for the reasoning_effort wire. A hand-built ModelProfile (or a direct serde_json::from_str) bypasses parse_json, so the client refuses the same pairing at the call (ModelError::InvalidRequest: the wire has no disabled form), and the invariant holds everywhere. (#327)
Amended 2026-11-22 (decision 5, the map's key) ​
Amended 2026-11-22: decision 5 says ReasoningEfforts maps "each alias" to its model's levels. It is keyed by the agent registration name — the AgentInfo name, which carries its model_alias — not the literal alias: two agents may share one model alias and differ, an agent may be renamed without renaming its model, and both the card entry and the reading name the agent whose model answers. The levels are still the model's reasoningEfforts, lowest first; nothing else in decision 5 changes.
Alternatives considered ​
- A global
MODEL_REASONING_EFFORT(an earlier draft): the owner rejected it — the models behind the gateway differ, and one wire mapping cannot serve them. - A global default value: the owner rejected it; unset must stay "nothing sent" (a profile's or preset's per-model value is allowed, decision 3).
- A free-form wire template (a JSON fragment with placeholders): too easy to send a malformed body; the three closed mappings cover the observed shapes, and a fourth is a new ADR.
none/minimalkept out of the vocabulary (an earlier draft): the probe showed some models reason unlessnoneis sent, so both are real levels and are in.- A separate extension per model: the card already describes one agent's model; one URI with
effortsis enough.
Open questions ​
- The
reasoningfields for the deployment's models (the probe informs them; the owner sets them). - The orchestrator/web and platform halves (the system's #415, the platform's #284), and the
docs/reference/parity.mdrows. - The full per-model probe table lives outside this repository; the deployment's profiles are the owner's.
- Whether a model's
thinking_budgetbudgets are per level a fixed table or a formula; the entry carries the table, and a formula is a later ADR if a model needs one.