Skip to content
askdareDocumentation

    ADR-0036: Model settings: reasoning effort and verbosity

    • Status: Accepted on 2026-11-30: the maintainer settled every question as recommended ("Settled with the maintainer", below). The model settings task amends it where building shows otherwise.
    • Date: 2026-11-29
    • Related: ADR-0006 (the public surface this adds to), ADR-0026 (provider profiles in 0.9 say what they support), ADR-0029 (compaction reads the turn's prompt cache), ADR-0039 (prompt versions and A/B tests, being decided at the same time; they may vary these settings). Built by the model settings task written once this ADR is accepted; bot/define-bot.ts is a hot file, so that task changes it before prompt versions and the tool presets do.
    • Docs checked on 2026-11-29, with the openaiDeveloperDocs MCP server and the types of openai 7.62.0 (the version in the lockfile):
      • Reasoning models: "Reasoning effort", "Reasoning mode", "Controlling costs", "Preserve reasoning across calls", "Change reasoning mid-conversation", "Reasoning summaries";
      • API deployment checklist: "Set up reasoning.effort", "Change reasoning effort mid-conversation", "Set up text.verbosity";
      • Using GPT-6.2: "Update API and model parameters";
      • Responses: create (max_output_tokens, reasoning, text, service_tier, temperature, top_p, max_tool_calls);
      • openai/resources/shared.d.ts (Reasoning, ReasoningEffort), openai/resources/responses/responses.d.ts (ResponseTextConfig.verbosity, the cache_miss reasons) and openai/resources/models.d.ts (Model).

    Context

    A bot today sets one thing about its model: the ID, a required string (model), so the library never assumes a model (ADR-0002). Every request goes out with the model's own defaults for everything else. Two of those defaults matter for a chatbot:

    • Reasoning effort decides how long the model thinks before it answers. OpenAI's guide recommends low for "customer support / chat assistant workflows" and calls medium the default "for most workloads", and defaults differ per model. Effort is the biggest lever on latency to the first token and on output cost.
    • Verbosity is "the main lever for balancing brevity against completeness". OpenAI recommends it over "Be concise" in the instructions. Its default is medium.

    What the docs say, as checked:

    • Supported values depend on the model. reasoning.effort takes none, minimal, low, medium, high, xhigh and max, but "Not all reasoning models support every value". For example, GPT-6.2 Astra and Sol reject none with HTTP 400, GPT-6.1 Sol supports neither none nor minimal, and GPT-6.1 Terra and GPT-6 Luna accept none. text.verbosity takes low, medium and high.
    • The API can't say what a model supports. GET /models/{model} returns id, created, object, owned_by and shutdown_date, and nothing about capabilities. The only way to know whether a model takes a value is to send it.
    • Reasoning tokens are output tokens. max_output_tokens bounds "visible output tokens and reasoning tokens". A response can end incomplete with reason max_output_tokens "before any visible output tokens are produced". The guide suggests reserving 25,000 tokens when you start experimenting. askdare's default maxOutputTokens is 1,024.
    • Changing either setting breaks the prompt cache. The cache_miss reasons in the Responses types include reasoning_effort_changed and verbosity_changed. The supported way to change effort within a conversation is a configuration_update input item, with the request-level effort left unchanged. It "cannot be combined with automatic compaction or truncation", which the conversations path uses (truncation: 'auto', ADR-0003).
    • Other reasoning options: reasoning.mode (standard or pro; pro "increases latency and token usage"), reasoning.context (which earlier reasoning the model sees; the default depends on the model) and reasoning.summary (opt-in summaries of the reasoning, which may need organization verification).
    • Sampling parameters don't apply. With reasoning effort other than none, temperature, top_p and top_logprobs must be removed. GPT-6.2 Astra and Sol take none of them in Responses.

    How askdare uses the model today:

    • The turn (openai/turn.ts) runs up to limits.maxSteps steps. On the last step function calls are switched off with tool_choice: 'none' or allowed_tools, so the tool list and the prompt cache stay intact.
    • Compaction (openai/compaction.ts, ADR-0029) runs after the turn with the same model, instructions, tools and prompt_cache_key, because it reads the turn's cache (S9: 82.5k of 82.6k input tokens cached).
    • Voice uses its own transcription model, voice.model. Moderation and guardrails make no responses.create call.
    • doctor (openai/diagnose.ts) looks the model up (models.retrieve, which also gives a warning when a shutdown is announced). It then sends one dry request: responses.create with 16 output tokens and store: false.
    • Limits (limits/limits.ts) reserve maxOutputTokens per model call against the daily budgets and settle on the usage that comes back. Usage already carries reasoningTokens as part of outputTokens (onUsage, onStep, the admin records).

    Decision

    1. Which settings: reasoning effort and verbosity, nothing else in 0.8

    SettingIn 0.8Why
    reasoning.effortYesThe main lever on latency and cost, and the docs give chat its own recommendation (low).
    text.verbosityYesOpenAI's documented lever for answer length, better than prompt wording.
    reasoning.summaryNoIt costs tokens and needs a new protocol event. It would send reasoning content to visitors, and the protocol deliberately sends only a reasoning status (openai-api skill, §3). It may need organization verification. If someone asks for it, it gets its own decision, with a protocol change.
    reasoning.mode: 'pro'NoMore latency and tokens for "difficult tasks". A visitor waiting in a chat is the opposite case. Settled 5.
    reasoning.contextNoThe model's default is right for replay. toReplayInput already sends reasoning only to the family that wrote it.
    configuration_update (effort per message)NoIt can't be combined with truncation: 'auto' on the conversations path. Choosing effort per message would also need a policy no one has asked for.
    temperature, top_p, top_logprobsNoCurrent reasoning models reject them. Passing them through would make a setting that fails on most models.
    service_tier (flex, fast/priority)NoIt changes the price per token, so the admin dashboard's cost estimates (AdminPrices) would be wrong. That needs a price per tier first. Settled 6.
    max_tool_callsNoIt limits built-in tool calls, which belongs with the tools decision (ADR-0038, being decided at the same time).

    The library never sets a default for either setting. If the bot doesn't set one, the request doesn't send it, and the model's own default applies, as today.

    2. The shape: model takes an object, per bot

    defineBot({
      id: 'support',
      model: {
        id: process.env.ASKDARE_MODEL!,
        reasoning: { effort: 'low' },
        verbosity: 'low',
      },
      instructions: '…',
    });
    • model accepts a string, as today, or an object { id, reasoning?: { effort }, verbosity? }. A string means { id }, so no existing bot changes. The settings live next to the ID because support depends on the model: changing the model is the moment to check them, and an A/B test (ADR-0039) varies the pair as one unit.
    • reasoning is an object with one field. That leaves room for summary or mode later without a new top-level name. verbosity is flat, because text in the API also holds the output format, which askdare controls.
    • Values are closed lists in the types and in defineBot's schema: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' for effort and 'low' | 'medium' | 'high' for verbosity. A typo fails at startup with the field's path, as other options do. When OpenAI adds a value, it is a patch release that adds it to the list (settled 3).
    • The same settings go on every model call of the bot: every step of a turn, the forced last step included, compaction, and doctor's dry request. A different effort on the last step or on compaction would miss the cache that ADR-0029 depends on (reasoning_effort_changed). Voice transcription has its own model and takes neither setting.
    • Public API (ADR-0006): the object form of model in defineBot, typed BotModel, with ReasoningEffort and Verbosity exported from .. BotDefinition['model'] becomes string | BotModel. This is an additive change: an API snapshot update and a minor changeset.
    • The resolved Bot keeps model: string, so the code that reads the ID (compactionModel, doctor, usage reports) doesn't change. It adds modelSettings: { reasoningEffort?, verbosity? }. Only src/openai/ maps it to reasoning.effort and text.verbosity.

    3. Checking support: doctor sends the settings, and the first failure explains itself

    There is no list of models or capabilities in the library, and the API has no endpoint that gives one. So:

    • Startup (defineBot, createChatHandler) checks only the value, against the closed lists above. It makes no network call: startup must stay offline and fast.
    • doctor sends the bot's settings in its existing dry request. A model that rejects a value answers 400 there. The check then fails with the model and the setting: "Model X rejected reasoning.effort: none", with a fix pointing to the model's page in the docs. When the request goes through, the check's title names the settings it proved. doctor keeps its 16-token limit: a reasoning model may end that request incomplete, which still proves the settings were accepted.
    • At runtime a rejected setting is a configuration error, not the visitor's problem. A 400 whose param is reasoning.effort or text.verbosity maps to bot_unavailable, as model_not_found does today. It is logged with a stable code and the parameter's name, never OpenAI's message. Because the settings are the same on every call, a bad pair fails every turn from the first one after it is deployed, so it shows at once and not in some conversations only. Running doctor before a deploy that changes the model or the settings catches it earlier. The exact error body (param, code) is recorded as a redacted fixture when this is built, not assumed from this ADR.

    4. Budgets and limits: nothing new, documented

    • limits.maxOutputTokens keeps bounding each model call, reasoning included. The reservation in limits.ts already uses it, so budgets stay correct at any effort.
    • onUsage, onStep, ChatUsageReport and the admin records already report reasoningTokens as part of outputTokens, and the dashboard prices them as output. No field changes.
    • The risk is an empty answer: at a high effort, a call can spend all of maxOutputTokens on reasoning and end incomplete with no visible text. The turn already maps that to its max_output_tokens outcome. The docs page on model settings says to raise maxOutputTokens together with the effort. doctor warns when effort is high or above and maxOutputTokens is under 4,096 (settled 4).
    • docs/costs.md gains a line saying that reasoning effort changes the output tokens per turn more than any other setting.

    5. The provider path (0.9): a profile lists the settings it passes

    ADR-0026 gives each provider profile a set of capabilities, checked at startup. This ADR adds one:

    • modelSettings: the settings the profile passes through, for example ['reasoning.effort', 'verbosity'] for OpenAI. createChatHandler refuses, at startup, a bot that sets a setting its profile doesn't list, and names the setting and the profile. This is static configuration, so no network call is needed.
    • Whether a model on that profile accepts a value is still doctor's dry request (decision 3), through the profile's error classifier.
    • The verification run for a model (ADR-0026, decision 3) adds one probe: each listed setting is sent once, and the run records whether the endpoint applies it, ignores it or rejects it. A profile lists only the settings that were applied. An endpoint that silently ignores a setting is worse than one that rejects it.

    Consequences

    • Site owners can make answers faster and shorter without touching their prompts, and A/B test the settings once ADR-0039 lands.
    • Bots that don't set anything behave exactly as today, and so does a string model.
    • A setting a model doesn't support fails in doctor, and in production on every turn after the deploy, with a clear log line. It never depends on what a visitor sent or on how far a conversation got. It is not caught at startup: that would need the network or a list of models, and both are ruled out.
    • A new effort value from OpenAI needs a patch release before bots can use it.
    • The cache stays intact across the steps of a turn and its compaction. The cost is that the forced last step and compaction can't use a cheaper effort.
    • The public surface grows by one option form and three types.

    As built in 0.8-m1

    Amended on 2026-11-30 (task m1), where the code differs from or adds to the decision above:

    • Decision 3, the error body, recorded live with 16-token dry requests (openai/testing/fixtures/model-setting-rejected.json): HTTP 400, type: invalid_request_error, param the request field (reasoning.effort or text.verbosity), and code either unsupported_value, for a value the model doesn't take (gpt-6.2-astra with none; gpt-6.1-sol and gpt-6-luna with minimal), or unsupported_parameter, for a model without the setting (gpt-4.1-mini with any effort). Older models take only verbosity: 'medium' (gpt-4.1-mini, gpt-4o-mini). The mapping keys on the status and param, not on the code. The API validates before it checks billing: a project out of credit still gets the 400.
    • Decision 3, the log: the cause is logged with the code model_setting_rejected and the setting's defineBot name (model.reasoning.effort or model.verbosity); explain() turns it into the log line and, in development, the chat's message. OpenAI's message, which lists the model's other values, is dropped.
    • Decision 3, doctor: the failed check names the setting as defineBot does: "Model X rejected model.reasoning.effort: none." The high-effort warning shows even when the model lookup fails, since it reads only the configuration. Both are in openai/diagnose.ts, so the CLI and the console's doctor show them; cli/doctor.ts renders the server's checks and needed no change. DiagnoseRequest gains modelSettings and maxOutputTokens, which server/handler.ts fills (two lines in that hot file).
    • Decision 2, the code: the types, the schema and the helpers live in bot/model-settings.ts; define-bot.ts only uses them. model is validated by its shape, not as a union, so a typo reports its own path (model.reasoning.effort Invalid option…), and an unknown key in the object (reasoningEffort, reasoning.mode) fails at startup. The startup hint about ASKDARE_MODEL covers model.id too.
    • The console: the configuration view's allowlist (consoleBotView in server/admin-console.ts) gains modelSettings: { reasoningEffort, verbosity }, model default when unset (not null, which the console shows as "None", like the effort none).
    • Not verified live: compaction and a turn with the settings, and verbosity: 'low' on the site's model. The smoke project was out of credit while this was built; the unit tests assert the request bodies.
    • Checked live at the release (y1, 2026-12-01, gpt-6-luna): the gateway smoke suite with SMOKE_EFFORT=low SMOKE_VERBOSITY=low passed (8 tests: text, suggest_replies, handoff, show_form, a stateless conversation, a compaction and the next turn, image and PDF), so every step and the compaction accept the settings; doctor against the site run locally sent each of its seven bots' settings (reasoning.effort: low, verbosity: low) in its dry request, all accepted.

    As built in 0.8: service tier for eval only

    Amended on 2026-11-30 (the eval cost task), where the maintainer narrowed settled 6: service_tier is allowed for eval only, as createChatHandler({ eval: { serviceTier: 'flex' } }). Visitors' turns and the console's playground still send none, so the dashboard's prices (AdminPrices) stay right: eval turns never reach the admin store. Settled 6's reason for leaving the tier out, a price per tier for the dashboard, doesn't apply to them.

    • Docs checked on 2026-11-30, with the openaiDeveloperDocs MCP server and openai 7.62.0's types: Flex processing, Pricing (the Flex table), Error codes ("400 - Invalid service_tier argument") and Background mode. ServiceTier is 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | 'ultrafast'; unset means auto, the project's own tier.
    • What Flex is: Batch prices (half of Standard) for Responses requests, slower, and 429 Resource Unavailable when it has no capacity, which is not billed. The guide gives no code for that 429. It is a wind-down beta: only the models in the pricing page's Flex table (GPT-6 Astra, Sol and Luna, GPT-6.1 Sol and Terra, the GPT-5.x line), none from GPT-6.2 Astra and Sol on, and a retirement date still to come. Its successor for jobs that can wait hours, background mode's 2-hour and 8-hour completion windows (30% and 40% off), doesn't fit a run of synchronous turns; ADR-0035, decision 7, keeps background mode for later.
    • Only 'flex' is accepted: any other value fails the first eval request with the setting named. fast and priority cost more, and eval waits for nobody.
    • Where it goes: each step of an eval turn, the compaction after one (another tier would miss the cache: service_tier_changed is a cache-miss reason), and the grader's call. streamTurn drops it unless source is eval, and the OpenAI gateway again unless the turn's source is eval, so a visitor's turn can't run at Flex by mistake.
    • No capacity: after the SDK's own retries, a 429 of a Flex request that isn't a billing error (insufficient_quota, credit_balance_exhausted, the spend and usage limits, which still stop the run) maps to upstream_error with params.reason: 'flex_unavailable', which /eval passes on. The CLI then waits 15, 30, 60 and 120 seconds (or OpenAI's Retry-After, up to 2 minutes) between tries of that case, and reports it as not run, the other cases going on, with exit code 2. It never resends at Standard prices, the fallback the guide offers: a run that silently costs twice its plan is worse than one repeated later. A rate limit of a Flex request is handled the same way, by waiting, and the CLI's message names both causes. What a failed try already spent (earlier turns of the case) reaches the CLI as params.spentTokens and counts toward --max-tokens.
    • A tier the project or model refuses: the documented 400 with param: 'service_tier' maps to bot_unavailable with the log code model_setting_rejected and the setting eval.serviceTier, as decision 3 maps a rejected model setting; the CLI stops the run (exit 2).
    • Timeouts: unchanged. The guide raises the SDK timeout for long Flex requests; askdare's turns keep limits.turnTimeoutMs and the route's maxDuration, and a Flex turn past them fails its case with timeout.
    • Not verified live: the smoke project had no credit. Not seen: the exact body of a Flex 429 (hence matching on the status), what a model without Flex answers (the documented project 400 is assumed), and whether a response's service_tier ever differs from flex for a Flex request. Tests use mocked bodies.
    • Checked live at the release (y1, 2026-12-01, gpt-6-luna), and fixed: Flex runs, and is billed at the Flex tier (service_tier: flex on the responses). When Flex has no capacity, a streamed request doesn't get the guide's 429: the stream ends with an error, code flex_unavailable, message "Flex processing is temporarily unavailable. Please try again later or use standard processing.", and no HTTP status. askdare only matched 429s, so askdare eval stopped the run as an outage; flexUnavailable now also matches the code, whatever the status (fix branch fix/flex-unavailable-in-stream, patch changeset). With the fix, a run of the site's set met 36 such errors in 11 minutes: the CLI waited, retried, and reported 2 of 21 cases as not run after 5 tries. Still not seen: a Flex 429, and what a model without Flex answers (not tried, to keep the spend down).

    Settled with the maintainer (2026-11-30)

    The questions left open in the draft, all settled as recommended. The alternative each one weighed is kept here.

    1. The shape. Settled: model as a string or { id, reasoning: { effort }, verbosity }. The alternative was flat reasoningEffort and verbosity options next to model: simpler to read, but they separate the settings from the model they depend on, and an A/B test would vary two fields instead of one.
    2. Compaction and the last step. Settled: the same settings on every call of the bot, for the cache. The alternative was a separate compaction.reasoning for cheaper compaction. S9 measured compaction at 0.0085 USD on a cached 82k window, and a cache miss there costs about ten times that, so a lower effort can't win it back.
    3. Values. Settled: closed lists, so a typo fails at startup and a new OpenAI value costs a patch release. The alternative was any string: a new value would work at once, but a typo would surface only in doctor or on the first turn.
    4. The doctor warning for a high effort with a low maxOutputTokens. Settled: warn when effort is high or above and maxOutputTokens is under 4,096. The thresholds are a judgement, not a measurement; the build task may adjust them if the eval runner (ADR-0035) measures otherwise. The alternatives were no warning (only docs), or measuring the reasoning tokens per effort on the site's bot first.
    5. reasoning.mode: 'pro'. Settled: left out until someone shows a chat that needs it. It is a one-field addition to reasoning later.
    6. service_tier. Settled: left out of 0.8. The alternative was a per-bot serviceTier in 0.8, with AdminModelPrice gaining a price per tier so the dashboard's costs stay right. fast lowers latency for a price, and flex suits nothing a visitor waits for.
    7. The starter and the site. Settled: the site's demo sets reasoning: { effort: 'low' } and verbosity: 'low', as OpenAI recommends for chat assistants. The starter sets neither, because its model comes from an environment variable, and a value one model rejects would break init for another.

    Alternatives considered

    • A list of models and what they support, in the library. It is ruled out by "no model IDs in the library", and it would go stale every month. OpenAI's own docs list the exceptions per model in prose.
    • Asking the models endpoint. It returns no capabilities (checked in the SDK types and the reference on 2026-11-29).
    • A probe request at startup, or on the first request. It costs a model call on every cold start of a serverless function, makes startup depend on the network, and repeats doctor's job.
    • Dropping a rejected setting and retrying without it. The bot would silently run with settings its owner didn't choose, and every turn would cost two calls. A clear failure is better.
    • Passing an arbitrary requestOptions object through to responses.create. It is the most flexible, but it puts OpenAI's request shape into the public API (against ADR-0002) and lets a bot override what askdare must control (store, tools, tool_choice, include, safety_identifier).
    • Effort per step (a lower effort for the forced last step, or configuration_update per message). It breaks the prompt cache or, on the conversations path, conflicts with truncation: 'auto', for a saving no one has measured.
    • Exposing reasoning summaries now. It would send reasoning content to the browser, needs a new protocol event and costs tokens on every turn, and no one has asked for it.