feat: add ofcx-go provider profile to cloud-api

Add ofcx-go (DeepSeek V4 Flash via OpenCode Zen Go) to the public provider
profiles list and wire its bridge summary to the existing hwlab-deepseek-proxy
Moon Bridge service. This allows cloud-api to accept ofcx-go as a valid
provider profile for Code Agent sessions and delegate to AgentRun.

Changes:
- Add ofcx-go to publicProfiles Set in provider-profile-management.ts
- Add opencodeZenGoBridgeSummary() returning the shared Moon Bridge URL
- Wire ofcx-go profile to bridge summary in normalizeProfileData()

The Moon Bridge side (opencode provider + deepseek-v4-flash route) was
already deployed in commit c19b6ef5. This commit completes the cloud-api
routing for the ofcx-go profile.

Refs pikasTech/HWLAB#1034
This commit is contained in:
Codex Agent
2026-06-07 20:43:43 +08:00
parent c19b6ef529
commit 7a7dac50a8
+16 -1
View File
@@ -5,7 +5,7 @@ const DEFAULT_AGENTRUN_MGR_URL = "http://agentrun-mgr.agentrun-v01.svc.cluster.l
const DEFAULT_AGENTRUN_HOST = "agentrun-mgr.agentrun-v01.svc.cluster.local";
const DEFAULT_TIMEOUT_MS = 30000;
const publicProfiles = new Set(["deepseek", "codex-api", "minimax-m3"]);
const publicProfiles = new Set(["deepseek", "codex-api", "minimax-m3", "ofcx-go"]);
export async function handleProviderProfilesHttp(request, response, url, options = {}) {
try {
@@ -205,6 +205,7 @@ function normalizeProfileData(item) {
copy.profile = "codex-api";
}
if (copy.profile === "deepseek") copy.bridge = deepseekBridgeSummary();
if (copy.profile === "ofcx-go") copy.bridge = opencodeZenGoBridgeSummary();
copy.valuesPrinted = false;
return copy;
}
@@ -299,6 +300,20 @@ function deepseekBridgeSummary() {
};
}
function opencodeZenGoBridgeSummary() {
return {
kind: "moon-bridge",
route: "HWLAB Moon Bridge -> OpenCode Zen Go Chat Completions",
serviceUrl: "http://hwlab-deepseek-proxy.hwlab-v02.svc.cluster.local:4000/v1",
responsesPath: "/v1/responses",
model: "deepseek-v4-flash",
upstreamProvider: "opencode",
upstreamProtocol: "openai-chat",
forbiddenHosts: ["hyueapi.com"],
valuesPrinted: false
};
}
function resolveAgentRunManagerUrl(env) {
const raw = text(env.AGENTRUN_MGR_URL) || text(env.HWLAB_CODE_AGENT_AGENTRUN_MGR_URL) || text(env.AGENTRUN_MANAGER_URL) || DEFAULT_AGENTRUN_MGR_URL;
let parsed;