@@ -43,7 +43,11 @@ import {
|
43 | 43 | isCloudflareOrHtmlErrorPage, |
44 | 44 | isRateLimitErrorMessage, |
45 | 45 | } from "./pi-embedded-helpers/errors.js"; |
46 | | -import { discoverAuthStorage, discoverModels } from "./pi-model-discovery.js"; |
| 46 | +import { |
| 47 | +discoverAuthStorage, |
| 48 | +discoverModels, |
| 49 | +normalizeDiscoveredPiModel, |
| 50 | +} from "./pi-model-discovery.js"; |
47 | 51 | |
48 | 52 | const LIVE = isLiveTestEnabled(); |
49 | 53 | const DIRECT_ENABLED = Boolean(process.env.OPENCLAW_LIVE_MODELS?.trim()); |
@@ -757,7 +761,9 @@ describeLive("live models (profile keys)", () => {
|
757 | 761 | }); |
758 | 762 | logProgress("[live-models] loading model registry"); |
759 | 763 | const models = await withLiveStageTimeout( |
760 | | -Promise.resolve().then(() => discoverModels(authStorage, agentDir).getAll()), |
| 764 | +Promise.resolve().then(() => |
| 765 | +discoverModels(authStorage, agentDir, { normalizeModels: false }).getAll(), |
| 766 | +), |
761 | 767 | "[live-models] load model registry", |
762 | 768 | ); |
763 | 769 | |
@@ -825,7 +831,10 @@ describeLive("live models (profile keys)", () => {
|
825 | 831 | }); |
826 | 832 | continue; |
827 | 833 | } |
828 | | -candidates.push({ model, apiKeyInfo }); |
| 834 | +candidates.push({ |
| 835 | +model: normalizeDiscoveredPiModel(model, agentDir), |
| 836 | + apiKeyInfo, |
| 837 | +}); |
829 | 838 | } catch (err) { |
830 | 839 | skipped.push({ model: id, reason: String(err) }); |
831 | 840 | } |
|