export interface ModelOption { /** Full identifier in provider/model format, e.g. "openrouter/anthropic/claude-sonnet-4" */ id: string; /** Human-readable display name from config, falls back to the model key */ name: string; /** Provider key from opencode.jsonc, e.g. "openrouter" */ provider: string; } export interface RoleModelEntry { /** Absolute path to the role.yaml file */ path: string; /** Role name from the YAML (name field) */ name: string; /** Current model value from the YAML */ model: string; } /** * Read `~/.config/opencode/opencode.jsonc`, parse the JSONC, and * extract all available model identifiers. * * Each model is identified by its full `{provider_key}/{model_key}` path. * Returns an ordered (by id) array of ModelOption objects. * * Returns an empty array when the config file is missing, unreadable, * malformed, or contains no provider models. */ export declare function scanAvailableModels(configPath?: string): ModelOption[]; /** * Resolve the dsh settings document (`/settings.yaml`) from the * platform paths (`$DSH_HOME` or `~/.dsh`). */ export declare function getDshSettingsPath(): string; /** * Read the dsh settings document and extract the models declared under * `llm-pi-ai.providers..models[]` (the key shape verified in subtask 1). * * The `providers` dict key is the provider route, so each model is identified * as `/` — the same `provider/model` shape the opencode * reader produces. Returns an empty array when the file is missing, * unreadable, malformed, or declares no provider models, so the caller can * fall back to the opencode source. */ export declare function scanDshAvailableModels(configPath?: string): ModelOption[]; /** * Resolve the model options offered for a sync target. * * `dsh` reads its own settings document; when that yields no models (missing * file, malformed YAML, or an empty provider set) it falls back to the * opencode source. Every other target (opencode, pi) keeps the opencode * source unchanged. */ export declare function scanModelsForTarget(target: string, opts?: { opencodeConfigPath?: string; dshConfigPath?: string; }): ModelOption[]; /** * Determine whether a model string is a placeholder that needs * real configuration before it can be used. * * Returns `true` when: * - The string matches known placeholder literals * (`PLACEHOLDER`, `YOUR_MODEL_HERE`, `CHANGE_ME`, `TODO`, empty string) * - The string does NOT contain a `/` separator (bare model names * like `gpt-4o` are likely placeholders since the canonical format * is `provider/model_id`) * - `knownModels` is provided and the string is not in that list * (meaning it refers to a model that hasn't been configured yet) */ export declare function isPlaceholderModel(model: string, knownModels?: string[]): boolean; /** * Recursively scan a role directory for all `role.yaml` files * (including those inside `subagents/` subdirectories) and return * the model value from each. * * Skips files that cannot be read or parsed. Returns an empty array * when the directory does not exist. */ export declare function scanRoleModels(roleDir: string): RoleModelEntry[]; /** * Find all roles within a directory that have placeholder models. * * Combines `scanRoleModels` and `isPlaceholderModel` to identify * roles whose `model` field needs real configuration. */ export declare function findPlaceholderRoles(roleDir: string, knownModels?: string[]): RoleModelEntry[]; //# sourceMappingURL=model-utils.d.ts.map