Use LangBot with Models Hub: Add a Model and Pipeline
Add a model in LangBot pointed at Models Hub, wire it into a pipeline, and use it across Feishu, DingTalk, WeChat, and QQ, with recommended models, embeddings, and error fixes.
LangBot is an open-source instant messaging bot development platform supporting Feishu, DingTalk, WeChat, QQ, Telegram, Discord, Slack, and more, with built-in knowledge base, agent, and MCP capabilities. It connects to any OpenAI-compatible model service; point a model at Models Hub and every bot conversation wired to that pipeline draws on your Models Hub balance. This page covers only the connection step — see the official documentation for building pipelines.
Three things you need
A Models Hub API key, the endpoint https://modelsok.com/v1, and a model name.
Prerequisites
- LangBot deployed. Downloads: GitHub Releases. Project page: GitHub.
- A Models Hub API key from the Tokens page, in a group that can access the models you want.
Recommended models
| Use case | Model | Pricing | Live status |
|---|---|---|---|
| First choice for everyday chat, a balance of speed and quality | claude-sonnet-4-6 | Price | Availability and latency |
| Complex reasoning and long context | gpt-5.5 | Price | Availability and latency |
| Cheap and fast, good for high-frequency group chat | gpt-5.4-mini | Price | Availability and latency |
Model names are authoritative on the pricing page.
Setup
-
Get an API key from the Tokens page in the Models Hub console. If you're running LangBot locally, make sure its container can reach the Models Hub endpoint (see LangBot's container networking docs).

-
In the LangBot admin panel, go to model management, add a model, and choose an OpenAI-compatible provider type (note: the exact option label may vary by version — go by what you see). Fill in the API key and the API URL
https://modelsok.com/v1.
-
Go to the pipeline configuration and select the model you just added as the chat model.

Verify
Send "hello" in LangBot's debug chat, or talk directly to a bot bound to the pipeline (e.g. Feishu or WeChat). A normal reply means you're connected. Then check Usage logs in the Models Hub console; a request under that model name appears within seconds, confirming traffic went through Models Hub. For bot deployment steps, see LangBot's deployment docs.

Common errors
| Symptom | Cause | Fix |
|---|---|---|
| Connection failure when adding the model | Wrong API URL, or the local deployment's container network can't reach it | Use https://modelsok.com/v1 for a hosted site; check container networking for local deployments |
401 / Invalid API key | Incomplete key, or a disabled token | Re-copy from the Tokens page |
| Model missing from the pipeline picker / model not found | Misspelled model name, or the token's group can't access it | Check the spelling on the pricing page |
Slow replies or 429 | Rate limiting, usually from high concurrency | Retry later; contact support for a higher limit if this persists |
| Nothing shows in usage logs | The pipeline's chat model wasn't switched to the new one | Go back to pipeline configuration and confirm the correct chat model is selected |
More in Troubleshooting.
FAQ
How is it billed? Per input and output token actually consumed in each conversation, at the price on each model's pricing page. Usage logs itemize every request.
How is this different from using OpenAI's official endpoint directly? Same request format; only the base URL changes.
How do I switch models? Add or edit a model in model management, then switch the chat model in pipeline configuration.
Can I use a Models Hub embedding model for the knowledge base? Yes. LangBot lets you add an embedding model under the same OpenAI-compatible provider and select it when creating a knowledge base — see the official documentation for details.
Related
Use AstrBot with Models Hub: Model Provider Setup
Add an OpenAI model provider in AstrBot pointed at Models Hub, set it as the default chat model, and use it across QQ, Feishu, and more, with recommended models and error fixes.
Use nanobot with Models Hub: Edit config.json
Configure nanobot's providers and agents.defaults in config.json to point at Models Hub, with install steps, recommended models, and error fixes.