Repository navigation
feat(provider): add Atlas Cloud support - #16
Open
binyangzhu000-sudo wants to merge 2 commits into
Open
binyangzhu000-sudo wants to merge 2 commits into
binyangzhu000-sudo wants to merge 2 commits into
Conversation
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
Upstream's 'unify model providers and migrate AICON gateway' refactor replaced
almost everything this branch touched, so most of the PR is now deleted rather
than merged. Net diff against main drops from 8 files to 3.
What upstream changed:
- ProviderFactory's per-provider match statement became one GatewayProvider
plus registry.connection(), so the 'case "atlascloud"' branch has no home.
- The hardcoded frontend provider list was removed in favour of a backend
/api-keys/provider-presets endpoint that serves registry.PROVIDERS verbatim.
- APIKeys.vue / APIKeysSettings.vue gained applyProviderPreset, which does
exactly what this branch's handleProviderChange did, but driven by that
endpoint.
- validate_provider now derives its list from PROVIDERS, and get_models now
reads the catalog instead of hardcoding per-provider model names.
So the whole change is one registry entry:
'atlascloud': ('Atlas Cloud', 'https://api.atlascloud.ai/v1'),
Two things the merge would otherwise have shipped quietly:
- APIKeys.vue and APIKeysSettings.vue auto-merged into a select carrying two
@change attributes, with this branch's handler calling
apiKeyUtils.getProviderDefaultBaseUrl — a function upstream deleted. Both
handlers and the duplicate attribute are removed; upstream's preset path
stands alone.
- The contract test asserted ProviderFactory.create returns a CustomProvider,
which is no longer true. It is rewritten against the new architecture and now
covers the registry preset, connection() resolution for both default and
explicit base URLs, rejection of credentialed/queried/non-HTTP base URLs, and
acceptance by the schema validator and the provider enum.
Verified locally: the four tests pass, and the presets endpoint returns the
Atlas Cloud row alongside the six existing providers. Note libmagic is not
installed on this machine, so the test had to be run with the app's optional
python-magic import stubbed; the repository has no CI workflow to fall back
on.
Author
|
已同步 上游的变化,以及对应的处置:
于是整个改动收敛成注册表里的一行: 'atlascloud': ('Atlas Cloud', 'https://api.atlascloud.ai/v1'),有两处是这次合并本会静默带过去的,说明一下:
本地验证:4 个测试通过, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
https://api.atlascloud.ai/v1as its default OpenAI-compatible endpointdeepseek-ai/deepseek-v4-proCustomProviderimplementation and cover the factory endpoint contractValidation
pytest backend/tests/unit/test_atlascloud_provider.py backend/tests/unit/test_custom_provider.py: 2 passednpm run build: passedcompileall: passed@vue/eslint-config-prettierpackageScope
No README, documentation, logo, sponsor, credits, or partner promotion changes.