refactor(models): remove model row registry alias · openclaw/openclaw@61210b0
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import { withEnvAsync } from "../test-utils/env.js";
|
7 | 7 | |
8 | 8 | let modelsListCommand: typeof import("./models/list.list-command.js").modelsListCommand; |
9 | 9 | let loadModelRegistry: typeof import("./models/list.registry.js").loadModelRegistry; |
10 | | -let toModelRow: typeof import("./models/list.registry.js").toModelRow; |
| 10 | +let toModelRow: typeof import("./models/list.model-row.js").toModelRow; |
11 | 11 | |
12 | 12 | const getRuntimeConfig = vi.fn(); |
13 | 13 | const readConfigFileSnapshotForWrite = vi.fn().mockResolvedValue({ |
@@ -413,7 +413,8 @@ describe("models list/status", () => {
|
413 | 413 | |
414 | 414 | beforeAll(async () => { |
415 | 415 | ({ modelsListCommand } = await import("./models/list.list-command.js")); |
416 | | -({ loadModelRegistry, toModelRow } = await import("./models/list.registry.js")); |
| 416 | +({ loadModelRegistry } = await import("./models/list.registry.js")); |
| 417 | +({ toModelRow } = await import("./models/list.model-row.js")); |
417 | 418 | }); |
418 | 419 | |
419 | 420 | it("models list runs model discovery without auth.json sync", async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,8 +12,6 @@ import {
|
12 | 12 | MODEL_AVAILABILITY_UNAVAILABLE_CODE, |
13 | 13 | shouldFallbackToAuthHeuristics, |
14 | 14 | } from "./list.errors.js"; |
15 | | -import { toModelRow as toModelRowBase } from "./list.model-row.js"; |
16 | | -import type { ModelRow } from "./list.types.js"; |
17 | 15 | import { modelKey } from "./shared.js"; |
18 | 16 | |
19 | 17 | function createAvailabilityUnavailableError(message: string): Error { |
@@ -140,8 +138,3 @@ export async function loadModelRegistry(
|
140 | 138 | } |
141 | 139 | return { registry, models, availableKeys, availabilityErrorMessage }; |
142 | 140 | } |
143 | | - |
144 | | -/** Compatibility wrapper around the shared model-row builder. */ |
145 | | -export function toModelRow(params: Parameters<typeof toModelRowBase>[0]): ModelRow { |
146 | | -return toModelRowBase(params); |
147 | | -} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。