fix: ignore moved child rows in subagent status

This commit is contained in:
Tak Hoffman
2026-03-24 18:56:55 -05:00
parent 3664c2ce46
commit 639706f298
6 changed files with 91 additions and 4 deletions

View File

@@ -27,7 +27,10 @@ async function readGeneratedProvider(providerKey: string) {
return parsed.providers[providerKey];
}
async function expectGeneratedProvider(providerKey: string, params: { ids: string[]; baseUrl?: string }) {
async function expectGeneratedProvider(
providerKey: string,
params: { ids: string[]; baseUrl?: string },
) {
const provider = await readGeneratedProvider(providerKey);
expect(provider?.models?.map((model) => model.id)).toEqual(params.ids);
if (params.baseUrl !== undefined) {

View File

@@ -1,5 +1,6 @@
import type { OpenClawConfig } from "../config/config.js";
import { coerceSecretRef, resolveSecretInputRef } from "../config/types.secrets.js";
import { normalizeGoogleApiBaseUrl } from "../infra/google-api-base-url.js";
import { createSubsystemLogger } from "../logging/subsystem.js";
import {
buildAnthropicVertexProvider,
@@ -17,7 +18,6 @@ import {
} from "../plugin-sdk/provider-catalog.js";
import { isRecord } from "../utils.js";
import { normalizeOptionalSecretInput } from "../utils/normalize-secret-input.js";
import { normalizeGoogleApiBaseUrl } from "../infra/google-api-base-url.js";
import { hasAnthropicVertexAvailableAuth } from "./anthropic-vertex-provider.js";
import { ensureAuthProfileStore, listProfilesForProvider } from "./auth-profiles.js";
import { discoverBedrockModels } from "./bedrock-discovery.js";

View File

@@ -342,7 +342,7 @@ describe("resolveModel", () => {
},
},
},
} as OpenClawConfig;
} as unknown as OpenClawConfig;
const result = resolveModelForTest("google", "gemini-2.5-pro", "/tmp/agent", cfg);

View File

@@ -2,6 +2,7 @@ import type { Api, Model } from "@mariozechner/pi-ai";
import type { AuthStorage, ModelRegistry } from "@mariozechner/pi-coding-agent";
import type { OpenClawConfig } from "../../config/config.js";
import type { ModelDefinitionConfig } from "../../config/types.js";
import { normalizeGoogleApiBaseUrl } from "../../infra/google-api-base-url.js";
import {
clearProviderRuntimeHookCache,
prepareProviderDynamicModel,
@@ -19,7 +20,6 @@ import {
shouldSuppressBuiltInModel,
} from "../model-suppression.js";
import { discoverAuthStorage, discoverModels } from "../pi-model-discovery.js";
import { normalizeGoogleApiBaseUrl } from "../../infra/google-api-base-url.js";
import { normalizeResolvedProviderModel } from "./model.provider-normalization.js";
function normalizeGoogleGenerativeAiBaseUrl(baseUrl: string | undefined): string | undefined {