fix: append filtered registry rows in broad model lists · openclaw/openclaw@27a8875
shakkernerd
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import type { Api, Model } from "@mariozechner/pi-ai"; |
1 | 2 | import type { ModelRegistry } from "@mariozechner/pi-coding-agent"; |
2 | 3 | import { parseModelRef } from "../../agents/model-selection.js"; |
3 | 4 | import type { RuntimeEnv } from "../../runtime.js"; |
@@ -76,6 +77,7 @@ export async function modelsListCommand(
|
76 | 77 | const agentDir = resolveOpenClawAgentDir(); |
77 | 78 | |
78 | 79 | let modelRegistry: ModelRegistry | undefined; |
| 80 | +let registryModels: Model<Api>[] = []; |
79 | 81 | let discoveredKeys = new Set<string>(); |
80 | 82 | let availableKeys: Set<string> | undefined; |
81 | 83 | let availabilityErrorMessage: string | undefined; |
@@ -97,6 +99,7 @@ export async function modelsListCommand(
|
97 | 99 | normalizeModels: Boolean(providerFilter), |
98 | 100 | }); |
99 | 101 | modelRegistry = loaded.registry; |
| 102 | +registryModels = loaded.models; |
100 | 103 | discoveredKeys = loaded.discoveredKeys; |
101 | 104 | availableKeys = loaded.availableKeys; |
102 | 105 | availabilityErrorMessage = loaded.availabilityErrorMessage; |
@@ -141,6 +144,7 @@ export async function modelsListCommand(
|
141 | 144 | rows, |
142 | 145 | context: rowContext, |
143 | 146 | modelRegistry, |
| 147 | + registryModels, |
144 | 148 | sourcePlan, |
145 | 149 | }); |
146 | 150 | if (initialAppend.requiresRegistryFallback) { |
@@ -157,6 +161,7 @@ export async function modelsListCommand(
|
157 | 161 | rows, |
158 | 162 | context: rowContext, |
159 | 163 | modelRegistry, |
| 164 | + registryModels, |
160 | 165 | sourcePlan: sourcePlanModule.createRegistryModelListSourcePlan(), |
161 | 166 | }); |
162 | 167 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。