fix: accept gpt pika web provider selection

This commit is contained in:
root
2026-07-09 11:29:26 +02:00
parent 07d7af8b56
commit 9c1caa7da2
+3 -2
View File
@@ -52,10 +52,11 @@ const DEFAULT_AGENTRUN_PROJECTION_RESUME_JITTER_MS = 15000;
const DEFAULT_AGENTRUN_PROJECTION_RESUME_FAILURE_BACKOFF_MS = 120000;
const CODE_AGENT_TERMINAL_STATUSES = new Set(["completed", "failed", "blocked", "timeout", "cancelled", "canceled"]);
const CODE_AGENT_PROVIDER_PROFILE_ALIASES = Object.freeze({ codex: "codex-api" });
const CODE_AGENT_PROVIDER_PROFILE_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/u;
const CODE_AGENT_PROVIDER_PROFILE_ID_PATTERN = /^[a-z0-9][a-z0-9.-]{0,63}$/u;
const CODE_AGENT_PROVIDER_PROFILE_LABELS = Object.freeze({
"deepseek": "DeepSeek",
"codex-api": "Codex API",
"gpt.pika": "gpt.pika",
"minimax-m3": "MiniMax-M3 via AgentRun",
"runtime-default": "运行默认"
});
@@ -765,7 +766,7 @@ function localCloudApiUrl(env = process.env) {
}
function codeAgentProviderProfileEnv(env = process.env, params = {}) {
const profile = normalizeCodeAgentProviderProfile(params.providerProfile ?? params.codeAgentProviderProfile ?? env.HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE);
const profile = normalizeCodeAgentProviderProfile(params.providerProfile ?? params.codeAgentProviderProfile ?? params.provider ?? env.HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE);
if (profile === "runtime-default") return env;
const overlay = { ...env };
overlay.HWLAB_CODE_AGENT_SELECTED_PROVIDER_PROFILE = profile;