Skip to content

🙌 OpenHands: AI-Driven Development

fix(onboarding): preselect OpenHands LLM provider after picking OpenHands agent (#16531)

Juan Pedro Michelini Jorgefa21e01a6c7a
diff --git a/__tests__/components/onboarding/onboarding-modal.test.tsx b/__tests__/components/onboarding/onboarding-modal.test.tsx
index e28041481c..260805e7d6 100644
--- a/__tests__/components/onboarding/onboarding-modal.test.tsx
+++ b/__tests__/components/onboarding/onboarding-modal.test.tsx
@@ -642,7 +642,7 @@ describe("OnboardingModal", () => {
);
});
- it("pre-fills the LLM step with OpenAI GPT-5.5", () => {
+ it("pre-fills the LLM step with the OpenHands default model", () => {
renderModal();
expect(llmSettingsScreenMock).toHaveBeenCalledTimes(1);
diff --git a/src/components/features/onboarding/steps/setup-llm-step.tsx b/src/components/features/onboarding/steps/setup-llm-step.tsx
index 86d2e02ca5..20c9ea6c20 100644
--- a/src/components/features/onboarding/steps/setup-llm-step.tsx
+++ b/src/components/features/onboarding/steps/setup-llm-step.tsx
@@ -16,13 +16,16 @@ interface SetupLlmStepProps {
}
/**
- * Pre-fills the LLM form with the OpenAI GPT-5.5 model. The SDK's
- * bare default model is `gpt-5.5`; Canvas stores provider-qualified
- * LiteLLM model ids, so the onboarding override uses this OpenAI-prefixed
- * model id. Keeping this as an explicit override marks the model dirty so
- * the Next button persists the suggested default immediately.
+ * Pre-fills the LLM form with the OpenHands provider's free default model
+ * (`openhands/glm-5.2`), matching `DEFAULT_SETTINGS.llm_model`. The OpenHands
+ * provider is the agent the user just selected, so the onboarding override
+ * keeps the LLM provider aligned with that choice rather than silently
+ * switching to OpenAI. Canvas stores provider-qualified LiteLLM model ids,
+ * so the override uses this OpenHands-prefixed model id, and keeping it as an
+ * explicit override marks the model dirty so the Next button persists the
+ * suggested default immediately.
*/
-export const ONBOARDING_DEFAULT_LLM_MODEL = "openai/gpt-5.5";
+export const ONBOARDING_DEFAULT_LLM_MODEL = "openhands/glm-5.2";
/**
* Step 2: embed the LLM settings form. The screen runs in `embedded`
@@ -39,7 +42,7 @@ export const ONBOARDING_DEFAULT_LLM_MODEL = "openai/gpt-5.5";
* Note: returning Cloud users who already have an LLM configured are
* intercepted upstream by `OnboardingHost`, so they never reach this
* step. Users who do reach it are first-time installs (Cloud or Local)
- * who want the OpenAI/GPT-5.5 default pre-filled.
+ * who want the OpenHands default pre-filled.
*/
export function SetupLlmStep({ onBack, onNext }: SetupLlmStepProps) {
const { t } = useTranslation("openhands");
diff --git a/src/i18n/translation.json b/src/i18n/translation.json
index dd3305d434..88e85852d0 100644
--- a/src/i18n/translation.json
+++ b/src/i18n/translation.json
@@ -31127,21 +31127,21 @@
"uk": "Налаштуйте свій LLM"
},
"ONBOARDING$LLM_SUBTITLE": {
- "en": "Pick a provider and model. We've pre-selected OpenAI GPT-5.5.",
- "ja": "プロバイダーとモデルを選択してください。OpenAI GPT-5.5 を事前に選択しています。",
- "zh-CN": "选择提供商和模型。我们已为你预先选择 OpenAI GPT-5.5。",
- "zh-TW": "選擇供應商與模型。我們已預先選好 OpenAI GPT-5.5。",
- "ko-KR": "공급자와 모델을 선택하세요. 기본값으로 OpenAI GPT-5.5가 선택되어 있습니다.",
- "no": "Velg en leverandør og modell. Vi har forhåndsvalgt OpenAI GPT-5.5.",
- "ar": "اختر مزوّدًا ونموذجًا. لقد اخترنا مسبقًا OpenAI GPT-5.5.",
- "de": "Wählen Sie Anbieter und Modell. Wir haben OpenAI GPT-5.5 vorausgewählt.",
- "fr": "Choisissez un fournisseur et un modèle. Nous avons présélectionné OpenAI GPT-5.5.",
- "it": "Scegli un provider e un modello. Abbiamo preselezionato OpenAI GPT-5.5.",
- "pt": "Escolha um provedor e modelo. Já selecionamos o OpenAI GPT-5.5.",
- "es": "Elige un proveedor y modelo. Hemos preseleccionado OpenAI GPT-5.5.",
- "ca": "Trieu un proveïdor i model. Hem preseleccionat OpenAI GPT-5.5.",
- "tr": "Bir sağlayıcı ve model seçin. OpenAI GPT-5.5'i önceden seçtik.",
- "uk": "Виберіть провайдера та модель. OpenAI GPT-5.5 уже обрано."
+ "en": "Pick a provider and model. We've pre-selected OpenHands GLM-5.2.",
+ "ja": "プロバイダーとモデルを選択してください。OpenHands GLM-5.2 を事前に選択しています。",
+ "zh-CN": "选择提供商和模型。我们已为你预先选择 OpenHands GLM-5.2。",
+ "zh-TW": "選擇供應商與模型。我們已預先選好 OpenHands GLM-5.2。",
+ "ko-KR": "공급자와 모델을 선택하세요. 기본값으로 OpenHands GLM-5.2가 선택되어 있습니다.",
+ "no": "Velg en leverandør og modell. Vi har forhåndsvalgt OpenHands GLM-5.2.",
+ "ar": "اختر مزوّدًا ونموذجًا. لقد اخترنا مسبقًا OpenHands GLM-5.2.",
+ "de": "Wählen Sie Anbieter und Modell. Wir haben OpenHands GLM-5.2 vorausgewählt.",
+ "fr": "Choisissez un fournisseur et un modèle. Nous avons présélectionné OpenHands GLM-5.2.",
+ "it": "Scegli un provider e un modello. Abbiamo preselezionato OpenHands GLM-5.2.",
+ "pt": "Escolha um provedor e modelo. Já selecionamos o OpenHands GLM-5.2.",
+ "es": "Elige un proveedor y modelo. Hemos preseleccionado OpenHands GLM-5.2.",
+ "ca": "Trieu un proveïdor i model. Hem preseleccionat OpenHands GLM-5.2.",
+ "tr": "Bir sağlayıcı ve model seçin. OpenHands GLM-5.2'i önceden seçtik.",
+ "uk": "Виберіть провайдера та модель. OpenHands GLM-5.2 уже обрано."
},
"ONBOARDING$HELLO_TITLE": {
"en": "Say hello 👋",
diff --git a/tests/e2e/mock-llm/onboarding/mock-llm-onboarding-regressions.spec.ts b/tests/e2e/mock-llm/onboarding/mock-llm-onboarding-regressions.spec.ts
index 2d5dc00f7b..a6c2f5edb0 100644
--- a/tests/e2e/mock-llm/onboarding/mock-llm-onboarding-regressions.spec.ts
+++ b/tests/e2e/mock-llm/onboarding/mock-llm-onboarding-regressions.spec.ts
@@ -61,11 +61,10 @@ test.describe("onboarding recent regressions", () => {
});
// Regression coverage for #1077 / PR #1089: first-run LLM setup
- // should not default users to the OpenHands provider.
+ // should default users to the OpenHands provider, matching the agent
+ // selected on the previous step.
- test("defaults the LLM setup step to OpenAI GPT-5.5", async ({
- page,
- }) => {
+ test("defaults the LLM setup step to OpenHands GLM-5.2", async ({ page }) => {
await showOnboarding(page, {
apiKey: SESSION_API_KEY,
beforeGoto: async () => {
@@ -95,18 +94,18 @@ test.describe("onboarding recent regressions", () => {
await expect(
providerInput,
- "first-run onboarding should default to the OpenAI provider",
- ).toHaveValue("OpenAI", { timeout: 10_000 });
+ "first-run onboarding should default to the OpenHands provider",
+ ).toHaveValue("OpenHands", { timeout: 10_000 });
// The model input displays the model ID without the provider prefix.
await expect(
modelInput,
- "first-run onboarding should default to GPT-5.5",
- ).toHaveValue("gpt-5.5", {
+ "first-run onboarding should default to GLM-5.2",
+ ).toHaveValue("glm-5.2", {
timeout: 10_000,
});
await expect(
page.getByTestId("openhands-account-help"),
- "OpenHands account helper should stay hidden for OpenAI defaults",
- ).toHaveCount(0);
+ "OpenHands account helper should be visible for OpenHands defaults",
+ ).toBeVisible();
});
});
diff --git a/tests/e2e/support/onboarding-helpers.ts b/tests/e2e/support/onboarding-helpers.ts
index 7a6be8604b..2b10597497 100644
--- a/tests/e2e/support/onboarding-helpers.ts
+++ b/tests/e2e/support/onboarding-helpers.ts
@@ -21,7 +21,7 @@ export async function routeOnboardingLlmCatalog(page: Page) {
models: {
anthropic: ["claude-opus-4-8"],
openai: ["gpt-5.5"],
- openhands: ["claude-opus-4-5-20251101"],
+ openhands: ["claude-opus-4-5-20251101", "glm-5.2"],
},
}),
});
@@ -36,6 +36,7 @@ export async function routeOnboardingLlmCatalog(page: Page) {
"anthropic/claude-opus-4-8",
"openai/gpt-5.5",
"openhands/claude-opus-4-5-20251101",
+ "openhands/glm-5.2",
],
}),
});