agentscope-ai / agentscope-ai/agentscope

[Bug]: (web-ui): show an error when credential provider schemas fail to load

未關閉
#1,840 2 則留言 0 個 reaction 已指派 1 人 已被 @Premsenareddy 認領 在 GitHub 檢視
stale-issue
主要語言
Python
星號
31.6k
分支
3.5k
平均合併
1 天 16 小時
30 天內合併 PR
103

描述

### Prerequisites

- [x] I have searched the existing [issues](https://github.com/agentscope-ai/agentscope/issues) and [discussions](https://github.com/agentscope-ai/agentscope/discussions), and this is not a duplicate.
- [x] This is a bug, not a usage question. (For questions, please use [Discussions](https://github.com/agentscope-ai/agentscope/discussions/new?category=general) instead.)

### Background / Description

## Summary

When adding a model credential in the Web UI, Safari may show an empty provider
selector with only the placeholder visible. The dialog looks stuck because no
provider options are rendered and no error message is shown.

This appears to be a frontend error-handling gap rather than a backend schema
registration problem. The backend can return the credential schemas correctly,
but the create-credential dialog silently falls back to an empty provider list
when the schema request fails in the browser.

Image

Image

### Error Messages

```shell
## Diagnosis

The backend schema endpoint returns the expected provider schemas when queried
directly with a valid server address and user id header:

curl -H 'x-user-id: ' http://localhost:8000/credential/schemas

The likely frontend failure path is:

1. The create-credential dialog opens.
2. The dialog requests credential provider schemas.
3. The request fails in the browser, for example when the saved server URL is
not a browser-reachable address.
4. Loading ends, but no error state is stored.
5. The schema list remains empty, so the provider selector renders only its
placeholder.

One common local trigger is saving a server bind address such as
`http://0.0.0.0:8000` as the browser target. Browsers should use
`http://localhost:8000` or `http://127.0.0.1:8000` instead.
```

### Steps to Reproduce

## Reproduction

1. Start the AgentScope app service.
2. Start the Web UI.
3. Open the Web UI in Safari.
4. Connect to the app service.
5. Open the credential page.
6. Click "Add credential".

## Actual Behavior

- The provider selector shows only the placeholder.
- No provider options are available.
- The create button remains disabled.
- No inline error explains why providers failed to load.

## Expected Behavior

The dialog should either:

- show the available credential providers, or
- show an actionable error message explaining that provider schemas failed to
load.

### Environment

- AgentScope Version: 2.0.1
- Python Version: 3.13.12
- OS: macOS 26.3.1

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。