How to add Nous Research as a provider in nanobot #4970
Replies: 1 comment
|
Nice write-up — this matches what I see against the live Nous endpoint. One practical tip when wiring nanobot (or any OpenAI client) to I published a minimal smoke + cotas report (model used, HTTP status, usage, remaining headers) here in case it helps others validate their key/config before debugging nanobot provider settings: https://gist.github.com/Ziuluiziul/296fa307f82eb950e49cb54af08301eb Also note Hermes returns 404 on that free path in my checks — stick to the |
Uh oh!
There was an error while loading. Please reload this page.
How to add Nous Research as a provider in nanobot
This guide explains how to point nanobot at the Nous Research Inference API (
https://inference-api.nousresearch.com/v1) so you can use models liketencent/hy3:freedirectly from nanobot.1. Prerequisites
0.2.x). Install it with:sk-nous-xxxxxxxx.2. Configure the provider
Open your nanobot config file:
Fill in the
providers.customblock with your key and the Nous base URL. nanobot treatscustomas "any OpenAI-compatible endpoint," which is exactly what Nous Portal is.Important gotcha — the
usertagThe Nous Portal
/chat/completionsroute requires ausertag in the request, even though it is not documented in the official OpenAPI spec (https://portal.nousresearch.com/api/openapi, which only listsmodel,messages,temperature,max_tokens,stream).If you omit it, the API returns:
{"status":400,"message":"This request is not valid. Check the model name and other parameters. Additional info: missing tags"}and if you send
tagswithout auser=entry, it returns:{"status":400,"message":"... Additional info: missing user tag"}The working shape is a
tagsarray containing one entry whose key isuser:The
uservalue is free-form (e.g.user=nanobot,user=my-agent). What matters is theuser=key prefix. nanobot sendsextraBodyand the OpenAI-compatible SDK flattensextraBodyinto the request root, so the server seestagsat the top level where it expects it.3. Create a model preset
Add a preset under
model_presetsso you can switch models and pin the default:Then activate it by setting the default preset:
4. Verify
Check that nanobot reads the config correctly:
You should see:
Then run a real chat to confirm the endpoint accepts the request (including the
usertag):or a one-shot message. If you get a
400 missing user tag, double-check thatextraBody.tagscontains auser=...entry (step 2).5. Rate limits
When you call
https://inference-api.nousresearch.com/v1, you are subject to Nous Portal rate limits (from the official API docs):If you instead point
apiBaseat OpenRouter and use the samesk-nous-...key, you are subject to OpenRouter free-tier limits instead (≈ 20 RPM / 200 requests per day for:freemodels). The endpoint you choose, not the key, decides the limit.6. Minimal working
config.jsonsnippets (copy-paste)Provider block:
Preset + activation:
Troubleshooting
400 missing tagstagsnot sent"extraBody": {"tags": ["user=nanobot"]}toproviders.custom400 missing user tagtagspresent but nouser=entry"tags": ["user=nanobot"](theuser=key is required)404 ... requires available creditstencent/hy3without:free) on a free account:freevariant, or add credits at portal.nousresearch.com404 Model 'tencent/hy3:free' requires available creditsnanobot: command not founduv's bin dir not on PATHuv tool run --from nanobot-ai nanobot ..., or add~/.local/binto PATHSources
portal_tags.py(tag shape reference): https://github.com/NousResearch/hermes-agent —agent/portal_tags.pytencent/hy3:freeis served by Nous Portal (verified live:GET /v1/modelsliststencent/hy3:freewithsynthesizedFreeVariant: true).All reactions