A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
agents view: strip provider paths from the model column (#2149)
Sebastian Müller656747485307
diff --git a/packages/coding-agent/.changes/res-1331-bare-model-id.md b/packages/coding-agent/.changes/res-1331-bare-model-id.mdnew file mode 100644index 0000000000..2ca4190856--- /dev/null+++ b/packages/coding-agent/.changes/res-1331-bare-model-id.md@@ -0,0 +1 @@+- Changed the agents view model column to show the bare model name, stripping provider paths embedded in the model id.diff --git a/packages/coding-agent/src/cli/daemon-list-format.ts b/packages/coding-agent/src/cli/daemon-list-format.tsindex 59e91e0107..4d963b8ef4 100644--- a/packages/coding-agent/src/cli/daemon-list-format.ts+++ b/packages/coding-agent/src/cli/daemon-list-format.ts@@ -34,7 +34,7 @@ export function formatSessionListTable(sessions: readonly SessionSummary[], nowMid: formatSessionDisplayId(session.id),status: listStatusForSummary(session),age: formatSessionAge(session.modified, nowMs),- model: formatSessionModel(session.model),+ model: formatModelSelector(session.model),messages: String(session.messageCount),clients: String(session.attachedClients),}));@@ -99,7 +99,7 @@ function formatSessionAge(modified: string | undefined, nowMs: number): string {return `${Math.floor(ageWeeks / 52)}y`;}-function formatSessionModel(model: SessionSummary["model"]): string {+function formatModelSelector(model: SessionSummary["model"]): string {return model ? `${model.provider}/${model.id}` : "";}diff --git a/packages/coding-agent/src/modes/agents-view/agents-view-mode.ts b/packages/coding-agent/src/modes/agents-view/agents-view-mode.tsindex 7dd3e01e63..9fa9e25fb7 100644--- a/packages/coding-agent/src/modes/agents-view/agents-view-mode.ts+++ b/packages/coding-agent/src/modes/agents-view/agents-view-mode.ts@@ -2874,8 +2874,16 @@ function formatTableCell(value: string, width: number): string {return truncated + " ".repeat(Math.max(0, width - visibleWidth(truncated)));}+// Model ids can embed a provider path ("moonshotai/kimi-k2"); the column shows+// the bare model name plus the thinking level ("kimi-k2:high") when one is+// active — "off" reads as noise, so it and absent levels render bare (saved+// rows carry no level). The actions panel keeps the full provider/id · level form.function formatSessionModel(row: AgentsViewRow): string {- return row.summary.model?.id ?? row.record?.saved?.model?.modelId ?? "-";+ const id = row.summary.model?.id ?? row.record?.saved?.model?.modelId;+ if (!id) return "-";+ const bare = id.slice(id.lastIndexOf("/") + 1) || id;+ const level = row.summary.thinkingLevel;+ return level && level !== "off" ? `${bare}:${level}` : bare;}function formatSessionDuration(summary: SessionSummary): string {diff --git a/packages/coding-agent/test/agents-view-mode.test.ts b/packages/coding-agent/test/agents-view-mode.test.tsindex 7ef077787d..410587ca97 100644--- a/packages/coding-agent/test/agents-view-mode.test.ts+++ b/packages/coding-agent/test/agents-view-mode.test.ts@@ -760,7 +760,10 @@ describe("AgentsViewMode", () => {activeSessionId: "spender",sessionId: "spender-session",sessionName: "spender",- model: { ...getModel("openai", "gpt-4o"), id: "gpt-5.6-sol" },+ // Provider path deliberately mismatches the catalog provider: only the id's+ // embedded path matters to the column stripper.+ model: { ...getModel("openai", "gpt-4o"), id: "moonshotai/gpt-5.6-sol" },+ thinkingLevel: "high",created,summary: "Analyzing runtime composition",usage: { inputTokens: 12437, outputTokens: 1234, cost: 0.42 },@@ -773,6 +776,7 @@ describe("AgentsViewMode", () => {runtimeKind: "subagent",parentActiveSessionId: "spender",model: { ...getModel("openai", "gpt-4o"), provider: "prime-inference", id: "glm-5.2-fast" },+ thinkingLevel: "off",created,usage: { inputTokens: 500, outputTokens: 50, cost: 0.68 },});@@ -786,7 +790,8 @@ describe("AgentsViewMode", () => {model: { ...getModel("openai", "gpt-4o"), provider: "prime-inference", id: "glm-5.2-fast" },usage: { inputTokens: 900, outputTokens: 80, cost: 123.45 },});- const rows = buildAgentsViewRows([parent, child, inactive]);+ // Expand the parent so the child's "off" level renders on a real row.+ const rows = buildAgentsViewRows([parent, child, inactive], new Set(["file:/tmp/scope.jsonl"]));const view = new AgentsViewMode({ config: {}, uiServices: createUiServices() }, {});Reflect.set(view, "rows", rows);Reflect.set(view, "selectedIndex", -1);@@ -797,8 +802,14 @@ describe("AgentsViewMode", () => {stripAnsi(invoke("renderRow", view, row, width, buildCompactAgentsViewLayout(rows, width)) as string);const parentLine = render(parentRow, 120);const savedLine = render(savedRow, 120);- expect(parentLine).toContain("gpt-5.6-sol");+ // Provider paths strip to the bare model name; an active thinking level+ // suffixes it, while absent (saved row) and "off" levels render bare.+ expect(parentLine).toContain("gpt-5.6-sol:high");+ expect(parentLine).not.toContain("moonshotai");expect(savedLine).toContain("glm-5.2-fast");+ expect(savedLine).not.toContain("glm-5.2-fast:");+ const childRow = rows.find((row) => row.summary.sessionId === child.sessionId)!;+ expect(render(childRow, 120)).not.toContain("glm-5.2-fast:");expect(parentLine).toContain("$1.10");expect(parentLine).not.toContain("$0.42");expect(parentLine).not.toMatch(/[↑↓]/);diff --git a/packages/coding-agent/test/suite/regressions/502-unified-session-view.test.ts b/packages/coding-agent/test/suite/regressions/502-unified-session-view.test.tsindex b54110daa3..170d9f4974 100644--- a/packages/coding-agent/test/suite/regressions/502-unified-session-view.test.ts+++ b/packages/coding-agent/test/suite/regressions/502-unified-session-view.test.ts@@ -499,22 +499,23 @@ describe("#502 unified session view regressions", () => {);const full = render(160);- expect(full).toMatch(/Inspect agents view\s+gpt-5\.6-terra\s+Investigate a variable background status/);+ // The active thinking level rides the compact id; both must stay visible.+ expect(full).toMatch(/Inspect agents view\s+gpt-5\.6-terra:high\s+Investigate a variable background status/);for (const width of [60, 80, 120]) {- expect(render(width)).toContain("gpt-5.6-terra");+ expect(render(width)).toContain("gpt-5.6-terra:high");expect(render(width)).toHaveLength(width);}const narrow = render(100);- expect(narrow).toContain("gpt-5.6-terra");+ expect(narrow).toContain("gpt-5.6-terra:high");expect(narrow).not.toContain("prime-inference/");subagent.summary.summary = "";- expect(render(100)).toMatch(/Inspect agents view\s+gpt-5\.6-terra/);+ expect(render(100)).toMatch(/Inspect agents view\s+gpt-5\.6-terra:high/);// Older daemons identify subagents through persisted linkage instead of runtimeKind.subagent.summary.runtimeKind = undefined;subagent.summary.rlmChildId = "effort-child";- expect(render(100)).toMatch(/Inspect agents view\s+gpt-5\.6-terra/);+ expect(render(100)).toMatch(/Inspect agents view\s+gpt-5\.6-terra:high/);subagent.summary.thinkingLevel = "off";subagent.summary.summary = "A later summary";