model-preference
Import
Section titled “Import”import * as api from "@fungi.computer/shiitake/model-preference";Exports
Section titled “Exports”| 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”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”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”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
ParseOptions |
Returns
Section titled “Returns”| { providerId: string; modelId: string; reasoning?: "high" |
"low" | "max" | "medium" | "minimal" | "xhigh"; } | null
parseModelPreferenceJsonconstant
Section titled “parseModelPreferenceJson”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
ParseOptions |
Returns
Section titled “Returns”| { providerId: string; modelId: string; reasoning?: "high" |
"low" | "max" | "medium" | "minimal" | "xhigh"; } | null
modelPreferenceJsonSchemaconstant
Section titled “modelPreferenceJsonSchema”const modelPreferenceJsonSchema: JsonSchema;JSON Schema generated from Shiitake’s maintained model preference schema.
parseModelAddress()function
Section titled “parseModelAddress()”function parseModelAddress(input): object;Parse the footer’s provider/model spelling; model ids may contain slashes.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
Returns
Section titled “Returns”object
| Name | Type | Default value |
|---|---|---|
providerId |
string |
identifier |
modelId |
string |
identifier |
reasoning? |
"high" | "low" | "max" | "medium" | "minimal" | "xhigh" |
- |
resolveModelPreference()function
Section titled “resolveModelPreference()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
layers |
Readonly<{ session?: ModelPreference | null; agent?: ModelPreference | null; manual?: ModelPreference | null; team?: ModelPreference | null; available?: ModelPreference | null; }> |
Returns
Section titled “Returns”| { providerId: string; modelId: string; reasoning?: "high" |
"low" | "max" | "medium" | "minimal" | "xhigh"; } | null
References
Section titled “References”ModelPreference
Section titled “ModelPreference”Re-exports ModelPreference