From 393c34422981cc910acc78f96dd546d90f3096de Mon Sep 17 00:00:00 2001 From: muyiyr <32588751+muyiyr@users.noreply.github.com> Date: Fri, 31 Jul 2026 04:01:49 +0800 Subject: [PATCH] fix(coding-agent): replace deprecated getModel in SDK example (#7306) --- packages/coding-agent/examples/sdk/02-custom-model.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/coding-agent/examples/sdk/02-custom-model.ts b/packages/coding-agent/examples/sdk/02-custom-model.ts index ab947dc11..e8f52504f 100644 --- a/packages/coding-agent/examples/sdk/02-custom-model.ts +++ b/packages/coding-agent/examples/sdk/02-custom-model.ts @@ -4,13 +4,12 @@ * Shows how to select a specific model and thinking level. */ -import { getModel } from "@earendil-works/pi-ai/compat"; import { createAgentSession, ModelRuntime } from "@earendil-works/pi-coding-agent"; const modelRuntime = await ModelRuntime.create(); // Option 1: Find a specific built-in model by provider/id -const opus = getModel("anthropic", "claude-opus-4-5"); +const opus = modelRuntime.getModel("anthropic", "claude-opus-4-5"); if (opus) { console.log(`Found model: ${opus.provider}/${opus.id}`); }