#7113: feat(providers): add CommonStack provider support
docs
cli
commands
agents
size: L
Cluster:
Model Provider Integrations
# About Commonstack
The Commonstack API offers a unified platform to manage your model integrations and usage efficiently. Connect to the world’s best closed source and open source LLMs through a single, reliable gateway. Reduce inference costs with volume discounts on all of the top models.\
\
It acts as a reliable gateway between your application and various LLM providers (such as OpenAI, Anthropic, Google, Deepseek, MiniMax, and Qwen, etc.). Instead of maintaining multiple API keys, handling separate billing accounts, and rewriting code for different SDKs, you can access top-tier models through a single interface.
#### Key Benefits
* Standardized Interface: CommonStack gives you full control over your inference requests. We support the standard parameters you are used to, ensuring that your application performs exactly as expected.
* Flexibility & Control: CommonStack provides the tools you need to customize both your model outputs and your operational settings.
* Pay-As-You-Go: We eliminate the need for multiple monthly subscriptions. You pay only for the tokens you process, with consolidated billing for all providers.
* Production Reliability: Our infrastructure is designed to route requests efficiently, providing better stability and latency optimization than managing individual connections yourself.
* Tailored Support & Direct Engineering Access: You won’t get stuck in a chatbot loop. Our team works directly with you to resolve integration challenges and optimize your latency.
Official website:https://commonstack.ai/
## Summary
- Add CommonStack AI provider support with OpenAI-compatible API integration
- Add model scanning functionality for CommonStack with optional tool capability probing
- Add onboarding support for CommonStack API key authentication
- Fix system prompt override function call in embedded runner
- Fix tool parameter ordering in tool definition adapter
## Changes
### New Provider: CommonStack
- Add CommonStack provider configuration in model auth, scanning, and CLI
- Add documentation at `docs/providers/commonstack.md`
- Support `commonstack/<model_id>` model reference format
- Require custom `User-Agent` header for API calls
- Add `--scan-provider commonstack` CLI option
- Add `--commonstack-api-key` onboarding option
## Test plan
- [ ] Test CommonStack onboarding: `openclaw onboard --auth-choice commonstack-api-key`
- [ ] Test model scanning: `openclaw models scan --scan-provider commonstack`
- [ ] Test model scanning with probe: `openclaw models scan --scan-provider commonstack --probe`
- [ ] Verify model references work: `commonstack/<model_id>`
- [ ] Verify embedded agent runs with system prompt override
- [ ] Run test suite: `pnpm test`
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new `commonstack` provider with onboarding, model scanning (including optional tool probing), and CLI wiring (`openclaw models scan --scan-provider commonstack`). It also threads provider headers through the embedded runner so provider-defined headers can be honored.
Most changes fit the existing provider/onboarding architecture (auth-choice -> auth profile storage -> provider config + optional model selection). The main functional risk is ensuring CommonStack-specific request requirements (notably the required `User-Agent`) are consistently applied across both scanning and probe calls, since those paths currently build their own HTTP requests/models.
<h3>Confidence Score: 3/5</h3>
- Mostly safe to merge, but CommonStack scanning/onboarding can break due to missing required headers and cancel handling.
- Provider wiring and tests look straightforward, but there are at least two user-visible functional bugs: CommonStack’s required `User-Agent` header isn’t applied in the scan/probe path, and onboarding `select()` cancellation can leak a cancel symbol into config. Fixing these should make the feature stable.
- src/agents/model-scan.ts, src/commands/onboard-auth.config-core.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#2429: added cerebras as a model provider.
by kkkamur07 · 2026-01-26
80.1%
#11833: 在openclaw onboard过程中,在model/auth provider选项中增加Huawei Cloud MAAS供应商的选择
by wukunming168 · 2026-02-08
80.0%
#12020: feat: add AIsa provider, production-grade Chinese AI models
by renning22 · 2026-02-08
79.5%
#11204: feat(providers): add Chutes (Bittensor) provider
by CodingAbdullah · 2026-02-07
79.5%
#20965: feat: Add comprehensive model configuration and discovery for various…
by rodeok · 2026-02-19
78.7%
#15991: feat: add Novita AI provider support with dynamic model discovery
by Alex-wuhu · 2026-02-14
78.7%
#14393: feat: add standalone DeepSeek provider support
by osoulmate · 2026-02-12
78.6%
#7568: feat(agents): add LM Studio auto-discovery and provider support
by sjseo298 · 2026-02-03
78.1%
#7051: Add io-intelligence model inference provider
by rajagurunath · 2026-02-02
77.8%
#9123: Feat/smart router backport and custom model provider
by JuliusYang3311 · 2026-02-04
77.7%