Merge pull request #260 from pikasTech/feat/provider-profile-model-validate
Pipelines as Code CI / agentrun-nc01-v02-ci-4466ba6eb6b63a58a4287edc6055e1474473b410 Success

Preserve provider validation model in status
This commit is contained in:
Lyon
2026-07-09 20:12:09 +08:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -302,15 +302,18 @@ export async function getProviderProfileValidation(profileValue: string, validat
const runId = session?.lastRunId ?? session?.activeRunId;
const commandId = session?.lastCommandId ?? session?.activeCommandId;
if (!runId || !commandId) throw new AgentRunError("schema-invalid", `validation ${validationId} was not found`, { httpStatus: 404 });
const [result, jobs, events] = await Promise.all([
const [result, jobs, events, command] = await Promise.all([
buildRunResult(options.store, runId, commandId),
options.store.listRunnerJobs(runId, commandId),
options.store.listEvents(runId, 0, 500),
options.store.getCommand(commandId),
]);
const status = validationStatus(result as JsonRecord);
const commandPayload = asOptionalRecord(command?.payload);
return {
validationId,
profile,
model: optionalModel(commandPayload?.model),
runId,
commandId,
status,
@@ -363,6 +363,7 @@ process.exit(1);
await client.patch(`/api/v1/commands/${encodeURIComponent(String(validation.commandId))}/status`, { terminalStatus: "completed", failureKind: null, failureMessage: null });
const finalValidation = await client.get(`/api/v1/provider-profiles/deepseek/validations/${encodeURIComponent(validationId)}`) as JsonRecord;
assert.equal(finalValidation.status, "completed");
assert.equal(finalValidation.model, "deepseek-chat");
assert.equal(JSON.stringify(finalValidation).includes(secretText), false);
assertNoSecretLeak(finalValidation);
return { name: "provider-profile-management", tests: ["provider-profiles-list-redacted", "provider-profile-config", "provider-profile-set-key-redacted", "provider-profile-set-auth-json-redacted", "provider-profile-secret-replace-annotation-cleanup", "provider-profile-secret-create-upsert", "provider-profile-config-only-create", "provider-profile-dsflash-go-model-catalog", "provider-profile-dynamic-slug-roundtrip", "backends-list-dynamic-profile", "provider-profile-remove-builtin", "provider-profile-remove-dynamic-slug", "provider-profile-deepseek-moon-bridge", "provider-profile-manager-secret-rbac", "provider-profile-validation-runner-job"] };