/** * How hard a model should think, said in a way the model can hear. * * KONECK has had a reasoning-effort setting for a long time, shown as a pill in the browser and a * key in the config. It travelled as *words in the prompt* — a `[effort medium]` prefix — and * nothing else. A reasoning model does not take instruction about its own budget from the prompt; * it takes a parameter. So the setting did nothing to a reasoning model, and every call reasoned * at whatever the provider's default was. * * That is measurable rather than theoretical. KONECK's own overhead for a shell command was timed * at about forty milliseconds — tool call to tool result — while running `echo hello` through a * reasoning model took seconds, because the model thought at full depth before deciding to run it. * Reading and writing code hid the problem: those are one big call, so the thinking is amortised. * Commands are many small calls, and the thinking is paid over and over. * * So the effort now goes on the wire as `reasoning_effort`, which is what the models that support * it are actually listening for. Not every endpoint accepts it, and an unknown parameter is a 400 * on the strict ones — so it is sent, and if it comes back refused it is dropped and remembered as * unsupported for that model. Learned from the endpoint's own answer rather than guessed from its * name, the same way tool support is. */ /** What a person picks. `max` exists because some models take it and it costs nothing to pass. */ export type Pace = 'low' | 'medium' | 'high' | 'max'; export declare const PACES: readonly Pace[]; /** What each choice means in practice, for a menu that has to explain itself. */ export declare const PACE_BLURB: Record; export declare function isPace(value: unknown): value is Pace; /** * A pace, or the default, from anything a config or a flag might hold. * * Normalised before it is recognised, not after. Checking the raw value first meant "High" — which * is how a person writes it, and how it was written in the request for this feature — fell through * every branch and silently became the default. */ export declare function paceFrom(value: unknown, fallback?: Pace): Pace; /** * The value to put on the wire. * * `max` is sent as `high`, because that is the ceiling the OpenAI-compatible field defines and an * invented value is a 400. The extra that `max` buys is spent elsewhere — a larger completion * budget — rather than on a word the endpoint will reject. */ export declare function wireEffort(pace: Pace): 'low' | 'medium' | 'high'; /** * Whether a refusal is about this parameter specifically. * * Only then is acting on it right. A 400 for something else — a context overflow, a malformed tool * schema — must not be mistaken for "this model has no reasoning setting", or the setting would be * quietly discarded for every model that ever had a bad day. */ export declare function looksLikeEffortUnsupported(err: unknown): boolean; /** * The values a provider says it will take, when it says so. * * Providers that refuse this parameter often name the alternatives in the same breath — "please use * low, high or max" — and that is far more useful than knowing only that the value was wrong. It * turns "drop the setting and hope" into "send one this model accepts". * * Read only after a cue that introduces a list, so a message merely containing the word "high" * somewhere is not mistaken for an enumeration. The cues are in both languages for the same reason * the refusal words are. */ export declare function acceptedEfforts(err: unknown): Pace[]; /** * The accepted value closest to what was asked for, or null when none is. * * The paces form a ladder — low, medium, high, max — so "closest" is a distance along it. A tie * goes to the lower rung on purpose: somebody who chose medium asked for balance rather than depth, * and spending more than they asked for is the worse way to be wrong when the alternative is * spending slightly less. Whatever is chosen is said out loud, so it can be overridden. */ export declare function nearestAccepted(pace: Pace, accepted: readonly Pace[]): Pace | null; //# sourceMappingURL=pace.d.ts.map