feat(providers): add Atlas Cloud provider - #190
Merged
Conversation
Picks up #167, which had been open a month without a push, rebased onto current main and finished against the review. `LLMWIKI_PROVIDER=atlascloud` (aliases `atlas-cloud`, `atlas`) routes chat and tool calls through the Atlas Cloud gateway, an OpenAI-compatible API across models from several publishers. Credentials come from ATLASCLOUD_API_KEY or ATLAS_CLOUD_API_KEY; ATLASCLOUD_BASE_URL overrides the endpoint. The default model changed from what the PR shipped. Atlas Cloud's catalogue marks tool support per model, and `qwen/qwen3.5-flash` carries no `supported_features` entry at all while 35 of its 136 models advertise `["json_mode","structured_outputs","tools"]`. Compile extracts concepts through `toolCall` with `tool_choice: "required"`, so that default would have failed on the first extraction request rather than degrading. `qwen/qwen3.5-35b-a3b` is the smallest catalogue model that does advertise tools, keeping the cheap-and-fast intent of the original choice. A dedicated provider is warranted rather than the OpenAI-compatible escape hatch: all 136 catalogue ids are namespaced by publisher and bare `gpt-4o` is absent, so `LLMWIKI_PROVIDER=openai` with `OPENAI_BASE_URL` fails on its own default model. `SUPPORTED_PROVIDERS` is now derived from `SUPPORTED_PROVIDER_INPUTS` instead of being a second hand-written list. The two drifting apart yields a guard that rejects what the factory can build, and the PR had grown the count from two lists to three. The stale module header in provider.ts, which had omitted Copilot and the Agent SDK since they were added, is corrected in the same pass. All three fail-closed providers told the user to change LLMWIKI_PROVIDER when embeddings are unavailable, which costs them the chat provider they chose. LLMWIKI_EMBEDDING_PROVIDER exists (#154) precisely so they do not have to, and it is what the docs prescribe. Atlas Cloud inherited the wrong text verbatim from MiniMax, and a Copilot test asserted the wrong advice was correct, named "error message mentions switching to the openai provider" — which is how it survived #154 shipping the variable that made it wrong. All three messages now point at the embedding override, Copilot's names OPENAI_EMBEDDINGS_API_KEY rather than the main key, and the test asserts the correct remedy plus the absence of the old one. Docs cover the three surfaces the repo requires for a user-facing provider: the LLMWIKI_PROVIDER enumeration and a credentials section in environment-variables.mdx, a setup tab in providers.mdx, and the README provider table. Embeddings are not wired up and fail closed, matching MiniMax and Copilot. Those three share an absent EMBEDDING_MODELS entry, which is better fixed once across all of them than for this provider alone. Co-authored-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MUdoRq1DJq23aJuhK9QK7X
ethanj
force-pushed
the
feat/atlascloud-provider
branch
from
August 21, 2026 23:10
b6107ff to
ba7d6e7
Compare
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.
Picks up #167, which had been open a month without a push. Rebased onto current
mainand finished against that review. @binyangzhu000-sudo is credited as co-author; the provider, the alias handling, and the original tests are their work.What changed from the original PR
The default model. Atlas Cloud's catalogue marks tool support per model, and
qwen/qwen3.5-flashcarries nosupported_featuresentry at all, while 35 of its 136 models advertise["json_mode","structured_outputs","tools"].compileextracts concepts throughtoolCallwithtool_choice: "required", so that default would have failed on the very first extraction request rather than degrading — the provider would look installed and not work. The default is nowqwen/qwen3.5-35b-a3b, the smallest catalogue model that does advertise tools, which keeps the cheap-and-fast intent of the original choice.Docs. The three surfaces the repo requires for a user-facing provider: the
LLMWIKI_PROVIDERenumeration plus a credentials section inenvironment-variables.mdx, a setup tab inproviders.mdx, and the README provider table.One list instead of two.
SUPPORTED_PROVIDERSis now derived fromSUPPORTED_PROVIDER_INPUTSrather than written out again. The original PR had grown the number of hand-maintained provider lists from two to three, and two of them drifting apart produces a guard that rejects what the factory can build. The stale module header inprovider.ts, which had omitted Copilot and the Agent SDK since they were added, is fixed in the same pass.Why a dedicated provider rather than the OpenAI-compatible escape hatch
All 136 catalogue ids are namespaced by publisher and bare
gpt-4ois absent, soLLMWIKI_PROVIDER=openaiwithOPENAI_BASE_URLfails on its own default model.The embeddings remedy, in all three providers
All three fail-closed providers told the user to change
LLMWIKI_PROVIDERwhen embeddings are unavailable, which costs them the chat provider they picked.LLMWIKI_EMBEDDING_PROVIDERexists (#154) so they do not have to, and it is what the docs prescribe.Atlas Cloud inherited that text verbatim from MiniMax, and a Copilot test asserted the wrong advice was correct — named
embed() error message mentions switching to the openai provider, which is how it survived #154 shipping the variable that made it wrong. Fixing only the new file would have left the codebase giving two different answers and kept the test that made the wrong one look deliberate. All three now point at the embedding override, Copilot's namesOPENAI_EMBEDDINGS_API_KEYrather than the main key, and the test asserts the correct remedy plus the absence of the old one.Not included
Embeddings are not wired up and fail closed, matching MiniMax and Copilot. All three share an absent
EMBEDDING_MODELSentry, which is better fixed once across all of them than for this provider alone.