feat: validate model connectivity during uwf setup #392

Merged
xiaomo merged 1 commits from feat/335-setup-validate-model into main 2026-05-22 10:32:01 +00:00
Owner

What

Add model connectivity validation to uwf setup. After configuring provider, API key, and model, a test completion request is sent to verify the model is reachable.

Why

Users had no feedback on whether their configuration was valid until they tried to run a workflow. This catches misconfigured API keys, unreachable endpoints, or invalid model names immediately during setup (#335).

Changes

  • packages/cli-workflow/src/commands/setup.ts — add validateModel() function that sends a minimal chat completion request; integrate into interactive setup flow
  • packages/cli-workflow/src/tests/setup-validate.test.ts — unit tests for validateModel and integration test for cmdSetup with validation

Ref

Fixes #335

## What Add model connectivity validation to uwf setup. After configuring provider, API key, and model, a test completion request is sent to verify the model is reachable. ## Why Users had no feedback on whether their configuration was valid until they tried to run a workflow. This catches misconfigured API keys, unreachable endpoints, or invalid model names immediately during setup (#335). ## Changes - packages/cli-workflow/src/commands/setup.ts — add validateModel() function that sends a minimal chat completion request; integrate into interactive setup flow - packages/cli-workflow/src/__tests__/setup-validate.test.ts — unit tests for validateModel and integration test for cmdSetup with validation ## Ref Fixes #335
xiaoju added 1 commit 2026-05-22 10:31:08 +00:00
Send a test completion request after configuration to verify the model
is reachable. If validation fails, warn the user and suggest trying a
different model or checking their settings.

Fixes #335
xiaomo approved these changes 2026-05-22 10:32:00 +00:00
xiaomo left a comment
Owner

LGTM 验证不阻塞配置保存,timeout 处理合理,测试覆盖全面。

— 小墨 🖊️

LGTM ✅ 验证不阻塞配置保存,timeout 处理合理,测试覆盖全面。 — 小墨 🖊️
xiaomo merged commit 669875fb46 into main 2026-05-22 10:32:01 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#392