Skip to content

feat(wizard): add CommonStack as a unified API gateway provider#523

Merged
lsdefine merged 1 commit into
lsdefine:mainfrom
flhoildy:feat/wizard-commonstack-provider
May 29, 2026
Merged

feat(wizard): add CommonStack as a unified API gateway provider#523
lsdefine merged 1 commit into
lsdefine:mainfrom
flhoildy:feat/wizard-commonstack-provider

Conversation

@flhoildy
Copy link
Copy Markdown
Contributor

Summary

Adds CommonStack as a selectable LLM provider in
assets/configure_mykey.py. CommonStack is an OAI/Anthropic-compatible
unified gateway that aggregates flagship models from OpenAI, Anthropic,
Google, DeepSeek, MiniMax, Zhipu, xAI, Moonshot, Qwen and Xiaomi behind
a single key — same shape as the existing openrouter entry.

Details

  • Single-entry addition to LLM_PROVIDERS, between openrouter and crs.
  • type: native_oai, apibase: https://api.commonstack.ai/v1,
    api_mode: chat_completions. Standard Bearer auth — no quirks.
  • model_choices kept to 2 flagship ids mirroring openrouter's shape,
    since probe_models() fetches the live /v1/models list at config time
    (returns ~55 ids currently). model_choices is only consulted by
    _fallback_model() on probe failure.
  • Default model is anthropic/claude-opus-4-7, matching the project's
    pattern of defaulting to the flagship Claude.

Test plan

  • from configure_mykey import LLM_PROVIDERS imports cleanly.
  • Provider menu order: cc_relay → openrouter → commonstack → crs → gmi.
  • probe_models() against live /v1/models returns 55 ids.
  • End-to-end configure_llm(commonstack) with mocked stdin confirms
    the live list (alphabetical, starts with anthropic/claude-haiku-4-5)
    populates the picker, not the 2-item fallback.

CommonStack (https://commonstack.ai) is an OAI-compatible gateway
aggregating Claude, GPT, Gemini, DeepSeek, MiniMax, Zhipu, xAI,
Moonshot, Qwen and Xiaomi models behind a single key.

Adds it to the configure_mykey wizard as a native_oai entry,
placed alongside other multi-provider relays (openrouter, crs, gmi).
The wizard's existing probe_models() flow fetches the live
/v1/models list at config time; model_choices keeps the same
2-item fallback shape as openrouter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shenhao-stu
Copy link
Copy Markdown
Contributor

Thanks for the PR! I don't think we'll merge this one though.

CommonStack has the same shape as our existing cc_relay / openrouter / crs native_oai channels, and the repo already ships a generic OpenAI / Responses adapter (see memory/llm-api-adapter/ and the dual-mode images_api + responses_tool fallback in image_gen_api.py). Any OAI-compatible gateway can be wired up by adding a single provider entry to mykey.py — no need to bake every gateway into the wizard's built-in list.

Going to close this for now. Thanks again!

@lsdefine lsdefine merged commit d75c0b7 into lsdefine:main May 29, 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.

3 participants