feat(FN-742): add describeModel helper and log model in agent creation sites
- Add describeModel() helper in pi.ts to format provider/model info for logging - Log resolved model details in executor, reviewer, and triage agent creation - Update executor and reviewer to call describeModel before session start - Add unit tests for describeModel covering all input combinations - Fix test mocks to account for new describeModel dependency
This commit is contained in:
@@ -22,6 +22,17 @@ export interface AgentResult {
|
||||
session: AgentSession;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract a human-readable model description from an AgentSession.
|
||||
* Returns `"<provider>/<modelId>"` (e.g. `"anthropic/claude-sonnet-4-5"`)
|
||||
* or `"unknown model"` when the session has no model set.
|
||||
*/
|
||||
export function describeModel(session: AgentSession): string {
|
||||
const model = session.model;
|
||||
if (!model) return "unknown model";
|
||||
return `${model.provider}/${model.id}`;
|
||||
}
|
||||
|
||||
export interface AgentOptions {
|
||||
cwd: string;
|
||||
systemPrompt: string;
|
||||
|
||||
Reference in New Issue
Block a user