Skip to content

feat(providers): add Atlas Cloud provider - #190

Merged
ethanj merged 1 commit into
mainfrom
feat/atlascloud-provider
Aug 22, 2026
Merged

feat(providers): add Atlas Cloud provider#190
ethanj merged 1 commit into
mainfrom
feat/atlascloud-provider

Conversation

@ethanj

@ethanj ethanj commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Picks up #167, which had been open a month without a push. Rebased onto current main and 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-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 very first extraction request rather than degrading — the provider would look installed and not work. The default is now qwen/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_PROVIDER enumeration plus a credentials section in environment-variables.mdx, a setup tab in providers.mdx, and the README provider table.

One list instead of two. SUPPORTED_PROVIDERS is now derived from SUPPORTED_PROVIDER_INPUTS rather 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 in provider.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-4o is absent, so LLMWIKI_PROVIDER=openai with OPENAI_BASE_URL fails on its own default model.

The embeddings remedy, in all three providers

All three fail-closed providers told the user to change LLMWIKI_PROVIDER when embeddings are unavailable, which costs them the chat provider they picked. LLMWIKI_EMBEDDING_PROVIDER exists (#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 names OPENAI_EMBEDDINGS_API_KEY rather 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_MODELS entry, which is better fixed once across all of them than for this provider alone.

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
ethanj force-pushed the feat/atlascloud-provider branch from b6107ff to ba7d6e7 Compare August 21, 2026 23:10
@ethanj
ethanj merged commit 9c21d6d into main Aug 22, 2026
3 checks passed
@ethanj
ethanj deleted the feat/atlascloud-provider branch August 22, 2026 00:30
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.

1 participant