Revert "chore: bump agent-server → 1.28.1, automation → 1.0.0a9, extensions → 0.4.1 (#1315)" (#1318)

This reverts commit 1917b5d39fbf09dc51213b4b484698fe394314c7.

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2026-06-11 21:28:04 +00:00
committed by GitHub
co-authored by openhands
parent 15a52fea75
commit 8071edf72a
10 changed files with 34 additions and 136 deletions
@@ -70,46 +70,6 @@ async function getProfileConfig(
return (data.config ?? {}) as Record<string, unknown>;
}
/**
* Assert that a proxy profile config is valid after a Basic-tab re-save.
*
* Agent-server ≥1.28 normalises `litellm_proxy/*` → `openhands/*` on storage
* and manages the proxy URL internally (returning base_url:null). Both
* representations are accepted here. The original issue #1146 regression
* (litellm_proxy/* with null base_url) is still guarded explicitly.
*/
function assertProxyProfileConfig(
config: Record<string, unknown>,
litellmProxyModel: string,
openHandsEquivalentModel: string,
proxyBaseUrl: string,
) {
const model = config.model as string | null | undefined;
const baseUrl = config.base_url as string | null | undefined;
const isLitellmForm =
typeof model === "string" && model.startsWith("litellm_proxy/");
const isOpenHandsForm =
typeof model === "string" && model.startsWith("openhands/");
expect(
isLitellmForm || isOpenHandsForm,
`model must be ${litellmProxyModel} or ${openHandsEquivalentModel}; got: ${model}`,
).toBe(true);
if (isLitellmForm) {
// A litellm_proxy/* profile without the proxy URL is stranded (issue #1146).
// The frontend must always inject the URL when saving from the Basic tab.
expect(
baseUrl,
"base_url must be the All-Hands proxy URL for litellm_proxy/* profiles " +
"(dropping it strands the profile — issue #1146)",
).toBe(proxyBaseUrl);
}
// For openhands/* (agent-server ≥1.28 rewrite), null base_url is correct;
// the server routes the request through the proxy internally.
}
test.describe.configure({ mode: "serial" });
// ═══════════════════════════════════════════════════════════════════════
@@ -397,13 +357,8 @@ test.describe("litellm_proxy proxy base_url preservation", () => {
// Simulates the state the SDK persists after onboarding through the
// OpenHands provider: openhands/* is rewritten to litellm_proxy/* and
// paired with the All-Hands proxy base URL.
//
// Agent-server ≥1.28 additionally normalises litellm_proxy/* back to
// openhands/* on storage and manages the proxy URL internally (returning
// base_url:null). The assertions below accept both representations.
const PROXY_PROFILE = "proxy-base-url-test";
const LITELLM_PROXY_MODEL = "litellm_proxy/claude-opus-4-8";
const OPENHANDS_EQUIVALENT_MODEL = "openhands/claude-opus-4-8";
const OPENHANDS_PROXY_BASE_URL = "https://llm-proxy.app.all-hands.dev/";
test.beforeEach(async ({ page }) => {
@@ -496,15 +451,15 @@ test.describe("litellm_proxy proxy base_url preservation", () => {
await waitForTestId(page, "add-llm-profile");
});
// ── Verify: the proxy setup survived the Basic-tab save ──
await test.step("verify proxy setup is preserved after save", async () => {
// ── Verify: the proxy base_url survived the Basic-tab save ──
await test.step("verify base_url is preserved after save", async () => {
const config = await getProfileConfig(request, PROXY_PROFILE);
assertProxyProfileConfig(
config,
LITELLM_PROXY_MODEL,
OPENHANDS_EQUIVALENT_MODEL,
OPENHANDS_PROXY_BASE_URL,
);
expect(
config.base_url,
"base_url must be the All-Hands proxy URL after a Basic-tab re-save; " +
"dropping it strands the profile (issue #1146)",
).toBe(OPENHANDS_PROXY_BASE_URL);
expect(config.model).toBe(LITELLM_PROXY_MODEL);
});
// ── Verify: the profile also looks correct after a page reload ──
@@ -514,12 +469,8 @@ test.describe("litellm_proxy proxy base_url preservation", () => {
// Re-read via API to confirm persistence is durable
const config = await getProfileConfig(request, PROXY_PROFILE);
assertProxyProfileConfig(
config,
LITELLM_PROXY_MODEL,
OPENHANDS_EQUIVALENT_MODEL,
OPENHANDS_PROXY_BASE_URL,
);
expect(config.base_url).toBe(OPENHANDS_PROXY_BASE_URL);
expect(config.model).toBe(LITELLM_PROXY_MODEL);
});
});
});