Skip to content

Commit c42c954

Browse files
ethanyhouCopilot
andcommitted
test: clarify Display Name field as optional in BYOK model dialog and update test plan to reflect behavior
Co-authored-by: Copilot <copilot@github.com>
1 parent 345bd92 commit c42c954

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

  • com.microsoft.copilot.eclipse.swtbot.test/test-plans/byok
  • com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences

com.microsoft.copilot.eclipse.swtbot.test/test-plans/byok/byok.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,13 @@ Not exercised in this plan (separate scenarios):
289289
1. Open the BYOK page, select the **OpenAI** provider node, and click
290290
**Add Model…**.
291291
2. Verify the **Add OpenAI Models** dialog opens with fields **Model
292-
ID** (required), **Display Name** (required), **Support Vision**
292+
ID** (required), **Display Name** (optional), **Support Vision**
293293
checkbox, and **Support Tool Calling** checkbox. There is no
294294
deployment-URL or API-key field for OpenAI (those are Azure-only).
295+
The **Add** button stays disabled until **Model ID** is non-blank;
296+
leaving **Display Name** empty does **not** block the **Add** button
297+
(validation only requires Model ID for non-Azure providers, and
298+
additionally Deployment URL + API Key for Azure).
295299
3. Enter a model id (e.g. `gpt-4o-mini-test`), a display name (e.g.
296300
`My Custom Model`), leave the capability checkboxes at their defaults,
297301
and click **Add**.
@@ -304,15 +308,25 @@ Not exercised in this plan (separate scenarios):
304308
for it (custom models can be removed).
305309
7. Select any non-custom model in the same provider and verify **Remove
306310
Model** is **disabled** (default models cannot be removed).
311+
8. Re-open **Add Model…**, enter only a model id (e.g.
312+
`gpt-4o-mini-blank-name`), leave **Display Name** empty, and click
313+
**Add**. Verify the model is created and rendered in the tree using
314+
the **model id** as its display name (the dialog falls back to the
315+
trimmed model id when display name is blank — see
316+
`AddByokModelDialog#buildModel`).
307317

308318
#### Expected Result
309319
- The custom model is persisted, appears in the tree, and is selectable
310320
from the chat model picker after this point.
311321
- The OpenAI node count suffix updates to reflect the new model count.
322+
- When **Display Name** is left blank, the saved model's displayed name
323+
equals the trimmed **Model ID**.
312324

313325
#### 📸 Key Screenshots
314326
- [ ] **Add OpenAI Models dialog** with required fields filled.
315327
- [ ] **Custom model in tree** showing the new display name.
328+
- [ ] **Custom model in tree (blank display name)** — node label equals
329+
the model id.
316330

317331
---
318332

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/AddByokModelDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected Control createDialogArea(Composite parent) {
8989
createAzureSpecificFields(container);
9090
}
9191

92-
// Display Name (optional for all providers)
92+
// Display Name
9393
new Label(container, SWT.NONE).setText(Messages.preferences_page_byok_addModel_displayName);
9494
displayNameText = new Text(container, SWT.BORDER);
9595
displayNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

0 commit comments

Comments
 (0)