From acd1753638c7e656f3ba339ddaa4952c9dfbd97e Mon Sep 17 00:00:00 2001 From: Avi Alpert Date: Wed, 10 Jun 2026 15:15:36 -0400 Subject: [PATCH] feat: send model config to agent inspector --- src/cli/operations/dev/web-ui/api-types.ts | 3 +++ src/cli/operations/dev/web-ui/handlers/resources.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/cli/operations/dev/web-ui/api-types.ts b/src/cli/operations/dev/web-ui/api-types.ts index d8b3b6fb6..17090244e 100644 --- a/src/cli/operations/dev/web-ui/api-types.ts +++ b/src/cli/operations/dev/web-ui/api-types.ts @@ -8,6 +8,7 @@ * TODO: Extract these types into a shared package so both repos import * from a single source of truth instead of manually duplicating. */ +import type { HarnessModel } from '../../../../schema'; import type { HarnessModelConfiguration, HarnessTool } from '../../../aws/agentcore-harness'; import type { CloudWatchSpanRecord, CloudWatchTraceRecord } from '../../traces/types'; @@ -463,7 +464,9 @@ export interface StatusHarness { export interface ResourceHarness { name: string; + /** @deprecated Use modelConfig instead. */ model: string; + modelConfig?: HarnessModel; tools: string[]; deploymentStatus?: ResourceDeploymentStatus; deployed?: DeployedHarnessState; diff --git a/src/cli/operations/dev/web-ui/handlers/resources.ts b/src/cli/operations/dev/web-ui/handlers/resources.ts index 972967ead..25771cc11 100644 --- a/src/cli/operations/dev/web-ui/handlers/resources.ts +++ b/src/cli/operations/dev/web-ui/handlers/resources.ts @@ -119,10 +119,12 @@ export async function handleResources(ctx: RouteContext, res: ServerResponse, or const harnesses: ResourceHarness[] = []; for (const h of project.harnesses ?? []) { let model = ''; + let modelConfig: ResourceHarness['modelConfig']; let tools: string[] = []; try { const spec = await configIO.readHarnessSpec(h.name); model = `${spec.model.provider}/${spec.model.modelId}`; + modelConfig = spec.model; tools = spec.tools.map(t => t.name); } catch { // harness spec may be unreadable — show what we can @@ -131,6 +133,7 @@ export async function handleResources(ctx: RouteContext, res: ServerResponse, or harnesses.push({ name: h.name, model, + modelConfig, tools, deploymentStatus: statusByTypeAndName.get(`harness:${h.name}`), deployed: deployed ? { harnessId: deployed.harnessId, harnessArn: deployed.harnessArn } : undefined,