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:
gsxdsm
2026-04-02 19:52:35 -07:00
parent da4ce003cd
commit cb06792766
8 changed files with 69 additions and 3 deletions

View File

@@ -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;