← Home
OpenHands/agent-canvas PR #1561 · show-me

Cloud calls now say whether they hit the app backend or a sandbox runtime

PR #1561 replaces one overloaded helper with two named paths: callCloudApi() for first-class cloud/app backend routes, and callLegacyRuntimeCloudProxy() for the few endpoints that still must tunnel through a running sandbox agent-server.

Head after merging main: c38fe600. Base used for before links: abd80a17. Prepared by OpenHands (AI) on behalf of the user.

1The decision: split the route by trust boundary

★ Key takeaway: the old name hid two different network stories. The new names make audits easier: app-server APIs go straight to backend.host; runtime-only calls are visibly deprecated and still go through local /api/cloud-proxy.
30files in PR diff
+376 / −434post-merge diff
0remaining prod callCloudProxy uses
4intentional runtime bridge cases

The heart of the change is src/api/cloud/proxy.ts:55-93.

2Before / after: one helper became two lanes

Before and after network routingBefore callCloudProxy selected direct or bridged transport by hostOverride. After there are separate helpers for app APIs and runtime proxy calls.Before: overloaded helpercloud serviceany call sitecallCloudProxy()branches on hostOverridecloud app backend/api/cloud-proxythen sandbox runtimeAfter: explicit lanesapp API servicecallCloudApi()direct to backend.hostcloud app backendruntime-only servicecallLegacyRuntimeCloudProxy()local proxy → runtime
Fig 1 · The delta is that the call site now names which side of the cloud/runtime boundary it is crossing.

Before: callCloudProxy at origin/main proxy.ts:74-118. After: callCloudApi and callLegacyRuntimeCloudProxy at head proxy.ts:55-93.

3The migrated paths now use first-class app APIs

FeatureAfter pathSource proof
Follow-up chat messagePOST /api/v1/app-conversations/{id}/send-messageconversation-service.api.ts:229-238
Event countGET /api/v1/conversation/{id}/events/countevent-service.api.ts:63-67
Event searchGET /api/v1/conversation/{id}/events/searchevent-service.api.ts:117-122
Runtime metrics lookupbatch app conversation lookup, then normalize metricsagent-server-conversation-service.api.ts:563-584
Git changes / diff/api/v1/app-conversations/{id}/git/...agent-server-git-service.api.ts:51-105
Cloud profile CRUD and activationorg-scoped /api/organizations/{orgId}/profiles, fallback /api/v1/settings/profilesprofiles-service.api.ts:33-140

4The legacy bridge is now small enough to audit

confirmationRespond to confirmation prompts

event-service.api.ts:34-41

terminalRead bash output pages

bash-service.api.ts:98-105

terminalExecute an ad-hoc command

agent-server-runtime-service.ts:35-45

file bytesDownload binary files

agent-server-runtime-service.ts:69-84

⚠ Boundary: this PR does not eliminate the runtime bridge. It makes the remaining bridge calls visible and explicitly deprecated so future app-server routes can replace them one by one.

5Main merge note: profile APIs joined the new lane

After merging main, the branch picked up cloud LLM profile management and per-conversation profile switching. Those new code paths were resolved onto callCloudApi(), not back onto the removed overloaded helper.

New main behaviorWhere it landed after merge
Cloud profile list/get/save/delete/rename/activatecloud/profiles-service.api.ts:48-140
Home-page cloud profile activationswitchProfile():680-686
Running cloud conversation profile switchswitchProfile():688-693
Running ACP model switchswitchAcpModel():742-747

6Proof trail and current PR status

CheckResult
npm test -- --run __tests__/api/cloud/profiles-service.test.ts __tests__/api/cloud/organization-me.test.ts __tests__/api/agent-server-conversation-service.test.ts __tests__/api/cloud/proxy.test.ts43 tests passed
npm run typecheckpassed
⚠ Babysit note: the PR description validator currently asks for the human-only HUMAN: section and human-tested checkbox. Repository rules reserve those fields for a human contributor, so an agent should not fill or check them.
Collapsed raw diff summary
git diff --shortstat origin/main...HEAD
30 files changed, 376 insertions(+), 434 deletions(-)