Skip to content

feat(provider): Fix provider_id conflicts and remove connection test in custom provider#1234

Merged
pan-x-c merged 3 commits into
agentscope-ai:mainfrom
pan-x-c:feature/fix_legacy_migrate
Mar 11, 2026
Merged

feat(provider): Fix provider_id conflicts and remove connection test in custom provider#1234
pan-x-c merged 3 commits into
agentscope-ai:mainfrom
pan-x-c:feature/fix_legacy_migrate

Conversation

@pan-x-c

@pan-x-c pan-x-c commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Description

  1. Optimized the handling logic forprovider_id conflicts, no longer throwing exceptions but directly renaming the ID. (Does not support dashscope-intl and coding-intl subdomains of aliyuncs #1145)

  2. Hides the connection test button on the custom provider configuration page, as many custom inference services do not provide the necessary testing interfaces. (桌面端配置MiniMax模型无法连通,修改配置文件可以连通但无法正常使用 #1175)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Core / Backend (app, agents, config, providers, utils, local_models)
  • Console (frontend web UI)
  • Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
  • Skills
  • CLI
  • Documentation (website)
  • Tests
  • CI/CD
  • Scripts / Deploy

Checklist

  • I ran pre-commit run --all-files locally and it passes
  • If pre-commit auto-fixed files, I committed those changes and reran checks
  • I ran tests locally (pytest or as relevant) and they pass
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Local Verification Evidence

pre-commit run --all-files
# paste summary result

pytest
# paste summary result

Additional Notes

[Optional: any other context]

Copilot AI review requested due to automatic review settings March 11, 2026 06:53
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes custom provider creation behavior to automatically resolve provider_id conflicts (instead of throwing), and updates the console UI to hide the “Test connection” action for custom providers.

Changes:

  • Backend: auto-renames conflicting/duplicate custom provider IDs during creation and returns the resolved ProviderInfo.
  • CLI: prints the resolved provider id (and requested id if it changed) after creating a custom provider.
  • Console: hides the “Test connection” button for custom providers; updates unit tests to match the new conflict-resolution behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/copaw/providers/provider_manager.py Adds ID conflict resolution for custom providers and updates custom provider creation payload.
src/copaw/cli/providers_cmd.py Captures/prints returned ProviderInfo so the CLI reflects any auto-renamed IDs.
console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx Hides “Test connection” button for custom providers.
tests/unit/providers/test_provider_manager.py Updates tests to assert auto-renaming behavior for conflicts/duplicates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/copaw/providers/provider_manager.py
@pan-x-c pan-x-c merged commit 05ff34e into agentscope-ai:main Mar 11, 2026
19 checks passed
hh0592821 pushed a commit to hh0592821/CoPaw that referenced this pull request Mar 12, 2026
tudan110 pushed a commit to tudan110/QwenPaw that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does not support dashscope-intl and coding-intl subdomains of aliyuncs

3 participants