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.
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 uses4intentional runtime bridge cases
The heart of the change is src/api/cloud/proxy.ts:55-93.
2Before / after: one helper became two lanes
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
| Feature | After path | Source proof |
|---|---|---|
| Follow-up chat message | POST /api/v1/app-conversations/{id}/send-message | conversation-service.api.ts:229-238 |
| Event count | GET /api/v1/conversation/{id}/events/count | event-service.api.ts:63-67 |
| Event search | GET /api/v1/conversation/{id}/events/search | event-service.api.ts:117-122 |
| Runtime metrics lookup | batch app conversation lookup, then normalize metrics | agent-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 activation | org-scoped /api/organizations/{orgId}/profiles, fallback /api/v1/settings/profiles | profiles-service.api.ts:33-140 |
4The legacy bridge is now small enough to audit
confirmationRespond to confirmation prompts
terminalRead bash output pages
terminalExecute an ad-hoc command
file bytesDownload binary files
⚠ 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 behavior | Where it landed after merge |
|---|---|
| Cloud profile list/get/save/delete/rename/activate | cloud/profiles-service.api.ts:48-140 |
| Home-page cloud profile activation | switchProfile():680-686 |
| Running cloud conversation profile switch | switchProfile():688-693 |
| Running ACP model switch | switchAcpModel():742-747 |
6Proof trail and current PR status
| Check | Result |
|---|---|
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.ts | 43 tests passed |
npm run typecheck | passed |
- proxy.test.ts:89-152 proves direct cloud calls do not post to
/api/cloud-proxyand legacy runtime calls do. - profiles-service.test.ts:46-170 covers org-scoped and fallback cloud profile routes.
- agent-server-conversation-service.test.ts:821-842 covers cloud
switch_profile.
⚠ 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(-)