fix: 保留 Aipod 服务端默认值

This commit is contained in:
Codex
2026-07-12 17:58:20 +02:00
parent 3d4e5c3748
commit 59b3821956
2 changed files with 25 additions and 1 deletions
+13 -1
View File
@@ -703,8 +703,20 @@ export async function sessionRunBodyFromArgs(sessionId: string, args: string[],
export function normalizeAipodRenderedQueueTask(task: Record<string, unknown>, args: string[], aipod: string): Record<string, unknown> {
if (Object.keys(task).length === 0) return task;
const backendProfile = stringOrNull(task.backendProfile);
if (backendProfile !== null) {
const sessionPolicy = readAgentRunClientConfig().client.sessionPolicy;
const policyTarget = resolveAgentRunSessionPolicyTarget();
if (agentRunProviderCredentialRefs(policyTarget.spec, backendProfile).length === 0) {
throw new AgentRunRestError("validation-failed", `${policyTarget.configPath} has no providerCredential Secret binding for AipodSpec ${aipod} backendProfile=${backendProfile} on ${policyTarget.spec.nodeId}/${policyTarget.spec.lane}`);
}
const basePolicy = record(task.executionPolicy);
defaultAgentRunExecutionPolicy(backendProfile, sessionPolicy, policyTarget, {
includeToolCredentials: true,
basePolicy,
});
}
void args;
void aipod;
return { ...task };
}