feat: add ofcx-go model and provider mappings to agentrun adapter

ofcx-go uses deepseek-v4-flash model (not deepseek-chat) and identifies
as provider ofcx-go (not deepseek). Without these mappings, the adapter
falls back to deepseek defaults, causing ofcx-go sessions to route through
the wrong model.

Refs pikasTech/HWLAB#1034
This commit is contained in:
Codex Agent
2026-06-07 22:28:13 +08:00
parent a592bd9ad0
commit d3a9f592c2
@@ -1918,12 +1918,14 @@ function requireAgentRunSourceCommit(env) {
function modelForBackendProfile(profile, env = process.env) {
if (profile === "codex") return firstNonEmpty(env.HWLAB_CODE_AGENT_CODEX_API_MODEL, env.HWLAB_CODE_AGENT_MODEL, "gpt-5.5");
if (profile === "minimax-m3") return firstNonEmpty(env.HWLAB_CODE_AGENT_MINIMAX_M3_MODEL, "MiniMax-M3");
if (profile === "ofcx-go") return firstNonEmpty(env.HWLAB_CODE_AGENT_OFCX_GO_MODEL, "deepseek-v4-flash");
return firstNonEmpty(env.HWLAB_CODE_AGENT_DEEPSEEK_MODEL, "deepseek-chat");
}
function providerForBackendProfile(profile) {
if (profile === "codex") return "codex-api";
if (profile === "minimax-m3") return "minimax-m3";
if (profile === "ofcx-go") return "ofcx-go";
return "deepseek";
}