/** * Default model for Claude Code team members. * * A member that has someone above it reviewing its work (its parent member, * else the team lead — the same rule the bridge uses to pick a reviewer) * runs on Sonnet unless a model was chosen for it. Leads, and members with no * separate reviewer, keep Claude Code's own default (Opus). An explicit * `modelId` always wins, and the orchestrator is never touched. * * `CREWLY_MEMBER_DEFAULT_MODEL` replaces `sonnet`; `''` or `off` turns the * default off entirely. A member's tier (crewly#1173) comes before this * default: explicit `modelId` > tier model > reviewed default > runtime default. * * @module utils/member-default-model */ import type { Team, TeamMember } from '../types/index.js'; /** The fields of a member this decision reads. */ type MemberLike = Pick & { runtimeType?: string; } & Partial>; /** The fields of a team these decisions read. */ type TeamLike = Pick & Partial>; /** * The model reviewed members get when they have none, after the env override. * * @param env - Environment (tests) * @returns The model name, or null when the default is disabled */ export declare function reviewedMemberDefaultModel(env?: NodeJS.ProcessEnv): string | null; /** * Whether someone other than the member reviews its work: a parent member * that exists in the team, or a team lead who is not the member itself. * Members that lead (a lead by the team-lead rule in `utils/team.utils`, or a * delegating member with no parent) never count as reviewed. * * @param team - The member's team * @param member - The member * @returns True when the member has a reviewer above it */ export declare function memberHasReviewer(team: Pick, member: MemberLike): boolean; /** * The model a member should launch with when it has no `modelId` of its * own. Returns null when no default applies (explicit model set, not Claude * Code, orchestrator, a lead / unreviewed member, or the default disabled). * * @param team - The member's team * @param member - The member * @param env - Environment (tests) * @returns The default model name, or null * * @example * ```typescript * defaultModelForMember(team, worker); // 'sonnet' * defaultModelForMember(team, lead); // null → Claude Code's own default (Opus) * ``` */ export declare function defaultModelForMember(team: TeamLike, member: MemberLike, env?: NodeJS.ProcessEnv): string | null; /** * The model of a member's tier on a runtime (crewly#1173), or undefined when * it has no tier or the runtime has no model for it. * * @param team - The member's team (its `tierModels` override the global map) * @param member - The member * @param runtime - Runtime that launches * @returns Model id, or undefined */ export declare function tierModelForMember(team: TeamLike, member: MemberLike, runtime: string): string | undefined; /** * The model id a member launches with: its own `modelId` when set, else the * model of its tier on its runtime (crewly#1173), else the reviewed-member * default from {@link defaultModelForMember}. * * @param team - The member's team * @param member - The member * @param env - Environment (tests) * @returns Model id to pass to the runtime, or undefined for the runtime's own default */ export declare function effectiveMemberModelId(team: TeamLike, member: MemberLike, env?: NodeJS.ProcessEnv): string | undefined; /** * The model a member launches with when it runs on a fallback runtime (its * own runtime is out of usage). The member's `modelId` is kept only when the * fallback runtime can use it (a Claude alias / `claude-*` id for Claude Code; * a Codex `gpt-*` id is ignored). Otherwise its tier's model on the fallback * runtime applies (a tier is runtime-neutral, crewly#1173), then the * reviewed-member default for that runtime. Other fallback runtimes without a * tier model get no model (their own default). * * @param team - The member's team * @param member - The member (its configured runtime does not matter here) * @param fallbackRuntime - The runtime actually launched * @param env - Environment (tests) * @returns Model id for the fallback runtime, or undefined for its own default */ export declare function fallbackRuntimeModelId(team: TeamLike, member: MemberLike, fallbackRuntime: string, env?: NodeJS.ProcessEnv): string | undefined; export {}; //# sourceMappingURL=member-default-model.utils.d.ts.map