Skip to content
API reference

model-preference

Import
import * as api from "@fungi.computer/shiitake/model-preference";
Kind Export Description
constant modelReasoningLevels The thinking levels a model choice may name, shared by every model path.
constant ModelPreferenceSchema Secret-free request to the host’s maintained model catalogue.
constant parseModelPreference Decode the bounded client preference; availability remains model-owner policy.
constant parseModelPreferenceJson Decode the serialized preference with the same maintained schema.
constant modelPreferenceJsonSchema JSON Schema generated from Shiitake’s maintained model preference schema.
function parseModelAddress() Parse the footer’s provider/model spelling; model ids may contain slashes.
function resolveModelPreference() Resolve host-owned defaults for a future run. Hosts supply offered, logged-in availability; an explicit choice never silently falls through on auth failure.

modelReasoningLevelsconstant

Section titled “modelReasoningLevels”
Signature
const modelReasoningLevels: readonly [
"minimal",
"low",
"medium",
"high",
"xhigh",
"max",
];

The thinking levels a model choice may name, shared by every model path.


ModelPreferenceSchemaconstant

Section titled “ModelPreferenceSchema”
Signature
const ModelPreferenceSchema: Struct<{
providerId: String;
modelId: String;
reasoning: optional<
Literals<readonly ["minimal", "low", "medium", "high", "xhigh", "max"]>
>;
}>;

Secret-free request to the host’s maintained model catalogue.


parseModelPreferenceconstant

Section titled “parseModelPreference”
Signature
const parseModelPreference: (
input,
options?,
) => {
providerId: string;
modelId: string;
reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
} | null;

Decode the bounded client preference; availability remains model-owner policy.

Parameter Type
input unknown
options? ParseOptions

| { providerId: string; modelId: string; reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh"; } | null


parseModelPreferenceJsonconstant

Section titled “parseModelPreferenceJson”
Signature
const parseModelPreferenceJson: (
input,
options?,
) => {
providerId: string;
modelId: string;
reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
} | null;

Decode the serialized preference with the same maintained schema.

Parameter Type
input unknown
options? ParseOptions

| { providerId: string; modelId: string; reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh"; } | null


modelPreferenceJsonSchemaconstant

Section titled “modelPreferenceJsonSchema”
Signature
const modelPreferenceJsonSchema: JsonSchema;

JSON Schema generated from Shiitake’s maintained model preference schema.

parseModelAddress()function

Section titled “parseModelAddress()”
Signature
function parseModelAddress(input): object;

Parse the footer’s provider/model spelling; model ids may contain slashes.

Parameter Type
input unknown

object

Name Type Default value
providerId string identifier
modelId string identifier
reasoning? "high" | "low" | "max" | "medium" | "minimal" | "xhigh" -

resolveModelPreference()function

Section titled “resolveModelPreference()”
Signature
function resolveModelPreference(layers): {
providerId: string;
modelId: string;
reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
} | null;

Resolve host-owned defaults for a future run. Hosts supply offered, logged-in availability; an explicit choice never silently falls through on auth failure.

Parameter Type
layers Readonly<{ session?: ModelPreference | null; agent?: ModelPreference | null; manual?: ModelPreference | null; team?: ModelPreference | null; available?: ModelPreference | null; }>

| { providerId: string; modelId: string; reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh"; } | null

Re-exports ModelPreference