fix: 保留 Aipod 服务端默认值
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user