Skip to content

thread.models

Available models. Each entry supplies provider and id: use threads.create { model: "<provider>/<id>", workspace: ... }, or thread.set_model { threadId: ..., provider: "<provider>", modelId: "<id>" }.

/** Params naming one thread. */
export type ThreadRef = {
threadId: string;
};
/**
* Discovery result shared by `auth.models` (omfp's credentials, no thread) and `thread.models` (the thread's session).
*/
export type AvailableModels = {
models: AvailableModel[];
};
/** A model pi can use, as `auth.models` and `thread.models` list it: what selects it, and its name. */
export type AvailableModel = {
/** Model identifier. Change with `thread.set_model { provider: "<provider>", modelId: "<id>", ... }`. */
id: string;
/** Human-readable model name, not a selector. */
name: string;
/** Provider identifier. Create with `threads.create { model: "<provider>/<id>", ... }`. */
provider: string;
};