agentscope-ai / agentscope-ai/agentscope
[Bug]: (web-ui): show an error when credential provider schemas fail to load
- Vorherrschende Sprache
- Python
- Sterne
- 31.5k
- Forks
- 3.5k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 95
Beschreibung
### 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.
### 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
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.