Models Hub
Agent Tools

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.

Edit this page

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.
Use caseModelPricingLive status
First choice for everyday chat, a balance of speed and qualityclaude-sonnet-4-6PriceAvailability and latency
Complex reasoning and long contextgpt-5.5PriceAvailability and latency
Cheap and fast, good for high-frequency group chatgpt-5.4-miniPriceAvailability and latency

Model names are authoritative on the pricing page.

Setup

  1. 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).

    Getting an API key from Models Hub

  2. 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.

    Adding a model in LangBot pointed at Models Hub

  3. Go to the pipeline configuration and select the model you just added as the chat model.

    Selecting the newly added model in a pipeline

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.

Verifying the reply in the debug chat

Common errors

SymptomCauseFix
Connection failure when adding the modelWrong API URL, or the local deployment's container network can't reach itUse https://modelsok.com/v1 for a hosted site; check container networking for local deployments
401 / Invalid API keyIncomplete key, or a disabled tokenRe-copy from the Tokens page
Model missing from the pipeline picker / model not foundMisspelled model name, or the token's group can't access itCheck the spelling on the pricing page
Slow replies or 429Rate limiting, usually from high concurrencyRetry later; contact support for a higher limit if this persists
Nothing shows in usage logsThe pipeline's chat model wasn't switched to the new oneGo 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.

On this page